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)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)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
I find it interesting that the lightning network uses an account model even though it is built on top of the utxo model
Each channel is just one utxo but it does not "act like" a utxo while the channel is open. Instead, like on ethereum, if you send someone money via lightning, your lightning channel just has less money in it now. Well, technically that money is still in there, but your "account" is just your "side" of the channel, and your money is not on that side anymore
It's neat that the utxo model is powerful enough to emulate the more familiar account model on a second layer
One could also make the argument that LN is a proof-of-stake layer. The more capital you lock in with other nodes (and vice-versa), the more likely you are to 'validate' payments.
Yep. Well, I mean, there is a difference. Lightning certainly involves staking assets, but lightning nodes aren't network-level validators. They only validate to secure their own ability to unilateral exit, not to secure other people's money
It's possible to *have* stake without being a proof-of-stake *system*
I prefer the UTXO model
here's a good overview on why UTXO scales differently compared to account-based models
view on x.comThanks!
https://xcancel.com/MarvinDefi/status/1872746208198049990
xcancel doesn't seem to be loading today.
Great resource. I have been trying to explain UTXO management to my cousin who I convinced to buy a chunk of his first bitcoin on Christmas Day!