Lecture
Account Model vs UTXOs
- Compare and contract the account model with the UTXO model which was popularized with Bitcoin.
Slides
Ch1.4 Overview
Account Model vs UTXO Model
Account model (Ethereum) :
- A global mapping of
accounts -> balances
- Sends reduce one account’s balance and increase another account's balance
- Easy to understand
- Easy to count and measure (wallets, dApps, etc...)
- Allows for double spends and replay attacks if you're not careful
UTXO model (Bitcoin)
- Every send must include the entire account balance.
- Sends can specify multiple recipients.
- Sends can originate from multiple senders.
- Transactions depend on a specific set of unspent outputs (thus double spends are impossible because once spent there's new UTXOs and old ones are invalid)
- Because double spends are impossible and dependencies are explicit, ordering does not matter so transactions can be processed in parallel
- Can be complex to create wallets and infrastructure around this architecture
Neither the Account model or the UTXOs model are privacy preserving on their own! Just because the numbers/letters of addresses look funny to you does not mean that a computer programmer, crypto-currency exchange, or data scientist can't trace blockchain addresses to real world identities. The only purely private way to send transactions is with a cryptocurrency that uses zero knowledge proofs like (zcash).
Recommended Resources
- Blockchain in JS - A Bitcoin style interactive blockchain demo by nambrot (tutorial to build your own)
- UTXOs on Substrate - A walkthrough on what UTXOs are and how you would replicate a UTXO network on an account based network like Substrate. (tutorial to build your own)
- UTXO Stats - Visual statistics on the UTXOs in the Bitcoin blockchain.
- BitBonkers - Abstract (yet awesome) visualization of the Bitcoin blockchain in real time.
- BitInfoCharts Bitcoin history visualization - Displays Bitcoin UTXOs on a timeline, showing how they "jump" from one point to another.
- More Bitcoin Visualizations - Because you can never have too many visualizations :)
- Etherscan - Ethereum uses an account model, so just click on any transaction to see the history of the account that sent it.