0.8 Account based model

Ethereum’s Account-Based Model

Ethereum operates on an account-based model, distinguishing itself from what we've seen before with Bitcoin’s UTXO model. This system resembles traditional banking, where accounts hold balances and facilitate transactions. There are two main types of accounts:

Externally Owned Accounts (EOAs) function similarly to personal bank accounts and are controlled by private keys. Users rely on EOAs to send transactions and interact with smart contracts. Contract Accounts, on the other hand, store smart contract code and execute predefined logic when triggered by EOAs or other contracts.

Every account maintains a balance of Ether (ETH), Ethereum’s native cryptocurrency. Transactions between accounts alter the blockchain state, enabling seamless interactions within the network.

Ethereum’s account-based model operates by maintaining global account states that update upon every transaction. Unlike Bitcoin’s UTXO model, which tracks individual unspent outputs, Ethereum records the latest state of each account, allowing for efficient transaction execution and smart contract interactions.

How Accounts Store Data

Each Ethereum account consists of:

  • A unique address that identifies the account on the network.

  • A balance reflecting the amount of Ether held.

  • A nonce, which counts the number of transactions sent to prevent replay attacks.

  • Storage (for contract accounts only) containing smart contract data.

Benefits of the Account-Based Model

One key advantage of Ethereum’s model is its simplicity in handling transactions. Since accounts maintain a direct record of balances, smart contracts can operate more fluidly compared to Bitcoin’s UTXO model, which requires tracking multiple inputs and outputs. This streamlined approach enhances programmability, making Ethereum the preferred platform for decentralized applications.

Additionally, Ethereum’s account model enables better composability between smart contracts. Multiple contracts can interact within a single transaction, allowing for complex financial operations such as DeFi lending and multi-signature wallets.

Security and Challenges

Despite its efficiency, the account-based model introduces certain security risks. Since balances are mutable, accounts are more vulnerable to state-based attacks, such as reentrancy attacks. Developers must implement rigorous security measures, such as checks-effects-interactions patterns, to mitigate these risks.

Another challenge is scalability. With every transaction modifying the global state, network congestion can increase, leading to higher gas fees and slower transaction times. Ethereum’s ongoing upgrades, including Layer 2 scaling solutions, aim to address these limitations by optimizing state management and transaction throughput.

In the next chapter, we will get into the key tools mathematicians came up with to introduce privacy to decentralised ledgers.

Last updated