Everything you need to know about consolidating Bitcoin coins

Disponible en podcast
Share article:

If you buy bitcoin in DCA and put it into your own self-custody wallet, then you may be in possession of a multitude of small UTXOs. These pieces of bitcoin can quickly become a hassle during times of network congestion and rising transaction fees. Consolidating UTxOS solves this problem. In this article, we explain everything you need to know about consolidating Bitcoin coins.

How is a Bitcoin transaction structured?

To understand what coin consolidation on Bitcoin consists of, it is essential to know the structure of a transaction, as well as the mechanisms related to transaction fees.

Bitcoin units of account are represented on the protocol in the form of UTxOS (Unspent Transaction Outputs). They are essentially fragments of bitcoins, more or less large, waiting to be spent. When you want to make a payment, you will consume some of your UTXOs as inputs. This will allow you to produce new UTXOs in outputs in order to satisfy your payment.

For example, let's say you have a 200,000 sats song (that is, a UTXO), and you want to buy a stick that costs 6,000 sats. You are going to build a Bitcoin transaction with your UTXO of 200,000 sats as input. At the exit, you will create a first UTXO of 6,000 sats that will go to the baker's address. You will also create a second exit, in order to recover your change. If you ignore the fees, it will be 194,000 SATS, and it will go to another address that belongs to you.

But if you want to make a larger payment, you may need to aggregate several entries into your transaction. The total amount of the entries must be at least equal to the amount of the payment you want to make at the exit.

To summarize, the role of a Bitcoin transaction is to consume inputs and create outputs in return. The inputs represent the bitcoins used to make the payment, and the outputs represent the destinations of your payment.

How do Bitcoin transaction fees work?

Space on the Bitcoin blockchain is a scarce resource. Each block is strictly limited in weight and only one block is produced approximately every ten minutes. However, there are often numerous transactions waiting to be confirmed in mempools. The role of miners is, among other things, to come and draw these transactions and include them in a valid block. But since the space in each block is limited, they are forced to make a choice among pending transactions.

This choice is obviously guided by economic interests. Mining is an industrial activity. Each minor therefore seeks to maximize their profits in order to avoid bankruptcy. When faced with the choice of transactions to integrate into their blocks, miners will logically give priority to those that offer the highest fees.

But be careful, not all transactions have the same weight on Bitcoin! If you make a simple payment transaction with 1 entry and 2 outputs, your transaction will be lighter than if you use 4 inputs and 6 outputs.

➤ Learn more about the concept of “weight” on Bitcoin.

Since space in blocks is limited, miners should also take into account the weight of your transaction when calculating fees. For this reason, the fees of a Bitcoin transaction are not considered in absolute terms, but in relation to the weight of the transaction. In other words, miners calculate the fee rate of a transaction in relation to its weight to determine an order of priority. This rate is called “satoshis per virtual bytes” (SATS/vb).

Let's take two examples to fully understand this concept:

  • Let's imagine a first SegWit transaction with only one input and one output. In terms of virtual bytes (weight), let's say the transaction measures 141 vB. If it plans to allocate 1,994 real cost sats, then its fee rate will be around 14 sats/VB. The calculation is: 1 994/141 = 14.
  • Let's imagine a second SegWit transaction, this time with 2 inputs and 2 outputs. In terms of virtual bytes, let's say the transaction is 220vB in size. If it plans to allocate 2,640 SATS in real costs, then its fee rate will be 12 SATs/VB. The calculation is: 2 640/220 = 12.

If we compare these two transactions, we can see that the second one plans to allocate an additional 646 sats in transaction fees. However, if the minor has to choose between these two transactions, he will always prefer to take the first one first. In fact, once the fees are reduced to the weight that the transaction will take in the miner's block, the first allocates 14 SATs/vb while the second allocates only 12 SATs/vb. It will be more profitable for the miner to include the first transaction, as the space in each block is strictly limited.

