What is UTXO?

What is UTXO?

A simple analogy to explain UTXO

Unspent Transaction Withdrawal (UTXO) is a refund or otherwise change that the user receives in their account after each transaction and can spend in the future. This can be explained in more detail using an analogy.

For example, you have $45, but not one bill, as it does not exist. This means that you can have any combination of bills and coins of different denominations in your wallet:

  • Forty-five dollar bills;
  • nine $5 bills;
  • four $10 bills and one $5 bill;
  • two $20 bills and five $1 bills.

And so on. There are many more combinations that add up to $45, but the idea is clear. In each case, you have exactly $45, even though each scenario has a different number of different denomination bills.

The same is true for UTXO. Although you see a single balance when you log into your crypto wallet, it actually consists of multiple UTXOs. These UTXOs vary in size, but when summed up, are equal to the wallet's total balance.

Now let's continue our analogy. When you buy an item in cash, you cannot provide the exact amount of money needed to pay for it. For example, you buy a cup of coffee for $3.50. You have $45 in your wallet, but you don't have exactly $3.50 to pay for the coffee. Instead, you have to add up some bills and then get change. You can pay for the coffee with four $1 bills, in which case you get 50 cents back. Or you can give $20 and get $10, $5, $1 and 50 cents change.

The same thing happens when you send cryptocurrency. Let's say you have 740 coins and your total balance consists of 3 UTXOs: one UTXO of 320, the second 215 and the third 205. In order to make a payment, you need to combine two or three UTXOs into one whole transaction. Speaking of physical money, you can't pay for a $5 item by tearing a $10 bill in half, nor can you send half a UTXO to pay - you have to send the entire UTXO and then get change.

Let's imagine that you want to send 30 coins to a friend. To complete the transaction, you need to send one of your UTXOs (320, 215 or 205). Your friend will receive his UTXO of 30 coins and you will receive a new, smaller UTXO of 290, 185 or 175, depending on which UTXO was sent.

What happens if you want to send your friend 350 coins? Essentially the same thing happens, except this time you will need to send two full UTXOs to complete the transaction. Your friend will still receive the 350 coins, and you will receive a new UTXO in return (coins 70, 175, or 185, depending on which two UTXOs were sent to complete the payment).


The value of UTXO

UTXO implementation makes blockchain accounting methods much simpler. Instead of monitoring and "canning" each individual transaction, unspent coins must be tracked. After all, each coin on the blockchain network can only be used once, which means if a user has coins available, therefore:

  1. he got it as a reward for mining;
  2. it's the residue from previous transactions.

UTXOs are crucial in the fight against double-spending - they prevent you from spending coins that do not exist. Network nodes form and maintain a database that contains all UTXOs (i.e., unspent money) available for use. If you try to send a transaction with a coin that is not in this database, the nodes recognize it as fraudulent and reject it.


Wrapping up the review

UTXO technology is used in the Bitcoin network, but there are many other cryptocurrencies that implement UTXO, including Bitcoin Cash, Lightcoin, Komodo and many others.

There are also cryptographic systems that use other accounting algorithms. For example, Etherium has account-based transaction control. This method saves space and has simpler code to work with, but it reduces transaction privacy and threatens future scalability issues.

Read more about Crypto with Finance Guider

Related Articles

EOS cryptocurrency
EOS cryptocurrency
Article posted8/30/2022Article categoryCryptocurrency
Learn more