05 — Ethereum (L1)
A "world computer". The most widely used smart contract platform. Currently a settlement + DA layer for a massive ecosystem of L2s.
1. Fundamental specifications
| Spec | Value |
|---|---|
| Mainnet | 2015-07-30 (Frontier release) |
| Whitepaper | 2013-12 (Vitalik Buterin) |
| Yellow Paper | 2014 (Gavin Wood) — formal spec |
| Cofounders | Buterin, Wood, Lubin, Hoskinson, Di Iorio, Alisie, Chetrit, Wilcke (left early) |
| Consensus | PoS Casper FFG + LMD-GHOST (post-Merge Sep/2022) |
| Slot | 12 seconds |
| Epoch | 32 slots (~6.4 min) |
| Finality | 2 epochs (~12.8 min) |
| Block time | 12 seconds |
| Block gas limit | 30M (target), 60M (max via EIP-1559) |
| Supply | No hard cap; deflationary after Merge + EIP-1559 burn |
| Smallest unit | 1 wei = 10⁻¹⁸ ETH |
| Address | 20 bytes (Keccak-256 of pubkey, last 20 bytes) |
| Tx model | Account-based |
| VM | Ethereum Virtual Machine (EVM) — Turing-complete |
| Languages | Solidity, Vyper, Huff, Yul, Fe |
| Signature | secp256k1 ECDSA (legacy); BLS12-381 (consensus) |
| Hashes | Keccak-256 (not SHA-3-256, different padding) |
| Encoding | RLP (Recursive Length Prefix) |
2. EVM (Ethereum Virtual Machine)
Stack-based virtual machine. 256-bit words.
Components
- Stack: 1024 items, 256-bit each.
- Memory: byte-addressable, expandable (gas grows quadratic).
- Storage: persistent key-value, 256-bit key → 256-bit value. Most expensive.
- Calldata: input read-only.
- Code: contract bytecode.
- Program counter: position in bytecode.
Opcodes
~140 opcodes. Categories:
| Category | Examples | Gas |
|---|---|---|
| Stack | PUSH1-32, POP, DUP1-16, SWAP1-16 | 3 |
| Arithmetic | ADD, MUL, SUB, DIV, MOD, EXP | 3-10 |
| Comparison | LT, GT, EQ, ISZERO | 3 |
| Bitwise | AND, OR, XOR, NOT, SHL, SHR | 3 |
| Hash | KECCAK256 | 30 + 6/word |
| Environment | ADDRESS, BALANCE, CALLER, CALLVALUE, GASPRICE | 2-700 |
| Block | BLOCKHASH, COINBASE, TIMESTAMP, NUMBER, DIFFICULTY, GASLIMIT, CHAINID | 2-20 |
| Memory | MLOAD, MSTORE, MSTORE8, MSIZE | 3+ |
| Storage | SLOAD (2100100), SSTORE (200005000/2900) | very high |
| Control flow | JUMP, JUMPI, JUMPDEST, PC, GAS, STOP, RETURN, REVERT, INVALID | 1-10 |
| Calls | CALL, DELEGATECALL, STATICCALL, CALLCODE (deprecated), CREATE, CREATE2 | 700-32000 |
| Logs | LOG0-LOG4 | 375 + 8/byte |
| Precompiles | 0x01-0x09: ecrecover, sha256, ripemd160, identity, modexp, ecadd, ecmul, ec_pairing, blake2f | varies |
Gas
Each operation costs gas. A tx sends gasLimit + gasPrice (legacy) or maxFeePerGas + maxPriorityFeePerGas (EIP-1559).
tx_cost = gas_used × gas_pricegas_used ≤ gas_limit (rest is refund). Out-of-gas → revert (but gas consumed).
Account types
- EOA (Externally Owned Account): controlled by private key. Pays gas.
- Contract Account: controlled by code. Has storage, code, balance. No private key.
Both have 20-byte address.
3. Historical hard forks
| Hard fork | Date | Changes |
|---|---|---|
| Frontier | 2015-07-30 | Genesis |
| Homestead | 2016-03-14 | First production release |
| DAO Fork | 2016-07-20 | Revert DAO hack; ETC split |
| Tangerine Whistle | 2016-10-18 | Anti-DoS gas reprice |
| Spurious Dragon | 2016-11-22 | More DoS fixes; state clearing |
| Byzantium | 2017-10-16 | Difficulty bomb delay; new opcodes (REVERT, RETURNDATA) |
| Constantinople | 2019-02-28 | Bitwise shifting opcodes; CREATE2 |
| Istanbul | 2019-12-08 | Gas reprice; LOGICNOTREPRICED ChainID |
| Muir Glacier | 2020-01-02 | Difficulty bomb delay |
| Berlin | 2021-04-15 | EIP-2929 gas; access lists (EIP-2930); typed txs (EIP-2718) |
| London | 2021-08-05 | EIP-1559 fee market; difficulty bomb delay |
| Altair (Beacon) | 2021-10-27 | Sync committee; light client support |
| Arrow Glacier | 2021-12-09 | Difficulty bomb delay |
| Gray Glacier | 2022-06-30 | Difficulty bomb delay |
| The Merge | 2022-09-15 | PoW → PoS transition |
| Shapella (Shanghai+Capella) | 2023-04-12 | Staking withdrawals |
| Dencun (Cancun+Deneb) | 2024-03-13 | EIP-4844 blobs; transient storage; KZG point eval |
| Pectra (Prague+Electra) | 2026-03 (planned) | EIP-7702 (EOA→smart account); EIP-7251 (max balance 2048 ETH); BLS12-381 precompiles |
4. EIPs (Ethereum Improvement Proposals)
Categories: Core, Networking, Interface, ERC (Application standards).
Notable Core EIPs
| EIP | Content |
|---|---|
| EIP-1 | EIP process itself |
| EIP-20 | ERC-20 fungible token standard |
| EIP-55 | Mixed-case checksum address |
| EIP-155 | Replay attack protection (chain ID) |
| EIP-721 | NFT standard (ERC-721) |
| EIP-1155 | Multi-token standard (ERC-1155) |
| EIP-1271 | Smart contract signature validation |
| EIP-1559 | Fee market (base fee + tip; burn) |
| EIP-2535 | Diamond proxy (multi-facet) |
| EIP-2612 | Permit (gasless approval) |
| EIP-2718 | Typed transaction envelope |
| EIP-2929 | Access lists / gas cost increase for storage |
| EIP-2930 | Optional access lists |
| EIP-3074 | AUTH and AUTHCALL (sponsored txs) — superseded by 7702 |
| EIP-3198 | BASEFEE opcode |
| EIP-3529 | Reduce refunds |
| EIP-3675 | Upgrade consensus to PoS (Merge) |
| EIP-3855 | PUSH0 opcode |
| EIP-4337 | Account Abstraction (smart wallets) |
| EIP-4399 | DIFFICULTY → PREVRANDAO (PoS) |
| EIP-4626 | Tokenized vault standard |
| EIP-4788 | Beacon block root in EVM |
| EIP-4844 | Proto-danksharding (blob txs) |
| EIP-5805 | Voting checkpointing |
| EIP-6492 | Universal sig validation for non-deployed wallets |
| EIP-6780 | SELFDESTRUCT semantic change |
| EIP-7002 | Trigger withdrawals from EL |
| EIP-7251 | Max effective balance increase 32 → 2048 ETH |
| EIP-7549 | Move committee index outside attestation |
| EIP-7600 | Hardfork meta — Pectra |
| EIP-7702 | Set EOA code (smart accounts on EOAs) |
| EIP-7742 | Uncouple blob count between CL/EL |
| EIP-7805 | FOCIL (Fork-Choice enforced Inclusion Lists) |
Application ERCs (some of the most relevant)
| ERC | Standard |
|---|---|
| ERC-20 | Fungible token |
| ERC-721 | NFT |
| ERC-777 | Advanced token (hooks) |
| ERC-1155 | Multi-token (semi-fungible) |
| ERC-1271 | Contract signature |
| ERC-1400 | Security tokens |
| ERC-2981 | NFT royalties |
| ERC-3525 | Semi-fungible tokens |
| ERC-4337 | Account Abstraction |
| ERC-4626 | Vault |
| ERC-5192 | Soulbound tokens (non-transferable) |
| ERC-6551 | Token-bound accounts (NFTs as wallets) |
| ERC-7521 | Generalized signed message intent |
5. Account Abstraction (ERC-4337)
Yoav Weiss, Sam Wilson, Vitalik 2021–2023. Mainnet Mar/2023.
Mechanics
- UserOperation: object describing intended action (user signed).
- EntryPoint contract: validates + executes UserOps.
- Bundler: like miner, but for UserOps; bundles + submits to chain.
- Paymaster: optional sponsor of gas (USDC payment, gas station, etc.).
- Smart wallet: any contract that implements
validateUserOp().
Features unlocked
- Multisig natural.
- Social recovery (Argent, Safe).
- Spend limits built-in.
- Batch txs (1 sig, many actions).
- Custom signatures: passkeys (WebAuthn), threshold, post-quantum.
- Gasless (sponsor pays).
- Session keys (Web3 games).
- Subscription payments.
EIP-7702 (Pectra 2026)
Allow EOA to have code attached temporarily. EOA → smart-account hybrid without deploying a contract. Simplifies UX massively.
Adoption
- Argent, Safe (Gnosis), Coinbase Smart Wallet, Biconomy, Stackup.
- Pimlico, Alchemy bundlers.
- Pectra (Mar/2026) should accelerate massive adoption.
6. Consensus layer (Beacon Chain)
Validators
- 32 ETH stake (until Pectra; then flexible up to 2048 ETH).
- 1M active validators (32M ETH staked).
- Eligibility: deposit + 64-256 epoch entry queue.
Slot / epoch
- 12s slot, 32 slots/epoch (~6.4 min).
- Validator chosen via RANDAO per slot to propose block.
- Random subset (committee) attests per slot.
Casper FFG + LMD-GHOST
- LMD-GHOST (Latest Message Driven, Greedy Heaviest Observed SubTree): fork choice — picks the chain with the most weighted attestations.
- Casper FFG (Friendly Finality Gadget): every 2 epochs, 2/3+ validators justify → finalize. Justified parent + child = finalized.
Slashing
- Double signing (propose or attest 2 blocks in the same slot).
- Surround voting: attestation that envelops another.
Penalties: 1 ETH base + correlation penalty (more validators slashed simultaneously = higher penalty per).
Withdrawals (Shapella, 2023)
- Partial withdrawal: balance > 32 ETH excess auto-withdrawn.
- Full withdrawal: voluntarily exit (waiting queue).
- Address bound to validator (no re-routing).
Liquid staking
- Lido: ~30% of total ETH staked. stETH liquid token. Decentralization concern.
- Rocket Pool: decentralized; rETH; 8/16 ETH minipools.
- Coinbase, Binance: custodial liquid staking.
- Frax, Stader, Stakewise.
7. EIP-1559 (London, 2021)
Fee market reform:
- Base fee: algorithmically determined per block; burned.
- Priority fee (tip): paid to validator.
- Block target: 15M gas (half of 30M max).
- If block > target, base fee ↑ 12.5%; if < target, ↓ 12.5%.
Outcomes:
- Predictable fees.
- ETH deflationary in high-usage periods (burn > issuance).
- Pre-Merge: burn ~80 ETHday; post-Merge issuance only ~1700 ETHday vs 13000 pre.
8. EIP-4844 — Proto-Danksharding (Dencun, Mar/2024)
Blob transactions:
- New tx type (0x03).
- Carry blobs (each 128 KB).
- Max 6 blobs per block.
- Separate fee market (blobbasefee).
- Blobs stored ~18 days (4096 epochs); not in EVM state (cheap).
- KZG commitment scheme (Kate-Zaverucha-Goldberg) — cryptographic proof of inclusion.
Impact: L2 fees dropped ~10×. Optimistic + zk rollups posting calldata as blobs.
Full Danksharding (future): 64 blobs per block, sampling DA committee.
9. MEV
Maximal Extractable Value — profit from reordering, including, excluding txs.
Types
- Arbitrage: cross-DEX price differences.
- Liquidations: catch undercollateralized positions.
- Sandwich attacks: front-run + back-run vulnerable txs (Uniswap swaps).
- JIT (Just-In-Time) liquidity: add LP just for one tx, remove.
- Long-tail: NFT mints, oracle manipulation, etc.
Flashbots + mev-boost
Flashbots (Phil Daian et al. 2020) — research collective.
MEV-Boost (post-Merge): separates proposer from builder.
- Validators (proposers) run mev-boost.
- Builders construct optimal blocks (run searchers' bundles + own MEV strategies).
- Relays intermediate (Flashbots, Bloxroute, Eden, etc.).
- Validator picks highest-paying header (via relay).
~90% of Ethereum blocks via mev-boost.
Concentration concerns
Top builders (Beaverbuild, rsync-builder, Titan) dominate. Censorship — some relays comply with OFAC (post-Tornado Cash), filtering txs. Censored share ~50% post-2022; drops to ~25% via growth of non-censoring relays.
Inclusion lists (EIP-7805 FOCIL)
Proposer can force inclusion of txs in next block. Anti-censorship.
MEV mitigation projects
- CowSwap: batch auctions (no per-tx ordering exposure).
- MEV Share (Flashbots): partial reveal — searcher pays user for hint.
- Brink, Anoma: intent-based, MEV-aware.
- MEV Blocker: RPC that routes via private mempool.
10. Stats (May/2026 approx)
- Marketcap: ~US$ 600B.
- Daily txs: ~1.5M (mainnet) + 50M (combined L2s).
- TPS: ~15 sustained mainnet; effective with L2 ~1500.
- Validators: ~1M.
- Staked ETH: ~30%.
- ETH supply: ~120M.
- Cumulative burn rate: ~5M ETH burned since EIP-1559.
11. Roadmap
Vitalik's roadmap, updated (2022, 2023, 2024):
Merge ✅ (Sep/2022)
PoW → PoS.
Surge
Rollup-centric scaling. Status: EIP-4844 ✅; danksharding pending.
Scourge
MEV mitigation. PBS in-protocol, inclusion lists. Status: research → Pectra.
Verge
Verkle trees: replace MPT (Merkle Patricia Tree) for state. Smaller proofs (~200 bytes vs ~20 KB). Enables stateless clients. Pending — possible 2026-2027 fork.
Purge
History expiry: drop history > 1 year (EIP-4444). State expiry: prune inactive accounts. Pre-history removal: pre-Merge state simplification.
Splurge
Miscellany: account abstraction completion, EVM improvements (EOF — Ethereum Object Format), endgame.
12. Clients (multi-client diversity)
Execution Layer (EL)
| Client | Lang | Share approx |
|---|---|---|
| Geth (Go Ethereum) | Go | ~55% |
| Nethermind | C# | ~25% |
| Besu (Hyperledger) | Java | ~10% |
| Erigon | Go | ~7% |
| Reth (Paradigm) | Rust | ~3% (growing) |
Consensus Layer (CL)
| Client | Lang | Share approx |
|---|---|---|
| Prysm | Go | ~35% |
| Lighthouse | Rust | ~30% |
| Teku | Java | ~20% |
| Nimbus | Nim | ~10% |
| Lodestar | TS | ~5% |
Diversity matters: single-client > 1/3 → bug = correlated slashing risk. After notorious 2023 incidents with a Prysm bug affecting finality.
13. Developer ecosystem
Languages
- Solidity (default; C++-like syntax; ConsenSys + community).
- Vyper (Python-like; security-focused; fewer features).
- Yul (intermediate language; closer to opcodes).
- Huff (assembly-like, ultra-optimization).
- Fe (Rust-inspired, experimental).
Frameworks
- Foundry (Paradigm; Rust toolkit + Solidity-native test; dominant in 2026).
- Hardhat (Nomic; JS-based; popular legacy).
- Brownie (Python; declining).
- Truffle (legacy; sunset 2023).
Libraries
- OpenZeppelin Contracts: standard secure implementations.
- Solmate / Solady (Vectorized): optimized.
- PRBMath: fixed-point math.
- Multicall, Permit2, ERC-4337 reference.
Auditing
OpenZeppelin, Trail of Bits, ConsenSys Diligence, Cantina (formerly Spearbit), Code4rena (crowdsourced), Sherlock, Zellic, Halborn.
Indexing
The Graph (decentralized), Goldsky, Subsquid, Alchemy.
14. Ethereum Classic (ETC)
Fork resulting from the DAO bailout reversion (Jul/2016). Maintains the immutability principle.
- Marketcap: US$ 5B (1% of Ethereum).
- PoW Ethash + Etchash. 51% attack survivors in 2020.
- Marginal adoption; ideological holdout.
15. Cross-reference
- Crypto primitives:
../cryptography/05-assimetrica.md(secp256k1, BLS12-381),06-hash-e-mac.md(Keccak). - L2 scaling:
07-l2-scaling.md. - Smart contracts deep:
08-smart-contracts.md. - DeFi built on Ethereum:
09-defi.md. - DAO hack, Parity, Ronin:
14-incidents.md. - ETH tokenomics:
12-tokenomics.md.