Translated by LC
- Today’s blockchain networks use two types of record-keeping models: the UTXO model and the Account/Balance model.
- Bitcoin uses the UTXOs as the inputs of every transaction. In the real world, the UTXOs are almost similar to cash.
- Ethereum, on the other hand, uses the Account/Balance model, which is similar to a bank account or debit card.
Today’s blockchain networks use two types of record-keeping methods, which are Bitcoin’s UTXO model and Ethereum’s Account/Balance model. The difference between the two models lies in the way the blockchains perform transactions. In this article, we will explore why the two most well-known cryptocurrency platforms, Bitcoin (“electronic cash”) and Ethereum (“smart contract platform”), utilize different ledger models.
UXTO Model in Bitcoin
UTXO means “Unspent Transaction Output,” a technical term for the amount of digital currency that remains unspent after a transaction. In UTXOs, a transaction output is recorded as a Directed Acyclic Graph (DAG) for ledger keeping.
Assume A wants to transfer 1.5 BTC to B, and A has a single UTXO worth 10 BTC (we excluded the TX fee in this example for simplicity). The transaction A creates consumes A’s previously unspent transaction output, 10 BTC, as an input. To send 1.5 BTC to B, A creates two outputs, one for paying B (1.5 BTC) and another for returning the excess money (8.5 BTC) to a self-controlled address. The 1.5 BTC that B received is recorded to B’s address along with other existing UTXOs. When B checks the balance, B can check the total of all UTXOs in its address. (See the example below)
It is similar to cash. Compared to cash, if a user has $50, he might hold a single $50 bill or a combination of smaller denominations. If a user pays $15 using a $50 bill, he will receive three $10 bills and a single $5 bill, and these outputs in the transaction are the UTXOs. However, there is a crucial difference between a cash payment and the UTXO model: Cash exists in defined and discrete denominations ($1, $5, $10 bills, and so on), whereas the transaction outputs in the UTXO model can have arbitrary values (e.g., 2.35 BTC).
Why does Bitcoin employ the UTXO model? The UTXO model allows Bitcoin nodes to efficiently verify every transaction on the blockchain. When a node receives a transaction, either in the mempool or as part of a block, it can verify whether the UTXOs being spent are valid and unspent. This ability enables Bitcoin to solve the double-spend problem without relying on trusted third parties. Partitioning a blockchain into shards or employing layer 2 solutions is also easier using the UTXO model, allowing parallel processing capacity across multiple addresses.
On the other hand, the UTXO model contains its shortcomings. It has certain restrictions that make it hard to build applications on the blockchain and incompatibility with smart contracts. Consequently, the Ethereum ecosystem that uses smart contracts to perform complex transactions chose the Account/Balance model of the UTXO model. Next, we will look into the Account/Balance model created to overcome the drawbacks of UTXOs.
The Account/Balance Model in Ethereum
While Bitcoin’s UTXO model is similar to cash, the ledger of Ethereum is just like that in a bank, an analogy using an ATM/debit card. The Account/Balance model represents assets as balances within accounts, much like bank accounts. Assume A has 10 ETH and wants to transfer 1.5 ETH to B. A’s wallet will create a transaction that defines the spending account, the receiving account, and the amount to transfer. When the system transitions to a new state (n+1) with the next block, A’s balance will globally be reduced to 8.5 ETH, whereas B’s balance will have 1.5 ETH added. (See the example below)
The Account/Balance model has two different types of accounts. The first type is the private key-controlled user accounts and the other is the smart contract accounts. Deploying a smart contract leads to the creation of a code controlled account, and smart contracts can hold funds themselves.
Account-based systems are better suited for the deployment of smart contracts. They also offer storage benefits because the account’s state and transactions are smaller. The Account/Balance model is also employed by Solana, Avalanche, and many other smart contract platforms.
On the other hand, there are several disadvantages associated with the Account/Balance model. First, the account model’s code semantics are too complicated, making the cost for smart contract deployment expensive. Another weakness is the high transaction fee, as a fee must be paid for creating or using the smart contract account. Additionally, the Account/Balance model is plagued with the security issue of the smart contract itself. Unlike the UTXO model, computations are required to complete the state transition in the Account/Balance model, which indicates that vulnerabilities in the smart contract code may incur calculational errors. To sum up, Bitcoin’s UTXO model is more secure than Ethereum’s Account/Balance model.