Trusted

What Is Unspent Transaction Output (UTXO)?

9 mins
Join our Trading Community on Telegram

Unspent transaction output, or UTXO, is a term or acronym you’ve likely encountered within blockchain ecosystems. But what does it mean, and why is it important?

This article will explain what an unspent transaction output is, how it works, and provide examples to illustrate the concept.

What is unspent transaction output (UTXO)?

What Is Unspent Transaction Output (UTXO)?

Unspent transaction output, or UTXO, refers to the unused outputs of a transaction

The outputs of a cryptocurrency transaction are “unspent” until they are used as inputs in another transaction. Unspent transaction outputs are a crucial part of the cryptocurrency ecosystem, used to track ownership of funds on multiple blockchains.

Unspent transaction outputs are the equivalent of “change/balance” in a fiat currency purchase. 

Let’s say you have a bitcoin balance of 1 BTC and want to buy something that costs 0.1 BTC. You would send 0.1 BTC to the seller, and the remaining 0.9 BTC would be your UTXO. You can then use this unspent transaction output to make more purchases or transfers in the future.

The blockchain stores all the UXTOs. Anyone can view them. Each has a unique identifier known as an “outpoint.” The outpoint is the hash of the previous transaction and the index of the output within that transaction.

Users who want to create a new transaction select one or more UTXOs to consume as inputs. For instance, you might have two UTXOs worth 2 BTC and 4 BTC left over from a previous transaction on the Bitcoin network. You buy an item worth 4.5 BTC, so you must send both to cover the bill. The transaction is complete when you receive “change”: a new UTXO worth 0.5 BTC.

The sum of the UTXOs must be equal to, or greater than, the amount being sent, plus any transaction fees. Once a transaction consumes a UTXO, it cannot be reused.

Each UTXO has its unique address. This ensures coins are not spent twice. You typically see two addresses when you receive a UTXO after a transaction. One is for the recipient and one for the change address. The change address is where your leftover UTXO is sent.

How is a UTXO created?

When users make a transaction on a blockchain that utilizes the unspent transaction output model, a new UTXO is created. This unspent transaction output is an output of a previous transaction. The UTXO is then used as input in a new transaction.

For an unspent transaction output to occur, there must first be an input. An input is simply a reference to an existing UTXO which can be used in a transaction. The UTXO that is being referenced is then spent, and a new UTXO is created in its place. Outputs can be thought of as the recipient of a transaction. They specify how many coins the recipient will collect and can only be spent by being referenced in future inputs.

How do UTXOs work?

How unspent transaction output model works

Various blockchains use the unspent transaction output model to track who owns what coins. When someone sends bitcoin to another person, they send one or more bitcoin UTXOs to the recipient’s public key. The recipient can then use those UTXOs as input for their concurrent transactions.

UTXOs are stored on blockchains and can be thought of as being analogous to physical coins. If you have a physical coin, you can spend it by giving it to someone else. Once you’ve given it away, it ceases to be yours, and you can’t spend it again. Once you’ve used a UTXO in a transaction, it is no longer stored in your wallet. Instead, it is now on the blockchain as part of that transaction history. If there is a remaining balance from the transaction, you will receive this as a new UTXO.

UTXO example

To understand how this works, let’s look at an example. Let’s say Alicia wants to send Bob 3 BTC. She opens her Bitcoin wallet and has UTXOs available.

These are 2 BTC from an earlier transaction, where Alicia received 2 BTC. She has another 1.5 BTC from a different transaction, where she had received 1.5 BTC.

To send Bob 3 BTC, Alicia must use both of these UTXOs as input.

When the transaction is complete, there will be two outputs. First, Bob will receive 3 BTC. He now has a new UTXO worth 3 BTC which he can use to complete future transactions. The difference between the total input value (3.5 BTC) and the amount Alicia sent (3 BTC) will be 0.5 BTC. This amount is then sent back to Alicia as a new UTXO. She can use this to complete future transactions.

UTXO blockchains also have the option of consolidation to avoid the complexity of using multiple unspent transaction outputs in a transaction. Here’s how it works.

What is UTXO consolidation?

Unspent transaction output consolidation combines multiple UTXOs into a single output: to reduce fees or increase privacy.

As illustrated above, you need to include all your UTXOs as inputs when you make a transaction. Therefore, the more UTXOs you have, the more inputs you’ll need, and the higher your transaction fees will be. By consolidating your UTXOs, you can reduce the number of inputs and save on fees.

Unspent transaction output consolidation also enables the creation of smart contracts. By consolidating multiple UTXOs into a single output, it’s possible to create an output that can only be spent if certain conditions are met. This allows the creation of escrow contracts, for example.

There are two main ways to consolidate UTXOs: manual consolidation and automatic consolidation

Manual consolidation involves creating a new transaction with your desired UTXOs as inputs and then sending the entire amount to yourself in a single output. 

Automatic consolidation involves your wallet periodically creating new transactions that combine multiple UTXOS into a single output. This consolidation occurs automatically and without input from you.

UTXO consolidation is a great way to save on transaction fees, especially if you’re an active Bitcoin user. Check with the provider if you’re unsure whether your wallet supports it. Or, look for an unspent transaction output consolidation option in the wallet’s settings menu.

