UTXO vs Account Models

SVG Image

Tracking user balances in decentralized networks relies on two models:

  1. Account Model (Ethereum): Tracks balances like a bank ledger (simple and intuitive).
  2. UTXO Model (Bitcoin): Tracks specific unspent outputs from transactions (complex but powerful)

1. Account Model (Like Your Bank Account)

Think of this like a simple bank statement:

Example:

  • Alice has 100 ETH
  • Alice sends 30 ETH to Bob
  • Result: Alice now has 70 ETH, Bob has 30 ETH
ProsCons
Simple to understandLess private
Works well with smart contractsCan be vulnerable to replay attacks

2. UTXO Model (Bitcoin's Approach)

Think of UTXOs like individual bills in your wallet:

Example: Bob has three "bills" (UTXOs):

  • One 5 BTC UTXO
  • One 3 BTC UTXO
  • One 2 BTC UTXO

To spend 7 BTC, Bob has multiple options:

  1. Use the 5 BTC and 3 BTC UTXOs and receive 1 BTC back as 'change' (a new UTXO).
  2. Alternatively, use the 5 BTC and 2 BTC UTXOs without needing any change.

Key Points:

  • UTXOs can only be spent once (like using a paper bill)
  • Each transaction creates new UTXOs
  • Your balance is the sum of all your unspent UTXOs
ProsCons
Better privacyMore complex to understand
Prevents double-spendingHarder for complex applications
Parallel transaction processingRequires UTXO management

3. Comparing Models

FeatureAccount ModelUTXO Model
BalancesTotal balance (e.g., 10 ETH)Collection of UTXOs (e.g., 2, 3, 5 BTC)
Ease of UseIntuitiveComplex
PrivacyLimitedHigh if new addresses used
DesignFlexible for smart contractsStateless, simple transfers
Suggest Edits