Du kannst diesen Artikel auch auf Deutsch lesen.

In times of high fees on Bitcoin, it is important to save fees where and whenever possible. Let’s understand how Bitcoin transaction fees are calculated and learn how you can use that knowledge to your advantage!

What are UTXOs?

Bitcoin uses the UTXO model to keep track of how many coins a certain person owns. The balance of a wallet is the sum of the value of all the available UTXOs in that wallet. In our blog post on the topic, we go into detail about what UTXOs (Unspent Transaction Outputs) are, and how they work. But here is a quick refresher:

Paying 60€ with a 50€ and a 20€ bill

Transactions in Bitcoin work similar to cash transactions, where you hand someone coins or banknotes in varying denominations and receive back change. Think of the money you hand out as the “transaction inputs”. The change and the amount paid are the “transaction outputs”.

Paying 0.09 Bitcoin with a 0.08 BTC and a 0.02 BTC UTXO

Because Bitcoin does not have standard denomination sizes, like cash (for example $1 or $50 bills), the value of a bill can be as high or low as needed. As with cash, if you only have a 50€ and a 20€ bill in your wallet, but need to pay 60€, you get 10€ back as change.

That means that with every transaction you receive, you receive a unique UTXO - an Unspent Transaction Output. A UTXO is a “bill” you have not spent yet.

A UTXO

Each UTXO has a fixed value, is tied to a Bitcoin address and identified by the transaction ID that created that UTXO. (This is a simplification. Technically, the address is not directly part of the UTXO).

Don’t worry, you don’t need to keep track of those UTXOs yourself. Your BitBox02 will do this automatically! It will also generate the change output and make sure it goes back to you.

Transaction fees

But why does this matter for users who just want to send and receive transactions? It’s because the amount of UTXOs involved in a transaction is responsible for how much the user has to pay for a transaction.

The formula to calculate the transaction size

The transaction size is determined by the count of input UTXOs, which are the UTXOs being spent in the transaction and the count of output UTXOs, which are the ones being created in that transaction.

Input and output sizes vary between address types

The input and output sizes depend on what types of Bitcoin address is being used, with the Legacy type being the most expensive to send. You can find more information about address types in our blog post on the different bitcoin address types.

The total fee paid for a transaction is calculated by multiplying the transaction size with the chosen fee-rate. The fee rate is measured in Satoshis per virtual byte (Sat/vByte) and depends on the current fee market.

A transaction with 2 inputs and 2 outputs

The amount of inputs you have to use for a transaction depends on what kind of transactions you have previously received. As with cash, if you have only received $5 bills in the past and want to buy something worth $30, you have to use 6 $5 bills for that purchase.

A transaction with 6 inputs and 2 outputs

The difference with Bitcoin is that a transaction with 6 input UTXOs (graphic 6) is going to be more expensive than an equivalent one being paid with just two input UTXOs (graphic 5). Paying your new smartphone with lots of coins instead of a few bills might be technically possible, but painful!

What is UTXO consolidation?

To reduce the amount of inputs you have to use for a transaction, you can use a technique known as “UTXO consolidation”. Consolidating, in this context, describes the process of taking lots of small UTXOs and turning them into a small amount of bigger UTXOs. Like going to the bank to change small coins for a bigger paper bill.

A consolidation transaction with 12 inputs and 4 outputs

To do this, all the wallet user needs to do is to send a transaction to themselves, using all their inputs to create a fewer amount of outputs. Doing this in one transaction works great, but can potentially compromise your privacy.

A normal transaction after consolidation

This in itself does not save any transaction fees, as you have to pay for the consolidation transaction. But as Bitcoin transaction fees are highly volatile, you can use times of low transaction fees to make your consolidation transactions. The subsequent transactions will then save on fees by requiring less inputs.

This way, you can optimize your future transaction fees by preparing the present fee environment. It makes a big difference whether you pay those fees in a 5 sat/vbyte or a 50 sat/vbyte environment.

Sending your consolidation transaction in times of low fees can save transaction fees down the road!

In times of low fees, like in the beginning of 2023, UTXO consolidation is quite cheap and can save fees for those transactions you have to send in a high fee environment. Those subsequent transactions will have a higher fee rate but overall lower total fee.

Is this relevant for me?

With the rise of Dollar-Cost-Averaging services like Pocket Bitcoin or Relai, it has become incredibly easy to buy Bitcoin. Often, those purchases are done in fixed intervals, like once a month or once per week to benefit from the DCA effect.


A well kept Bitcoin wallet will not have too many small UTXOs

