Typefully

Account Model vs. UTXO Model

Avatar

Share

 • 

3 years ago

 • 

View on X

With modern multi-threaded processors, Ethereum's sequential txn processing is highly undesirable and has proven to be a scalability bottleneck. The UTXO model solves this by allowing blockchains to execute txns parallelly & increasing txn throughput. 🧵 ↓
To understand the UTXO model, let's first learn about the Account Model that Ethereum uses for executing transactions.
✨Overview of the Account Model✨ The Account Model represents any assets in a wallet as Balances within accounts. Example: if Bob's wallet has 5 ETH, and he sends Alice 1 ETH, the account model simply debits 1 ETH from Bob's account & credits 1 ETH in Alice's account.
The Account Model works exactly how banks process transactions. If you have $100 in your bank account today, and you send someone $50, a Bank would simply reduce that amount from your account & add it to the recipient's account.
The Account Model doesn't have a mechanism for determining and handling transaction interdependencies. Hence, all txns must be processed sequentially.
✨The UTXO Model✨ UTXO stands for unspent txn output & refers to the amount of tokens that remain after a txn. In the UTXO model, if Bob holds 10 BTC, it could mean either he has a single UTXO of 10 BTC or multiple smaller UTXOs that all add up to 10 BTC.
This is pretty similar to a physical wallet. I can say I have $100 right now in my wallet. But it could mean that I have a single $100 bill or multiple smaller dollar bills of $10, $20, and/or $50 bills that all add up to $100.
Now, I want to go watch a movie. I buy a ticket to the latest Marvel movie, and it costs $15. How can I pay them? I can either give them a $20 note and get back $5 change, or I can give them 2 notes: $10 & $5. ✨That is how txns are processed in the UTXO model.✨
Now, since Bob holds 10 BTC (let's say, a single UTXO of 10 BTC), And he wants to send Alice 4 BTC. In the UTXO model, this txn creates two outputs: 1️⃣ an output of 4 BTC sent to Alice, 2️⃣ and a change output of 6 BTC sent back to Bob (minus some gas fee, of course).
Similar to these usual coin UTXOs, there are contract UTXOs. With the contract UTXO, smart contracts whose UTXOs are spent in the same transactions can interact with each other simultaneously.
The UTXO model provides a strict state access list. In this access list, each txn specifies which contracts the txn may interact with, and if the txn attempts to access a smart contract that is not in the access list, it gets reverted.
Using this strict state access list, txns that have no interdependency can be executed in parallel. Modular Execution Layers like @fuel_network bring parallel txn execution to Ethereum using the UTXO model & help scale Ethereum to achieve the highest flexible throughput.
✨In a nutshell:✨ Account Model is like sending payment from one bank account to another. UTXO model is like paying a cashier with physical dollar bills. UTXO model allows blockchains to utilize all CPU cores & execute txns in parallel by maintaining a state access list.
Also, please consider subscribing to my blog & get content like this delivered right into your inbox. ⬇️ cryptoshuriken.com/#/portal/
Avatar

Akshay

@cryptoshuriken

Social Media Manager @Impact3Growth / Helping crypto brands & KOLs go viral / Memecoin degen