The Bitcoin fee market therefore behaves like an auction system. Transactions that offer miners the most satoshis in relation to their weight (Sats/VB) are included in priority in the next blocks.

What is UTxOS consolidation?

During periods of congestion, when a large number of transactions are simultaneously broadcast on the Bitcoin network, fees soar. The auction mechanism encourages users to offer ever higher fees in the hope of priority.

Fortunately, at the moment, these periods of congestion are only temporary. Sometimes the fees are very high on Bitcoin, and sometimes they are very low. It could therefore be interesting to take advantage of periods of low costs to optimize the management of our UTXos, and thus anticipate periods of high costs. This is precisely the objective of consolidating UTxOS.

Source: https://mempool.space/fr/graphs/

As mentioned in the previous part, the fee rate associated with a transaction depends on its weight. However, the latter varies according to the number of entries and exits involved in said transaction. We can therefore optimize this fee rate by using as few entries as possible in each of our transactions. However, to be able to reduce the number of inputs, it is necessary to have UTXOs large enough to satisfy the outputs.

For example, if I want to pay for my wand that costs 6,000 sats, but I only have small UTXOs of 2,000 sats each, then I will have to put several entries into my transaction. So I will have to pay more transaction fees to buy my wand.

On the other hand, if I have a single UTXO of 15,000 sats, then I will be able to pay for my wand with a single entry in my transaction, and thus save costs thanks to the reduction in weight.

The consolidation aims to take advantage of periods of low fees on Bitcoin to merge several small UTXOs into one larger one. In this way, we can predict mandatory expenses in times of rising fees, and thus save on our future transaction costs.

Concretely, consolidation consists in making a transaction for yourself. We are going to combine all our small UTXOs that we want to merge, and we will put them at the input of our consolidation transaction. At the output, we will create a single big UTXO that will go to a single reception address belonging to us.

To maximize the benefits of this practice, we prefer to broadcast consolidation transactions when we consider that the fees on Bitcoin are very low.

Beyond the savings that can be achieved in transaction fees, consolidation also makes it possible to predict the future. If you have tiny UTXOs in your wallet, they can be lost if the Bitcoin network goes into a long period of time with high fees. In fact, if the expenditure of a UTXO of 10,000 SATS requires you to pay at least 15,000 SATS in mining fees, then the cost generated by the expense exceeds the value of the UTXO itself. So you no longer have any interest in spending these small UTXOs, and they will remain lost until the costs come back down. By regularly consolidating your small UTXOs, you limit this risk associated with increased fees.

What are the risks associated with the consolidation of UTxOS?

The main disadvantage of consolidating UTxOS is that it allows the application of a chain analysis heuristic called “CIOH”.

As I explained to you in my article on the Bitcoin privacy model, your transactions are not private. They are broadcast publicly to all network nodes around the world. From this public data, it is possible to do chain analysis in order to trace the flow of your bitcoins and to observe your privacy.

The work of analysis companies is divided mainly into two stages. Initially, they will try to identify characteristics on transactions. Then, from this information, they will deduce more or less likely hypotheses about bitcoin flows.

Among these characteristics, the two main threats to user privacy are the reuse of a receiving address and CIOH (“Common Input Ownership Heuristic”). In French, CIOH can be translated as: “common entry ownership heuristic”. This simply means that, for a transaction that has several entries, it can be interpreted that they all probably come from the same person. Their property is therefore common.

The consequence of CIOH is that the consolidation of UTxOS can sometimes reveal information about you. Let's take an example to fully understand this concept. Let's say your friend Alice sends you 50,000 sats for your birthday. At the same time, you have 6 UTXOs of 100,000 Sats each, which you purchased on the Bitstack application. If you decide to consolidate all these UTXOs together, then Alice will be able to know that you have at least 650,000 SATS, simply by observing the blockchain.

To avoid this risk, it is important to maintain good management of your UTXos within your portfolio. You can also be careful not to merge UTXOs from different sources in order to limit the impact of your consolidation on your privacy.

