On Fees and UTXO Management

I predict a bunch of turbulence ahead which is why I want to send this out to my fellow hodlers. The reason I believe turbulences may be ahead is manifold. I'll keep it short in this issue and only highlight the main reasons and will do a deep dive in a separate issue on this blog later on. Year-to-Date we have seen a lot of price appreciation for Bitcoin. Usually it's only a matter of time until people start rushing into Bitcoin again, may it be as a form of investment, speculation or because of its monetary properties. The second reason is related to the first. The upcoming halving, an event where the block reward for miners is cut in half. Since Bitcoin's inception the time around the halving has been accompanied with high volatility, which leads to a lot of buzz around Bitcoin. A lot of buzz around Bitcoin usually means that more people are drawn into it. Which in turn leads to more price volatility, it's basically a spiral. All this normally leads to higher levels of usage around Bitcoin which comes with more on-chain transactions. Block space is limited though, so the fees will most likely rise with increased demand. We have already seen several such phases over the last years (especially last year) where fees rose quite harshly.

Fetched from https://statoshi.info/ on 29.02.2024

As you can see in the figure above, there have been phases were fees are persistently high. And at times fees rose over 400 Sats/vByte. In those times it becomes more expensive to make a transaction. But let's make a little digression. Before we continue I think I should explain what the important drivers of fees are for a Bitcoin transaction. Then you can better understand what UTXO management is all about.

When you make a transaction that transaction has a certain size data wise. One of the most simple transactions is a transaction with one input and one output. This means you have one coin (A) that is worth 1,000,000 sats and you want to send somebody 950,000 sats which results in coin B. For that you have to construct a transaction where coin A is the input, for which you have to provide a valid signature in order to spend it, and an output. This information has a certain size measured in bytes. The basic principle in Bitcoin is that the more space a transaction uses the more said transaction has to pay in fees. Fees are computed in sats/vByte.

Below is a flow diagram by mempool.space to visualise how this transaction would look. This is just a random transaction that I found (if you are curious you can also check out the page and look at other transactions, there are a couple different shapes that a transaction can take). This transaction (Tx 1) has a size of 110 vBytes, which is one of the smallest you'll get a transaction to spend a coin.

Example Tx 1: https://mempool.space/tx/d1d8468fac9fcbcc76eb6b9634274c60489d6134179f167db6152049a91b2a6b

As you can see there is one input and one output. The small line at the top is the fee, that was paid for the transaction. The fee is technically not an extra output as the fee is calculated from the difference between the total input amount into the transaction and its total output amount. Hence it does not take up any space/data in the transaction. So if we go back to our example above, we send a coin worth 1,000,000 sats and create an output that is worth 950,000 sats, the resulting fee will automatically will be determined as 50,000 sats.

I want to show you another transaction to get you closer to what this blog issue is about. Tx 2 has seven inputs and also just one output. The difference is that this transaction has a data size of 517 vBytes. Which is a lot more compared to the 110 vBytes of Tx 1. So more inputs (and also more outputs) result in a transaction requiring more space on the blockchain. The more space we take up for our transactions the more we have to pay because transactions are included based on their fee rate. A transaction that offers 100 sats/vByte is included before a transaction that only offers 10 sats/vByte.

Side note: Just because a transaction offers a higher absolute amount of fees does not mean that it will be included earlier. inclusion in a block solely depends on the fee rate. Let me illustrate with an example. Let's say that we have a transaction that has a size of 200 vByte and a fee rate of 100 sats/vByte and a big transaction with 2,000 vByte offering a fee rate of 20 sats/vByte. Now the total fees paid will be 20,000 sats and 40,000 sats, respectively. The big transaction is paying more in total but what we have to consider is that block space is limited. We can't include an unlimited amount of transactions in a block. This means that a miner would rather like to include ten small transactions which pay a high fee rate compared to one big one with a lower fee rate. This becomes clear when we extrapolate the total fees that a miner could collect if there were several small high paying transaction. We could have 10 small transactions paying 100 sats/vByte instead of that one big transaction. Then the total collected fees would be 10 * 20,000 sats. So the miner has to compare 200,000 sats against the 40,000 sats.

Example TX 2: https://mempool.space/tx/0a4092884acbf3474ef2fc897726eaed74c96d08f324c11fe2e4af2542c35a87

Now as I mentioned above fees are driven by the space that they take up. In the moment of writing (03.03.2024) the required fee rate to enter a block is around 20 sats/vByte. Currently we are in a rather calm phase. From the transaction sizes above we can conclude that Tx 1 would have to pay 2,200 sats and Tx 2 has to pay 10,340 sats. Both of these amounts are not crazy amounts of money at the moment. But going back to the introduction I talked about that fees can be a lot higher for a rather long time. Additionally with an increase in adoption we cannot be sure whether fees will ever be as low as they were before. For example in the very early days (way before I got in), fees were not really existent. Then there were times were fees were at 1 sat/vByte, those phases I was able to experience but I we haven't seen those in a while now. Looking a mempool that is filled to the brink and a halving, which brings volatility, right around the corner it seems unlikely that we'll have those very low fees again. In the very long run fees are basically guaranteed to go up. With an increase in Bitcoin adoption so will the demand on block space. More demand means higher prices so we will have to pay higher fee rates in order to have our transactions included.

