Skip to the workspace
Pebellslearn by building
Types of Blockchains  ›  Capstone Project

The Account Model and the EVM

EVM-Based 15 minAccount-based chains keep one shared state of balances per address, ordered by each sender's nonce, and EVM-based chains all run contract code on the same Ethereum Virtual Machine.

blockchain / The Account Model and the EVM

Explore each scene at your own pace.

01 · The rule

The rule

The Account Model and the EVM

On Ethereum, Asha's 8 coins really are one line in a table: her address, balance 8. Paying Ravi 6 subtracts from her row and adds to his, much like a bank account. This account model swaps UTXO's purse of notes for one shared state, and that shared state is what makes general-purpose smart contracts natural.

The rule

Accounts edit one shared state; the nonce keeps each sender's order.

Every account has:

  • a balance;
  • a nonce, which counts the transactions the account has sent;
  • for contract accounts only, code and storage.

There are two kinds of account. Externally owned accounts are controlled by a private key; these are people's wallets. Contract accounts are controlled by their code.

Each transaction from Asha must carry her next nonce. If her last one used nonce 7, the next must use 8. This orders her transactions and stops replay: a copy of an old signed transaction carries a nonce that is already used, so it is rejected.

The EVM. The Ethereum Virtual Machine is the engine every Ethereum node uses to run contract code, step by step, with identical results everywhere. Many other chains run the same EVM, including Polygon PoS, BNB Smart Chain, Avalanche's C-Chain, Gnosis Chain, and rollups such as Arbitrum, Optimism and Base. They are called EVM-compatible: the same contract code, tools and address format work on all of them, though each is a separate network with its own state and its own security.

Other account-based designs use different engines. Solana runs programs in its own runtime, and the TON family of chains (TON, Everscale, Venom) uses the TVM, in which every account is a contract and accounts interact by sending each other messages.

UTXO (Bitcoin, Cardano) Account (Ethereum, EVM chains)
Balance Sum of unspent outputs A number stored in the state
Spending Consume outputs, create new ones Subtract from one account, add to another
Replay protection Each output can be spent only once The nonce
Smart contracts Limited, or through extensions such as eUTXO Built in, with shared storage
Scene 1 of 5
Hover to wake the cannons. Drag to move, or use arrow keys when focused. Press Enter to fire a shot.