Pebellslearn by building
0%
RoadmapsMatrixCoursesSandboxSign in
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.

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

The shortcut

Place any chain with three questions: Ledger model? UTXO or accounts. Consensus? Work, stake or BFT voting. Execution? Which engine runs its contracts.

Placing four chains on three axesStep 1 of 4
  1. Bitcoin

    UTXO ledger, proof of work, and a deliberately limited scripting language.

The trap is reading "EVM-compatible" as "the same network". The code runs the same way, but the state, the validators and the security are entirely separate.

Drills

Answer fast — trust the rule.

quick drill

Asha's last confirmed transaction used nonce 7. Which nonce must her next one use?

quick drill

Which kind of account is controlled by code rather than by a private key?

quick drill

What does "EVM-compatible" mean for a chain?

quick drill

An attacker rebroadcasts one of Asha's old signed transactions. Why does it fail on an account-based chain?

Remember

  • Accounts edit one shared state; the nonce keeps each sender's order.
  • Shortcut: place any chain by ledger model, consensus and execution engine.
  • Trap: EVM-compatible means the same code runs, not the same network, state or security.

Practice — level up

0/1 solved

Write your answer, then compare it with a rubric and a model answer.

ExplainTwo ledgers, one payment

Compare how Asha pays Ravi 6 from her 8 coins on a UTXO chain and on an account chain. Explain how each model stops her spending the same coins twice, and why the account model suits general-purpose smart contracts.