Why are UTXOs important?

UTXOs important

Other reasons unspent transaction outputs are important:

  • Language-agnostic smart contracts: UTXO-based smart contracts provide a language-independent solution that allows smart contracts to develop their consensus mechanisms.
  • Preventing double spending: A UTXO can only be spent once. This is essential to blockchain technology, which guarantees that the same cryptocurrencies cannot be spent more than once.
  • Support for atomic swaps and decentralized exchanges: UTXO implementations of atomic swaps are a great way to enable peer-to-peer trades without involving a third party. The atomic swap feature in UTXOs is better for direct cryptocurrency exchanges between user wallets.
  • Scalability benefits: UTXO’s transactional mechanisms ensure that each transaction is processed as a separate event, greatly reducing the computational load on cryptocurrency networks.
  • Privacy and security: New addresses are created for every UTXO transaction, which makes them difficult to trace. This promotes privacy and security in a blockchain network.
  • Flexibility: Unspent transaction output is more flexible than the average fiat currency since they do not come in pre-determined values. Instead, they can be broken down into any amount, making them suitable for different transactions.

Benefits of the model

The unspent transaction output consolidation model has several benefits over other models.

First, it is much more scalable. The number of transactions processed per second is limited only by network speed.

The next key-value advantage is privacy. In this model, new addresses are generated for every transaction, making it almost impossible to trace the origin of these transactions. 

Another advantage is that UTXOs make authentication easier because each one can be traced back to an input. This becomes useful for identifying any possible double-spends that may occur.

Furthermore, the model makes it possible to have off-chain transactions that are still secure and verifiable on a blockchain network, For example, to increase scalability and privacy. 

Lastly, the model allows for certain types of smart contracts (language-agnostic smart contracts) that cannot work with other models.

Disadvantages of the model

There are a few disadvantages to the UTXO model.

First, the model can lead to higher transaction fees because each UTXO must be individually signed.

Secondly, UTXO can lead to “dust” accumulations. Dust is small amounts of coins that cannot be spent because they are less than the minimum transaction amount. However, over time, dust can add up and become spendable again.

Finally, UTXOs are not very space efficient. Each represents a separate output from a transaction, and each output must be stored separately. This can quickly create significant data storage requirements, especially for applications dealing with many transactions.

Unspent transaction output model vs. account model

vs. account model

The unspent transaction output model differs from the account-based model used by banks and some blockchains. In the account-based model, all your transactions are tracked in the account balance. With the UTXO model, each transaction is tracked separately. You can think of this as tracking your money by each bill instead of via your bank balance.

Unlike in fiat finance, unspent transaction outputs treat currency as an object instead of a unit. Each object has its history stored on it and can be spent when required, but ownership only needs to be checked when the currency is sent.

Meanwhile, the account model creates a separate account for each user. It must keep track of every account and remember its balance all of the time.

Some other differences between the unspent transaction output and account models include the following:

Accounting ModelUTXO Model
Transactions have fewer storage demandsTransactions need more storage space
The state is saved in the nodesThe state is saved in transactions
Less secureMore secure
It is complex to calculate transactionsIt is simpler to compute transactions
More efficient for bulk transactionsLess efficient for bulk transactions
Accounting model versus UXTO model

UTXOs: an essential part of the blockchain ecosystem

UTXOs are essentially digital change. They play a crucial role in how Bitcoin and several other cryptocurrencies work. When you send a bitcoin transaction, unspent transaction outputs signal to the network how much digital currency you have sent and received. What you have left in your Bitcoin wallet are the UTXOs.

Frequently asked questions

What does UTXO mean?

How does a UTXO transaction work?

Why does Bitcoin use UTXO?

Where are Bitcoin UTXOs stored?

What Blockchains use UTXO?

What is UTXO in Cardano?

Top crypto platforms | November 2024
ChainGPT ChainGPT Explore
BYDFi BYDFi No KYC
Margex Margex Explore
Сoinex Сoinex Explore
Top crypto platforms | November 2024
ChainGPT ChainGPT Explore
BYDFi BYDFi No KYC
Margex Margex Explore
Сoinex Сoinex Explore
Top crypto platforms | November 2024

Disclaimer

In line with the Trust Project guidelines, the educational content on this website is offered in good faith and for general information purposes only. BeInCrypto prioritizes providing high-quality information, taking the time to research and create informative content for readers. While partners may reward the company with commissions for placements in articles, these commissions do not influence the unbiased, honest, and helpful content creation process. Any action taken by the reader based on this information is strictly at their own risk. Please note that our Terms and Conditions, Privacy Policy, and Disclaimers have been updated.

Alex-Lielacher-BIC.png
Alex Lielacher
Alex Lielacher is an experienced figure on the Crypto world. Journalist and founder, an agency that works with a range of bitcoin businesses. He first came across bitcoin in 2011 and has worked full-time in the cryptocurrency industry since 2016. Previously Managing Editor of Bitcoin Market Journal, Alex holds a first-class honors in Investment and Financial Risk Management from Bayes Business School. Today, Alex contributes to leading media publications and works with a range of bitcoin...
READ FULL BIO
Sponsored
Sponsored