The downside of such frequent purchases is that users will end up with a lot of UTXOs. Especially those who opt to buy weekly, or even daily, can end up with hundreds of tiny outputs!

Not only does that mean paying a lot of transaction fees for receiving those purchases, but also down the road when using these UTXOs as inputs to send transactions.

If you only received a couple of Bitcoin transactions or only have UTXOs with a relatively high value, there is no need to consolidate your UTXOs.

How can I consolidate my UTXOs?

Securely in the BitBoxApp

To consolidate your UTXOs, you have to send a transaction to yourself. If you have UTXOs that are not associated with any exchange service, consider sending them separately to avoid losing your privacy. It can be advisable to create a separate Bitcoin account in your BitBoxApp for these types of UTXOs.

In the BitBoxApp, you can activate the coin control feature in the Advanced Settings to have the option to choose the UTXOs used in a transaction.

First, create a receive address with your BitBox02. Copy the address and note down the first 5 and last 5 characters of the address on a piece of paper.

Then, switch to the “send” page in the BitBoxApp. Paste the bitcoin address you have noted down in the receiver field.

Click on “Toggle coin control” and select the UTXOs you wish to consolidate. In this example, we are consolidating all the UTXOs we have received from Pocket Bitcoin.

Click the checkmark for “Send selected coins”. Verify and confirm the transaction on your BitBox02 by comparing the address shown on the BitBox02 display with the one you noted down on a piece of paper.

Coinjoins

A more convenient and privacy preserving way to do UTXO consolidation is the use of coinjoins. Wallets such as Wasabi or Samourai allow the user to do a big consolidation transaction together with other participants, making it incredibly hard to track where which UTXO came from. This can enhance your privacy greatly.

Unfortunately, coinjoin wallets are hot wallets, which require the user to temporarily store their funds on an internet connected device, compromising their security. They also take a small fee and can lead to regulatory issues when depositing your coins on an exchange.

Conclusion

Like regulary exchanging pocket change for larger paper bills, consolidating UTXOs reduces the amount of transaction outputs stored in a wallet. By practicing UTXO consolidation regularly, we can pay transaction fees in times of low Bitcoin fees and save those fees in times of high Bitcoin fees. This is especially relevant for users receiving a lot of small transactions.

Because inputs are combined, there is potential to leak some privacy during this consolidation process, which makes it necessary to keep track of what inputs are used for each transaction. For this, it makes sense to use the multi account feature and UTXO labelling of the BitBoxApp!


Frequently Asked Questions (FAQ)

What are UTXOs in Bitcoin?
UTXOs, or Unspent Transaction Outputs, represent the amount of bitcoin that a user can spend. They are unique, fixed-value entities associated with a Bitcoin address.

Why is UTXO consolidation important?
UTXO consolidation is essential for reducing transaction fees. It involves combining multiple small UTXOs into fewer, larger ones, which simplifies future transactions and lowers their cost.

How does UTXO consolidation save fees?
Consolidating UTXOs during periods of low transaction fees reduces the number of inputs in future transactions. Fewer inputs mean lower fees, especially during times of high fee rates.

Is UTXO consolidation relevant for all Bitcoin users?
It's particularly relevant for users receiving frequent, small transactions, leading to numerous small UTXOs. Users with fewer, larger UTXOs may not need consolidation.

How can I consolidate my UTXOs using BitBoxApp?
In BitBoxApp, use the coin control feature to select UTXOs for consolidation. Send a transaction to yourself, combining selected UTXOs into fewer outputs.

What are the privacy considerations in UTXO consolidation?
Consolidation can potentially expose transaction patterns. To enhance privacy, consider using separate Bitcoin accounts or coinjoins for consolidation.

Are there alternatives to manual UTXO consolidation?
Yes, coinjoins offer a more convenient and privacy-preserving method for UTXO consolidation by combining transactions from multiple participants.


Don’t own a BitBox yet?

Keeping your crypto secure doesn't have to be hard. The BitBox02 hardware wallet stores the private keys for your cryptocurrencies offline. So you can manage your coins safely.

The BitBox02 also comes in Bitcoin-only version, featuring a radically focused firmware: less code means less attack surface, which further improves your security when only storing Bitcoin.

Grab one in our shop!


Shift Crypto is a privately-held company based in Zurich, Switzerland. Our team of Bitcoin contributors, crypto experts, and security engineers builds products that enable customers to enjoy a stress-free journey from novice to mastery level of cryptocurrency management. The BitBox02, our second generation hardware wallet, lets users store, protect, and transact Bitcoin and other cryptocurrencies with ease - along with its software companion, the BitBoxApp.