What is UTXO management?
Introducing unspent transaction outputs
In some cryptocurrencies, such as Bitcoin, unspent transaction outputs (UTXOs) are used as a unit of measurement. When we talk about the number of UTXOs someone has, what we’re really talking about is the value of their coins.
In the same way that we use can use the internet without knowing exactly how wifi works, it’s possible to own and use Bitcoin without knowing exactly what UTXOs are.
However, it’s worth understanding the principles behind Bitcoin UTXOs, especially for enterprises using Bitcoin in their daily operations. Good UTXO management can lead to lower fees, faster transactions and improved security online.
UTXO model versus account model
The UTXO model is an alternative to having accounts or balances. In a fiat bank account, you have a balance. When you make a payment, you send some of that balance to someone else.
Your bank and their bank communicate to each other to validate the transaction and update both your accounts. This system relies on trusting third parties (banks) to process and authorize the payment.
But there is no central authority in Bitcoin.
Instead, Bitcoins (BTC) are exchanged on a peer-to-peer basis and every transaction is recorded on an open database – the blockchain – which is managed in a decentralized way by a network of computers (nodes).
After being added to the blockchain and independently validated by a number of independent nodes (each of which has a complete copy of that database), the transaction is confirmed and becomes part of Bitcoin’s permanent and public ledger.
When you send someone BTC you’re not actually making a transfer from one account to another. Instead, you’re signing over the ownership of an amount of BTC that exists as data in the blockchain and is recorded as belonging to you. You manage this through your Bitcoin wallet, which holds a private key that you use to “sign” or authorize the transaction.
And the amount of BTC that you send? That’s measured in UTXOs.
How Bitcoin UTXOs work
UTXOs are discrete amounts and indivisible. This means that if you have a UTXO worth 5 BTC and wish to send someone 1 BTC, you need to “spend” the entire 5 BTC in this transaction and generate change for yourself in the process.
• Let’s say someone sends you 5 BTC. You now have one unspent transaction output (UTXO) in your wallet worth 5 BTC.
• Later, you spend 1 BTC. The recipient gets 1 BTC while your wallet is credited back a new UTXO worth 4 BTC (the “change,” if you will).
• Each time someone sends you BTC, you get another UTXO. And each time you spend a UTXO you get a new (different) UTXO back as change.
Now you have several UTXOs in your wallet with varying values.
When paying cash for a $6 item, you can choose either a $10 bill or two $5 bills. Similarly, each time you spend some BTC, you can theoretically choose which UTXOs to spend from your wallet. However, many wallets will choose the UTXOs for you.
You also need to pay a fee. In banking, when transaction fees occur, they are either a fixed rate or a percentage of the transaction amount and are paid to a central authority (the bank or card provider, for example) that validates the transaction.
In Bitcoin, as there is no central authority, the fee is the commission paid to the mining node that does the work of adding your transaction to the blockchain.
The UTXOs you’re sending need to add up to slightly more than the amount your recipient will get, and the difference between the two figures is the fee.
This video shows the process when person A, let’s call them Alice, owns 5 BTC and wants to send 3 BTC to person B (Bob).
Why does Bitcoin use UTXOs?
UTXOs allow Bitcoin transactions to be settled via the blockchain in a way that is transparent, immutable and secure.
In this way, they also solve the “double-spend problem” that was a major challenge for digital currencies before Bitcoin came along.
The double-spend problem
If something exists in a solely digital form, it can be easy to duplicate.
This causes major problems for businesses that use digital assets. Think of the efforts of the TV, film and music industries to combat piracy, for example.
So how do we avoid people simply duplicating digital currencies in order to spend them more than once?
The answer lies in the unique identifier (think digital “DNA”) of each UTXO, and how the blockchain processes this information each time a transaction is made.
The technical term for this unique identifier is the outpoint. This contains the ID of the previous transaction that created the UTXO, and its position in the sequence of UTXOs.
A Bitcoin transaction completely consumes the UTXOs that are used to create it. They are temporarily transformed into “inputs” during this process. The new outputs generated, including the change, are fresh UTXOs that overwrite the previous ones and can now be spent in new transactions.
The original UTXO cannot be spent again, because it no longer exists.
As well as preventing the double spending of BTC, this system also means that at any point in time, it’s possible for all nodes to agree on how much BTC is in existence. They can do this by calculating the total value of all the UTXOs on the blockchain (called the “UTXO set”).
Why UTXO management matters
If you’re an individual buying BTC as an investment, you may not need to make many transactions at all beyond that initial purchase.
Likewise, large institutions such as banks and hedge funds may simply hold Bitcoin and not transact with it for a long period of time.
In these cases, managing their UTXOs is not such an issue.
But companies that use Bitcoin in their regular business operations can accumulate many UTXOs of different sizes in their wallets, and how they manage these has implications for cost and security.
UTXO management can minimize fees
Let’s look in more detail at how Bitcoin transaction fees work.
• Traditional bank fees are usually a flat rate or a percentage of the transaction. However, Bitcoin fees vary from transaction to transaction.
• Bitcoin mining fees depend on the amount of traffic on the network (number of transactions being processed) and how fast the parties want the transaction to be confirmed.
• The more UTXOs there are in a transaction, the more information there is to process, and therefore the higher the fee.
Unlike a fiat wallet, with a UTXO system it pays to hold a variety of UTXOs of varying denominations.
Each time a transaction is made, the fewest number of UTXOs can be used, thus keeping the mining fees low. This also speeds up confirmation times.
That being said, this causes some other challenges. For example, busy wallets can accumulate excessive numbers of small UTXOs. And, once again, making payments with several of these smaller UTXOs is not cost-effective. So, at some point, UTXOs need to be consolidated.
UTXO management can improve security
Aside from reducing the cost of doing business and speeding up confirmations, there’s another reason for enterprise users to adopt good UTXO management practices.
Enterprise-level users rarely use a single wallet, because it leaves assets more vulnerable to theft or accidental loss (the problem of putting all your eggs in one basket). It also decreases privacy.
Bitcoin is known as a “pseudonymous” blockchain, meaning that although individual wallets are anonymous, transactions can be seen by anyone due to the public nature of the ledger.
This means that patterns of transactions can be analyzed to draw conclusions about who is making them and the size of their business.
Wallets that send particularly large transactions can draw attention to themselves, as discussed in this article. For this reason, among others, most enterprise users maintain two or three wallets or even more.
Another potential security issue arises when you receive an unexpected payment of UTXOs of small value, in what is known as a dusting attack (see our article on crypto dusting attacks for more).
The key thing here is to avoid spending those small UTXOs, which is where good UTXO management also comes into play.
UTXO management with Fortris
As we have seen, UTXO management for large-scale users of Bitcoin is a complex balance between keeping business overheads as low as possible, operating efficiently, and maintaining robust security.
As a Bitcoin treasury management solution, Fortris specializes in UTXO optimization for enterprise business. Not only can the Fortris platform help companies manage their UTXOs at scale, but it also integrates seamlessly with existing treasury and accounting systems.
Fortris handles digital asset treasury operations for enterprise business.
Want to learn more? Book a demo today.