Recently I’ve been learning about Bitcoin and Cryptocurrencies and how they work, and there’s so much interesting things I’ve come across.
One of those things is UTXOs and Consolidation, and I feel like this is one of the most important concepts to grasp for any beginner bitcoiner before it’s too late.
What is a UTXO
UTXO stands for “Unspent Transaction Output” and put it simply, it’s your money, the coins you haven’t spent yet (unspent)
When someone performs a transaction to send you 0.05 BTC, it does not get added as part of a total balance or anything, it just goes to the network that you now own that specific 0.05 BTC that the owner signed to be yours.
In this case, the 0.05 BTC that person sent you was an “input” and you receive the “output” that’s exactly what a UTXO is, simply outputs assigned to you.
The total amount of UTXOs equals your total balance.
A good analogy for UTXOs is real cash bills, you may have a $1,000 but it may have been summed up from 10 of those $100 bills, so you have 10 UTXOs worth $100 each that made up your total balance of $1,000
Consolidation
So imagine your friend is giving you a $1 bill every day, in 1 year you have about $365 saved up from it, now it’s time to spend it.
You find something worth spending it on, you give the cash, and the cashier now has to count it all, that’s a lot of $1 bills he says, it takes a bit to count and verify everything is correct.
Something similar happens in Bitcoin, your wallet just keeps collecting UTXOs over time, so if you decide to send a large sum you’d need to assign a lot of these UTXOs as your “inputs”
The problem? Your transaction becomes big and the fees get high.
Unlike the cash analogy where the cashier slows down to count, bitcoin does not slow down, however for your transaction to even count it needs to be included in a block and miners need to solve that block and submit it as part of the blockchain, these blocks have a size limit, if your transaction is big you take up space where others’ transactions could’ve been included, therefore you need to pay more in fees for that space you are taking up in the block.
This is a serious issue as sometimes the network is so busy and you may be unable to transact due to insane fees for the size of your transaction, if most of your UTXOs consists of small amounts you also risk them becoming ‘dust’ when network fees are always consistently high that you’ll never be spending it in a meaningful way (fees are higher than value of your coins)
So how do we reduce the size of our transactions? The answer is consolidation.
Consolidation is the process of gathering all your coins, specifically every UTXO, and sending them to an address you control (essentially back to yourself). The result is that all these UTXOs are combined into a single transaction. While the total coin amount remains the same (minus the fees), the transaction now consists of just one UTXO, which reduces its data size on the blockchain.
One does this at a time where fees are lower, they also choose to pay less in fees manually, remember fees are technically optional but it’ll take a while before miners prioritize your transaction, so by choosing a lower fee rates and you are fine to wait longer, you can merge all these UTXO to one UTXO, this cleans up dust and ensures you can transact at reasonable fees in the future when you choose to spend them.
See it in Action
By looking at the mempool ourselves we can see consolidations that are regularly done by others, for example:
Here we can see the flow diagram show the concept, it’s many scattered coins and they’ve all been merged into one big UTXO, a small output flies upward because of the transaction fees.
Keep in mind that ‘big’ can be a little confusing in this context, big amounts don’t mean anything, we are talking about computing sizes, computers don’t need more storage to store the number 1 or the number 1 million, but having to store multiple numbers makes them bigger, that’s the problem we are solving here, more UTXOs the bigger the storage size, while bigger in amount but less UTXOs are actually smaller.
Plan your UTXOs
So the lesson to takeaway here is to pay attention to your UTXOs, your wallet may have tools to help you manage them or at least view them.
If for example you are using an exchange to buy bitcoins and transfer to your wallet, it may be worth letting them accumulate a bit on the exchange’s wallet before transferring them so there’s less UTXOs than if you were to transfer them everyday. Of course don’t let it sit too long on the exchange you want to have self-custody as much as possible.
It’s usually recommended that your UTXOs be about 0.001 BTC (100,000 Satoshis) or higher each to prevent dust. But of course higher is better, if you are investing big I would recommend 0.01 BTC (1,000,000 Satoshis) or higher each.
The analogy with cash also helps, if you are building a life savings you don’t wanna have them all in pennies would you? The difference is that in Bitcoin we don’t have denominations like $1, $5, $10, but any amount can become like a cash bill, a UTXO.