RemNote Community
Community

Study Guide

📖 Core Concepts Ethereum – a public, permission‑less blockchain that runs smart contracts (self‑executing code). Ether (ETH) – native cryptocurrency; used to pay gas (execution fee) and as a reward for validators. Proof‑of‑Stake (PoS) – consensus model adopted on 15 Sept 2022 (“The Merge”). Validators lock ≥ 32 ETH to propose/attest blocks. Validator – any account that stakes ETH; randomly assigned to proposal or attestation slots in each 12‑second epoch (32 slots/epoch). Ethereum Virtual Machine (EVM) – deterministic, stack‑based runtime that executes bytecode. All nodes must produce identical results. Gas – unit measuring computational work; price set in gwei (1 gwei = 10⁻⁹ ETH). Transaction fee = gas used × gas price. Account types – Externally‑Owned Account (EOA) – controlled by a private key, can send ETH. Contract Account – holds bytecode & storage; created by deploying a smart contract. Token standards – ERC‑20 (fungible), ERC‑721 (non‑fungible), ERC‑1155 (semi‑fungible). Layer‑1 vs Layer‑2 – L1 = base Ethereum chain; L2 solutions (optimistic & zk‑rollups) inherit L1 security while boosting throughput. --- 📌 Must Remember The Merge → PoS, > 99 % energy reduction. Block time ≈ 12 s; ≈ 5 800 blocks per day. Staking requirement: ≥ 32 ETH (≈ $ \text{price}\times32$). Wei: $1\ \text{ETH}=10^{18}\ \text{wei}$. Gas price unit: 1 gwei = $10^{-9}$ ETH. EIP‑1559 (London fork) – transaction fee = base fee (burned) + tip (paid to proposer). Throughput: L1 theoretical max ≈ 238 TPS; typical ≈ 25 TPS. Merkle‑Patricia Trie stores the global state; enables compact proofs. Withdrawal of staked ETH → enabled by Shanghai‑Capella (“Shapella”) upgrade. --- 🔄 Key Processes Becoming a Validator Deposit ≥ 32 ETH into the official staking contract. Wait for activation → assigned a validator index. Each epoch (12 s × 32 slots) you may be chosen to propose a block or attest to the canonical chain. Block Proposal & Attestation Proposer assembles pending transactions from the mempool, executes them in the EVM, and publishes the block. Attesters broadcast signed attestations; the chain with the highest cumulative attestation weight becomes canonical. Transaction Execution (Gas Flow) Sender sets gas limit (max units) & gas price (gwei). EVM runs each opcode, deducting its gas cost. If gas runs out → transaction reverts, all state changes undone, but gas is still consumed. Unused gas is refunded to the sender. Deploying an ERC‑20 Token Write Solidity contract implementing totalSupply, balanceOf, transfer, approve, transferFrom. Compile → bytecode → send a deployment transaction (pay gas). Contract address becomes the token’s identifier; users interact via the standard interface. Layer‑2 Rollup Flow (Optimistic) User sends a transaction to the L2 sequencer. Sequencer aggregates many txs into a rollup block, posts a state root on L1. Challenge period → any party can submit a fraud proof; if none, L2 state is considered final. --- 🔍 Key Comparisons PoW vs PoS PoW: miners solve hash puzzles → high energy use. PoS: validators stake ETH → > 99 % less energy, rewards via block proposals. EOA vs Contract Account EOA: controlled by private key, can only send transactions. Contract: contains bytecode, can execute code on receipt of a transaction. ERC‑20 vs ERC‑721 vs ERC‑1155 ERC‑20: identical units, interchangeable (fungible). ERC‑721: each token has a unique ID (non‑fungible). ERC‑1155: single contract can manage both fungible and non‑fungible items. Optimistic Rollup vs zk‑Rollup Optimistic: assumes transactions are valid, uses fraud proofs; lower latency. zk‑Rollup: provides validity proof (SNARK) for each batch; higher on‑chain security, higher computational cost. Base Fee vs Tip (EIP‑1559) Base fee: algorithmic, burned, adjusts with network demand. Tip (priority fee): optional, paid directly to the block proposer. --- ⚠️ Common Misunderstandings “Gas is a separate cryptocurrency.” – Gas is just a unit of computation; fees are paid in ETH (usually quoted in gwei). “All fees go to validators.” – Since London, the base fee is burned; only the tip rewards the proposer. “Layer‑2 eliminates all security risks.” – L2 inherits L1 security, but bridges and fraud‑proof mechanisms can be attacked. “Ethereum’s block size is fixed like Bitcoin.” – Block size is dynamic, limited by a gas limit per block (≈ 30 M gas). “One ETH equals 1 billion wei.” – Correct conversion: $1\ \text{ETH}=10^{18}\ \text{wei}$. --- 🧠 Mental Models / Intuition Gas = fuel: just as a car needs gasoline to move, a transaction needs gas to execute EVM op‑codes. Validator = air‑traffic controller: they watch the sky (network state) and approve the next “flight” (block) safely. Merkle‑Patricia Trie = hierarchical address book: each leaf is an account balance; the root hash is a succinct proof of the entire state. Rollup = batch of parcels: many small transactions are packed together, the courier (L1) only sees the sealed box (state root). --- 🚩 Exceptions & Edge Cases Staked ETH withdrawals are only possible after the Shanghai‑Capella upgrade (post‑2023). Base fee can be zero during periods of extreme under‑utilization, making the tip the only paid component. Gas refunds occur for clearing storage slots (e.g., SSTORE from non‑zero to zero) but are capped at ½ of the total gas used. Slashing: validators lose a portion of their stake for double‑signing or prolonged inactivity; the exact penalty depends on severity. --- 📍 When to Use Which Token design: Use ERC‑20 for currencies, reward points, or any interchangeable asset. Use ERC‑721 for unique collectibles, NFTs, or property titles. Use ERC‑1155 when you need both fungible and non‑fungible items in one contract (e.g., game assets). Layer‑2 selection: Choose optimistic rollup for dApps tolerant of a 7‑day challenge period and wanting lower gas costs. Choose zk‑rollup when immediate finality and maximal security are required (e.g., high‑value settlements). Staking vs Holding: Stake if you plan to keep ETH long‑term and want passive rewards + network participation. Hold if you need liquidity or anticipate a near‑term price move (staking lock‑up limits withdrawals until Shanghai). Gas price strategy: During low network demand, set a low max fee (base fee + small tip). In congested periods, increase the tip to out‑bid others for faster inclusion. --- 👀 Patterns to Recognize High gas limit + low gas used → likely a contract call that aborts early (e.g., require‑statement failure). Many small ERC‑20 transfers in one block → typical DeFi activity (liquidity swaps, token distributions). Transactions with 0x data starting with 0xa9059cbb → ERC‑20 transfer(address,uint256) function selector. Sudden spikes in base fee → network congestion (e.g., after a popular NFT drop). State root changes without many transactions → a rollup batch posting a new root on L1. --- 🗂️ Exam Traps “The base fee is paid to the miner/validator.” – Wrong: it is burned; only the tip goes to the proposer. “1 ETH = 10⁹ wei.” – Wrong conversion; correct is $10^{18}$ wei. “All hard forks are backward‑compatible.” – Some forks (e.g., DAO fork) were hard forks that created a permanent chain split. “Layer‑2 rollups remove the need for L1 security.” – L2 security is derived from L1; compromising L1 compromises L2. “Any address with a private key is a contract.” – Only accounts that contain bytecode are contract accounts; EOAs have no code. “Gas refunds increase total gas used.” – Refunds reduce the net gas charged but cannot bring the final charge below ½ of the original gas used. ---
or

Or, immediately create your own study flashcards:

Upload a PDF.
Master Study Materials.
Start learning in seconds
Drop your PDFs here or
or