Original English text: https://www.nervos.org/knowledge-base/utxo_vs_account_based
The UTXO model and the account model are the two most popular accounting methods in the blockchain world. The two models are fundamentally different in how transactions are processed and recorded on the blockchain.
In a nutshell, the UTXO model works like a cash transaction, while the account model works like a bank account.
How the UTXO model works
UTXOs work like cash, where each UTXO is like a unique note that the user can spend. In a UTXO model blockchain, each user can track their balance by adding the cryptocurrencies they own.
For example, suppose a person named Bob goes to a fast food restaurant and buys a $10 burger. However, he only had a $20 bill, which meant that when he paid for his burger, the restaurant had to give him a $10 bill as change.
In a UTXO-based blockchain, a $20 bill and a $10 change would be represented as two separate UTXOs. So, in Bob's case, his cryptocurrency account balance is just the sum of the UTXOs he owns, just like his physical wallet is just the sum of all the different denominations of banknotes he puts into his wallet.
Therefore, in UTXO-based blockchains such as Bitcoin, there is no concept of identity, only UTXO or “unspent tokens” associated with different wallet addresses. The key point here is that the Bitcoin protocol does not track user balances, but rather UTXOs and which addresses those UTXOs belong to.
How the account model works
The account model is an accounting method currently used by more blockchains. The account model was originally derived from the Ethereum blockchain and is now used by many other blockchain projects to record transactions and state changes.
The accounting method of the account model is similar to that of a bank account, and the transfer record is represented by the balance changes of the transferor and the payee in the bank account. For example, when Alice transfers $10 to Bob, the bank deducts $10 from Alice's account balance and adds $10 to Bob's account balance.
The same is true for blockchains based on the account model. The difference is that the distributed ledger recording user balances is maintained by many nodes (full nodes). The key point here is that the account-based blockchain does not track tokens, but rather the balance changes in user accounts. In this model, there is the concept of identity, where users are typically associated with a blockchain account or address.
The main differences between UTXO model and account model
When comparing the advantages and disadvantages of the UTXO model and the account model, you need to pay attention to several differences between them, which exactly reflect the characteristics of the two models.
For example, in the UTXO model, cryptocurrency wallets usually generate new addresses for each user's transaction, which makes it difficult for third parties to track or link transactions to an individual. This feature of the UTXO model provides a higher level of privacy than the account model, because in the account model, it is easier to associate an account with an individual through transparent account balances.
In addition, the UTXO model naturally supports parallel transaction processing, that is, processing many blockchain transactions at the same time, thereby improving efficiency and throughput. This is in sharp contrast to the account model, which can only process transactions sequentially, or linearly one after the other.
Transaction parallel processing is particularly useful in situations of high transaction volume, as it allows the network to accommodate more transactions per second to meet growing demand. In addition, it also helps shorten transaction confirmation times, speed up response times, improve efficiency, and improve resource utilization.
On the other hand, blockchains based on the account model are generally considered to be more programmable, or more suitable for smart contracts, than blockchains based on the UTXO model. This is because the blockchain based on the account model is stateful, allowing for more complex interactions between users' accounts and smart contracts, and it is easier for developers to create programmable logic and build complex decentralized applications. In other words, the account model is generally easier for developers to use because transactions resemble direct transfers between accounts or function calls to smart contracts, closer to traditional programming paradigms.
summary
All in all, the difference between the UTXO model and the account model stems from the different ways in which they manage transactions and status. The UTXO model provides greater privacy and can process transactions in parallel, with a focus on tracking UTXOs. The account model simplifies transactions by maintaining the global state of accounts and balances, making it easier for developers to develop and more suitable for smart contracts and complex applications.
Understanding the nuances between these models is critical for developers, users, and stakeholders to make informed decisions when building or participating in a blockchain ecosystem.
#CKB #BTC #Nervos #blockchain