Let's get back to our two transactions. Right now fees won't hurt you too much but let's say fees are persistently at 200 sats/vByte and you want or worse have to make a transaction. This will mean that transaction costs will be significantly higher for you. In specific numbers this means you'll have to pay 22,000 sats for Tx 1 and a whooping 103,400 sats for Tx 2. This is a lot more than before and as you can see the fees for Tx 1 (in a high fee environment) have exceed those of Tx 2 in a low fee environment.

So why am I even writing this post. I want you to have a strategy to mange your UTXOs. Let's say your wallet software shows you a balance of 10,000,000 sats (10M sats). That's what you see on the surface, but what the software does in the background is aggregate all the UTXOs that are spendable by your private key. This means you could potentially have any combination of UTXOs that add up to 10M sats. There could be 1 UTXO worth 10M sats or 10 UTXOs each worth 1M sats or even 100 UTXOs worth 100k sats. So your wallet shows you that you have 10M sats but you could have any number of coins with different values. This becomes very relevant in high fee environments. Considering our previous two example transactions, we observed that using seven inputs instead of one for a single output is five times more expensive. So it is important that your UTXOs are not too small. Otherwise your fees will quickly explode and the UTXOs will be "trapped". If you have to pay 30k sats in order to spend a 100k UTXO, you'll not be happy and the value of your bitcoin stack will effectively be significantly diminished. On the other hand there are also downsides if you only have big UTXOs let's say you have to pay somebody 500k sats and the smallest UTXO that you have is 10M. When using this 10M UTXO you will reveal to the recipient that you actually have a 10M UTXO. This is bad for privacy reasons because now they know how much money you have. A comparable scenario with fiat money would involve emptying your wallet in front of the cashier, spreading out all your $100 bills, just to pay for a newspaper. You wouldn't reveal your financial situation in those cases why would you with Bitcoin? In order to fare well with regards to privacy and also not waste money on fees you need a good distribution of UTXO sizes. Do this and you can handle different transaction values and situations without compromising on privacy and fees.

It is important to keep an eye on the actual UTXOs that are in your wallet. Normally wallet software has a feature to show you of which UTXOs your total balance actually consists. Take a look and if needed make the necessary adjustments. Beware that just splitting up large UTXOs without running them through a conjoin does nothing with regards to privacy. Since all transactions are recorded on the blockchain, splitting one large UTXO into four smaller ones likely indicates that the resulting UTXOs belong to the same person. In that case I would recommend that you coinjoin your coins in order to split them up. This will also break the link between them and especially to you. A conjoin can also be used for a consolidation of UTXOs. Consolidating is something that we've seen in Tx 2 of our example transactions. That's when you use several smaller UTXOs and meld them into one bigger UTXO. This will reveal that all those UTXOs, that were previously independent, belong to you. Considering how bad you can get hit by fees in the long run it does make sense to take care of the small UTXOs even if you don't coinjoin. The decision to coinjoin is strongly influenced by who knows what about your UTXOs. I will be talking about coinjoins later down the road in another issue. I repeatedly hear stories of people who stack weekly for 15€ or some small amount and receive those purchases as individual UTXOs and then they have to pay a high percentage of the UTXO's value as fees when spending it. Self custody is very important but in my opinion self custody has to be managed in order to avoid such pitfalls. Personally I see no problem with aggregating several purchases at your broker and then withdrawing a larger UTXO.

Let's run the numbers on a consolidation case and recall our two example transactions from above. If we keep seven small UTXOs and use them in a high fee environment, we have to pay 103,400 sats in fees. If we had consolidated those UTXOs at a low fee rate and just had to spend one UTXO in a high fee environment the costs would be as follows: 10,340 sats for the consolidation and then 22,000 sats to spend the UTXO. The total would be 32,340 sats which is a lot lower than the first case. Even if we assume that our consolidated UTXO was a bit too big it would still be beneficial. A simple one input two output transaction has a size of roughly 150 vBytes. This transaction would have a change output included. At a fee rate of 200 sats/vByte this would result in fees of 30,000 sats. The total would be 43,340 sats. So even in this case our total fees would be a lot lower than our original case saving us a lot of precious sats.

Managing your UTXOs is very important if you want to avoid pain in turbulent times. Make sure you have a good distribution of different UTXO sizes. As a general guideline, consider a fee rate that you find reasonable and are willing to pay for your transactions. After you have done that organise your UTXOs accordingly. And most importantly don't forget to plan ahead for spikes, like the ones we have seen before and which will definitely come again.

If you have any questions either contact me or comment under this post and I'll be happy to help. Don't loose your head in the times ahead and think about the future, because especially now it is important to stay humble and stack sats.

Support this blog

Subscribe and share this blog with your friends if you enjoy this content and find it helpful.

To stack sats I use the 21BitcoinApp. If you use the code SNBLOG you will receive fees starting from 0.79% instead of 0.99%. I will receive a bit of the fees from 21Bitcoin.
The Bitbox is the perfect way to secure your Bitcoin. I use the BitBox 02 Bitcoin-only edition as my cold storage. By buying with my link you can support me and this blog. Use the code "SNBLOG" to get 5% of your purchase.

https://21bitcoin.app.link/invite/?code=SNBLOG

BitBox shop πŸ›’
Official store for BitBox hardware wallets and backup accessories

Subscribe to SNBlog

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe