Roadmap › Blockchain & Web3 Fundamentals › Module: Ethereum in Depth
Lessons in this course (15)

5. Accounts, transactions, gas and fees

Intermediate★ Must knowLesson 5 of 15

Accounts:

  • EOA (Externally Owned Account) — controlled by a private key; has balance and nonce; initiates transactions.
  • Contract account — has code and storage; runs only when called; no private key.
  • Smart accounts (account abstraction, ERC-4337; EIP-7702 since Pectra) — programmable wallets: social recovery, batched calls, paying gas in tokens (paymasters), session keys.

Gas: every EVM operation costs gas (a unit of computation). A transaction specifies a gas limit. Since EIP-1559 (2021):

fee = gasUsed × (baseFee + priorityTip) — the base fee is set by the protocol per block (rises when blocks are full) and is burned; the priority fee (tip) goes to the validator. Users set maxFeePerGas and maxPriorityFeePerGas. Unused gas is refunded; if gas runs out, the transaction reverts but the fee is still paid.

A simple ETH transfer costs 21,000 gas. Nonce — per-account counter preventing replay and ordering transactions.