Tracking user balances in decentralized networks relies on two models:
- Account Model (Ethereum): Tracks balances like a bank ledger (simple and intuitive).
- UTXO Model (Bitcoin): Tracks specific unspent outputs from transactions (complex but powerful).
1. Account Model (Like Your Bank Account)
The account model is similar to a simple bank statement:
Example:
- Alice has 100 ETH.
- Alice sends 30 ETH to Bob.
- Result: Alice now has 70 ETH, and Bob has 30 ETH.
Pros | Cons |
---|---|
Simple to understand | Less private |
Works well with smart contracts | Can be vulnerable to replay attacks |
2. UTXO Model (Bitcoin's Approach)
The UTXO model is like managing individual bills in your wallet:
Example:
Continue reading https://bitcoindevs.xyz/decoding/utxo