freecoding.school100% FREE · NO SIGNUP
Ledger LandISSUE #25 of 90

ethereum · accounts vs utxos

BlockyVSDouble-Spend Dan
Blocky saysEthereum uses an account model with two types: externally-owned accounts and contract accounts.

Unlike Bitcoin's UTXOs, Ethereum tracks balances per account. Externally-owned accounts (EOAs) are controlled by a private key (users/wallets). Contract accounts are controlled by their code — they have a balance and storage and run logic when called. A transaction from an EOA can move ETH or invoke a contract, which may call other contracts in turn.

Power-ups you unlock

Double-Spend Dan attacks — common mistakes

Boss battleDistinguish an EOA from a contract account by what controls each.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>EOA      → controlled by a private key (a user)
contract → controlled by its code
both have a balance; contracts also have storage</pre></body></html>
▶ Open the interactive comic issue
‹ Ethereum · The Programmable ChainEthereum · Gas · Units Of Compute ›