Unspent Transaction Output (UTXO) Meaning
What is Unspent Transaction Output (UTXO)?
An Unspent Transaction Output or UTXO is an unused or leftover cryptocurrency in a transaction. Every crypto transaction consists of an input and an output. Every time a transaction is executed, the input is deleted and the output is generated. Any output that is left behind and is not spent immediately is an Unspent Transaction Output that can be later spent in a new transaction.
UTXOs function similarly to cash transactions, where you must use the entire amount and receive any remaining balance as change. For example, if you want to purchase a book that costs $20 but only have a $50 bill, you must use the entire $50 bill and receive $30 as change. Similarly, in the world of cryptocurrency, you cannot send a specific amount from a UTXO.
For instance, Bob wants to send someone (say Alice) 2 BTC, but only has a UTXO worth 5 BTC in his wallet. He must send the entire UTXO to Alice and then receive the remaining 3 BTC as “change” in a new, smaller UTXO. This process is handled by the blockchain protocol and does not require trust on the recipient to return the change.
In blockchain network, the transaction will create:
- 2 BTC – Sent to Alice.
- 2.99 BTC – Returned back to Bob.
- 0.01 BTC – Miners fee for processing the transaction.
Why Does UTXO Matter?
The UTXO model is an important part of tracking token supply in a given network, as well as transaction verification. It cannot be executed without the verification of its owner, which helps prevent scams or fraud. Every UTXO transaction is linked with a personal digital signature and the owner needs to provide it to confirm the ownership of the UTXO while using it as an input for a new transaction.
Difference Between UTXO and Account Balance Model
UTXO and Account Balance Models are two different ways to track funds and transactions; Bitcoin uses UTXO, while Ethereum uses the Account Balance Model.
Bitcoin is based on the UTXO blockchain model where a transaction is divided into different parts – inputs and outputs. The user’s wallet balance keeps track of all the UTXO transactions.
Ethereum is based on the Account/Balance model. This model ensures that the account balance is large enough or at least equal to the transaction amount to be spent.
In general, most developers consider the UTXO model to be more secure and it requires less storage compared to the Account/Balance model, which needs more storage for big blocks of data.