Tutorial: How do I consolidate bitcoins?

The consolidation process differs depending on the software you use to manage your Bitcoin wallet. Some wallets do not allow consolidation, since you must be able to manually select the UTXOs you want to merge into a transaction (this is an option called “coin control”).

⚠️ If you make a consolidation transaction on a hardware wallet, it may take longer than usual for your device to sign the numerous entries. Don't worry if it creaks, it's normal.

Consolidating Bitcoin on Sparrow Wallet

On Sparrow Wallet, the consolidation process is simplified. Go to your wallet in the” tab UTxOS ”. You will see your list of coins and the corresponding amounts.

Select the UTXOs you want to consolidate, then click” Spend Selected ”.

In the box” Pay to ”, click on the small arrow. In the dropdown menu, click on your wallet name (Consolidation).

Add a label to your transaction to remember where it came from, then click on” Create Transaction ”.

Verify the receiving address, then click” Finalize Transaction for Signing ”.

Click on” Sign ”.

If you are happy with the consolidation transaction, click on” Broadcast Transaction ” in order to send it to the Bitcoin network.

If you go back to the” tab UTxOS ”, you can see your new big UTXO resulting from the consolidation.

Consolidating Bitcoin on Ledger Live

If you use Ledger Live To manage your Bitcoin wallet, the consolidation process differs slightly.

Go to your Bitcoin account. Click on the” button Receiving ”.

The software gives you one of your own addresses. Copy it, then go back to the main menu of your account.

Click on the” button Send ”.

Paste your address. And then, Make sure that this is the correct reception address, otherwise you risk losing your bitcoins. Then click on” Continue ”.

Select the box” Advanced ” and click on” Corner control ”.

From the list, select the various UTXOs you want to consolidate, then click on” Finish ”.

Click on the check mark” Send as much as possible ”. Verify that the amount sent corresponds to the sum of UTXOs that you want to consolidate. Choose the fee rate allocated to your consolidation transaction, and click on” Continue ”.

Finally, check and sign your transaction from your Ledger device.

Here is the result of my transaction. We can see that it has consumed 4 UTXOs as inputs and produced a single large UTXO as output.

Credit: https://mempool.space/fr/

➤ Discover the complete guide to setting up and using a Ledger Nano.

Conclusion

Bitcoin coin consolidation is about taking advantage of periods of low fees to aggregate several small UTXOs into one big UTXO. In this way, we can anticipate periods of rising costs, and in the end, save money on our mining costs.

If you keep your bitcoins in self-custody, I strongly advise you to implement a consolidation strategy. If the adoption of Bitcoin explodes on the rise, consolidation will have allowed you to avoid a lot of problems.

However, be careful, consolidation makes it possible to apply the CIOH heuristic in chain analysis. If you consolidate UTXOs without taking care not to merge sources, then this practice can have an impact on your privacy.

Podcast available

Table of contents

Share article

You may also like these articles

Bitstack SAS, a company registered with the Aix-en-Provence Trade and Companies Register under number 899 125 090 and operating under the trade name Bitstack, is licenced as an agent of Xpollens — an electronic money institution authorized by the ACPR (CIB 16528 – RCS Nanterre no. 501586341, 110 Avenue de France, 75013 Paris) — with the Autorité de Contrôle Prudentiel et de Résolution (ACPR) under number 747088, and is also licensed as a Crypto-Assets Service Provider (CASP) with the French Financial Markets Authority (AMF) under number A2025-003 for the following activities: exchange of crypto-assets for funds, exchange of crypto-assets for other crypto-assets, execution of orders for crypto-assets on behalf of clients, providing custody and administration of crypto-assets on behalf of clients, and providing transfer services for crypto-assets on behalf of clients, with its registered office located at 100 impasse des Houillères, 13590 Meyreuil, France.

Investing in digital assets carries a risk of partial or total loss of the invested capital.
Past performance is not indicative of future results.
DOWNLOAD BITSTACK