You are viewing a free preview of this lesson.
Subscribe to unlock all 10 lessons in this course and every other course on LearningBro.
Ethereum, proposed by Vitalik Buterin in 2013 and launched in 2015, extended blockchain beyond simple value transfer. It introduced a Turing-complete virtual machine that can execute arbitrary programs called smart contracts, transforming blockchain into a general-purpose platform for decentralised applications.
| Feature | Bitcoin | Ethereum |
|---|---|---|
| Purpose | Digital currency / store of value | Programmable blockchain platform |
| Smart contracts | Limited (Bitcoin Script) | Turing-complete (Solidity, Vyper) |
| Account model | UTXO-based | Account-based |
| Block time | ~10 minutes | ~12 seconds |
| Consensus | Proof of Work (SHA-256) | Proof of Stake (since Sep 2022) |
| Native token | BTC | ETH |
| Gas mechanism | Transaction fees only | Gas system for computation pricing |
The EVM is the runtime environment for smart contracts on Ethereum. Every node in the network runs the EVM to execute and validate contract code.
+-----------------------------------------+
| Ethereum Virtual Machine |
| +-------------------------------------+|
| | Stack-based execution engine ||
| | 256-bit word size ||
| | Deterministic execution ||
| +-------------------------------------+|
| | Storage (persistent, per contract) ||
| | Memory (volatile, per execution) ||
| | Calldata (read-only input) ||
| +-------------------------------------+|
| | ~140 opcodes (arithmetic, crypto, ||
| | storage, control flow, etc.) ||
| +-------------------------------------+|
+-----------------------------------------+
| Property | Description |
|---|---|
| Deterministic | Given the same input, every node produces the same output |
| Isolated (sandboxed) | Contracts cannot access the file system, network, or other external resources directly |
| Gas-metered | Every operation costs gas, preventing infinite loops and resource abuse |
| Stack-based | Uses a last-in-first-out stack with a maximum depth of 1,024 |
| 256-bit word size | Optimised for cryptographic operations |
A smart contract is a self-executing program stored on the blockchain. Once deployed, its code cannot be changed (it is immutable by default), and it executes automatically when triggered by a transaction.
1. Developer writes contract code (e.g. in Solidity)
2. Code is compiled to EVM bytecode
3. Bytecode is deployed to the blockchain via a transaction
4. The contract receives a unique address
5. Users interact with the contract by sending transactions
6. The EVM executes the contract code
7. State changes are recorded on the blockchain
| Characteristic | Description |
|---|---|
| Immutable | Code cannot be changed after deployment (unless using a proxy pattern) |
| Transparent | Source code and state are publicly visible on-chain |
| Trustless | Execution is guaranteed by the network — no need to trust a counterparty |
| Composable | Contracts can call other contracts, enabling complex protocols |
| Deterministic | Same inputs always produce the same outputs |
Ethereum has two types of accounts:
Subscribe to continue reading
Get full access to this lesson and all 10 lessons in this course.