Learn
Dina · 3/15/2024

Bitcoin-UTXOs: Basics and solutions to the Dust-UTXO problem

Bitcoin UTXOs are fundamental components of the bitcoin blockchain and play a crucial role in transactions on the network. Nevertheless, too little attention is often paid to them, which can lead to subsequent complications such as dust UTXOs, especially in a savings plan. It is therefore all the more important to understand the structure of a bitcoin transaction, UTXOs and the problems they can cause, and to take measures to prevent future problems.

Briefly explained: What is a UTXO?

The abbreviation UTXO stands for "Unspent Transaction Output". A UTXO represents a certain amount of bitcoin in a wallet that has not yet been spent or used.

To understand the concept of UTXOs and the meaning of the UTXO problem, it is first essential to take a closer look at the principle of a bitcoin transaction.

Bitcoin transactions: The principle

A bitcoin transaction is the essential building block of the bitcoin network that makes it possible to transfer bitcoin between different parties. Various factors play a role here:

The building blocks of a bitcoin transaction

  1. Transaction ID (TxID): A unique identification number that identifies each transaction on the network.
  2. Inputs: The inputs of a transaction refer to pre-existing UTXOs received in previous transactions. These inputs indicate how many bitcoin are to be processed in the transaction and refer to the bitcoin addresses of the UTXOs.
  3. Outputs: The outputs determine where the bitcoin should be sent. Each output contains a bitcoin address and the amount of bitcoin that will be sent to this address.
  4. Fee: A network fee that the person making the transaction offers to the miners as an incentive to include the transaction in a block of the blockchain. Transactions with higher fees are usually prioritised for processing.

The process of a bitcoin transaction –– Example

Assuming Peter wants to send Anna 0.1 bitcoin, the process is as follows:

  1. Peter creates a new transaction in his wallet in which he specifies Anna as the recipient and sets the amount. In this case, the amount is 0.1 bitcoin.
  2. The wallet now searches for a suitable UTXO in Peter's wallet that can cover the desired amount. As an example, let's assume that Peter has a UTXO with 0.2 bitcoin in his wallet.
  3. The wallet now uses this UTXO as input for the new transaction and specifies that 0.1 bitcoin should be sent to Anna.
  4. The wallet now generates a digital signature to prove that it is authorised to use the bitcoin from the selected UTXO.
  5. The transaction is sent to the bitcoin network and included in a block of the blockchain by the miners for a transaction fee. In this example, we assume that this fee is 0.01 bitcoin.
  6. Once the transaction has been confirmed in the block, Anna receives the 0.1 bitcoin in her wallet and the UTXO of 0.2 bitcoin in Peter's wallet is marked as "spent" and can no longer be used for further transactions. This creates two new UTXOs. The remainder of the original UTXO minus the fee of 0.01 bitcoin results in a new UTXO in Peter's wallet of 0.09 bitcoin and a UTXO in Anna's wallet for the amount of 0.1 bitcoin.
Illustration of an exemplary bitcoin transaction
Illustration of an exemplary bitcoin transaction. For simplification, the visualisation of the fee has been omitted.

The UTXO principle and its effects

As already explained in the transaction structure and process, UTXOs play a major role in bitcoin transactions. To understand the effects of this principle in more detail, let's look at some important aspects:

What is a UTXO?

A UTXO is an output in the bitcoin blockchain that has not yet been used as an input in a transaction. In other words, it is an amount of bitcoin that has not yet been used and spent in a new transaction. On the other hand, outputs that have already been used as input in a transaction are referred to as "Spent Transaction Output".

The balance of a bitcoin address thus results from the sum of the UTXOs that are assigned to this address. Each time a bitcoin transaction takes place, one or more unused UTXOs are used as input and new outputs, which in turn can be used as UTXOs, are generated. This concept enables transparent and secure tracking of the bitcoin transaction in the blockchain and prevents the "double-spending problem", i.e. that a bitcoin can be spent several times.

Difference between a transaction and a UTXO

The difference between a transaction and a UTXO lies in their function and status in the blockchain. A transaction is the process of a bitcoin transfer itself, in which UTXOs are used as inputs. A UTXO, on the other hand, is the unused amount of bitcoin that has not yet been used as an input in a transaction and is therefore still available for future transactions.

It is important to understand that UTXOs cannot be transferred directly, but only indirectly through the creation and confirmation of new transactions. In the bitcoin network, the UTXO model is used to ensure that only as much bitcoin can be spent as is available.

Impact on the transaction fees

The network fee that must be paid for a transaction is not directly related to the amount of bitcoin that is being sent, but rather to the number of UTXOs involved in that transaction. This can be confusing at first glance, as one might think that transfering larger amounts of bitcoin would automatically result in higher fees.

However, the main reason for the fee differences lies in the way transactions are processed in the bitcoin blockchain. This is because each UTXO must be included in the transaction individually, and each UTXO contributes to the total amount of storage space required. The more UTXOs are used in a transaction, the more storage space is required.

The following example can be used to illustrate this: Suppose a transaction consists of a combination of ten small UTXOs, each worth 0.001 BTC. The total value of these UTXOs is therefore 0.01 BTC. However, another transaction uses only a single UTXO worth 0.01 BTC. Although both transactions have the same total value of 0.01 BTC, the first transaction will require higher fees as it takes up more storage space in a block.

Thus, as described in our example, transactions with many small UTXOs will require more storage space in a block than transactions with fewer but larger UTXOs, even if the total bitcoin amount in both transactions is the same.

To summarise, this means that the network fee does not increase linearly with the amount of bitcoin transferred, as one might initially assume, but is rather influenced by the number of UTXOs and the resulting storage space requirements.

The most important UTXO facts summarised:

  • UTXO stands for Unspent Transaction Output. This refers to the outputs of a transaction that have not yet been issued.
  • The UTXO model is used to prevent double-spending.
  • UTXOs are important components of a bitcoin transaction.
  • Once a UTXO has been spent, it is marked as "spent" and cannot be used again.
  • After a UTXO has been spent, a new UTXO is created with a new amount.
  • The fees for a bitcoin transaction are calculated based on the memory size of the transaction. Larger transactions take up more space in the block and require more resources from the miners.
  • Transactions with many UTXOs have higher fees than transactions with few UTXOs.

Bitcoin's principle is more like cash than a bank account

The impact on transaction fees can be illustrated even more simply by comparing UTXOs to physical coins: when your wallet receives a bitcoin transaction, it's like someone putting a coin in your physical wallet. This is because a bitcoin wallet stores all individual transactions together.

So imagine that you regularly receive many small UTXOs in your wallet, similar to storing many small coins in your physical wallet. In a physical transaction, it is easier to pay the value of 100 euros with one 100 euro note or two 50 euro notes than with a large number of coins. This is because a 100 euro note takes up less physical space than a hundred 1 euro coins, for example.

This principle also applies to UTXOs, as one UTXO requires less storage space than, for example, 100 UTXOs, whereby one would have to assume that the 100 euro note takes up the same space in the wallet as a 1 euro coin. This means that it takes more physical effort to get a hundred 1 euro coins out of your wallet than a 100 euro note. The higher effort mentioned in this example is comparable to the higher transaction fee for many UTXOs, as the miners have to use more resources to process more data.

You also have new UTXOs after a cash transaction. For example, if you have to pay 50 euros but only have a 100 euro note available, you will receive 50 euros back. The 100 euro note can therefore be regarded as a UTXO in the wallet and is split into 2 times 50 euros after payment, once into 50 euros, which the recipient gets and represents a new UTXO in their wallet, and once into the change received, also 50 euros, which now represents a new UTXO in the payer's wallet.

The dust UTXO problem and its effects

When regularly stacking bitcoin as part of a savings plan to benefit from the effect of dollar cost averaging, dust UTXOs can become a potential problem. UTXOs are referred to as "dust UTXOs" when the UTXO amount is less than the current average transaction fee. As a result, the bitcoin amount can no longer be transferred away or "crumbles to dust" as it is completely consumed by the transaction fees on a transfer.

A regular savings plan offers a certain risk in this respect, as many small UTXOs containing a small amount of bitcoin are accumulated over time, depending on the regularity and amount.

For example, if you currently invest 100 euros per week in bitcoin, this can still be spent well, as the transaction fees are currently (March 2024) a few thousand sats, i.e. 1 to 2 euros per transaction. But with investing 5 euros daily you would be gathering quite small UTXOs with every transaction that in the near future could become dust UTXOs. Already today over 10% of the amount of such a small UTXO would be consumend in a transaction.

However, if the transaction fees continue to rise, which is to be expected in the next few years, and at the time when these UTXOs with the amounts of 0.00019 BTC or 0.000076 BTC are to be spent, the average transaction fee is 0.0002 BTC or more, then the person who wants to spend or move the UTXOs must pay more bitcoin in fees than bitcoin is to be transferred. Thus, the bitcoin amount has "crumbled to dust" as it can no longer be transferred away at a low cost.

Consequently, it is important to prevent such dust UTXOs from occurring. This can be ensured by UTXO management. UTXO management is particularly important when it becomes more likely that transaction fees will increase.

There can be several reasons for an increase in transaction fees. In the past, for example, fees rose when the ordinals upgrade was introduced. However, increases can also theoretically occur after a halving, as the block reward is halved. The next halving will take place at the end of April 2024.

Solutions to the dust UTXO problem with regular bitcoin stacking

  1. UTXO consolidation: One way to minimise the dust UTXO problem is to consolidate your regular bitcoin purchases by merging several small UTXOs into larger UTXOs. This will reduce the number of UTXOs in your wallet, resulting in less transaction data and therefore lower fees. Note, however, that merging UTXOs also entails transaction fees and it is therefore advisable to plan this carefully.
  2. Efficient fee calculation: Choose a bitcoin wallet that calculates fees efficiently and allows you to manually adjust transaction fees. By adjusting the fees according to the current network conditions, you can ensure that your transactions are confirmed quickly or at a low cost.

The potential of the Lightning network

Extensive work is already being done on solutions to solve or circumvent the dust UTXO problem in the long term. This is because it is particularly important for microtransactions that there are no high fees that have a disproportionate impact on a small purchase.

One possible solution to this problem is the Lightning network. The Lightning network offers the possibility of stacking smaller amounts and reducing transaction costs. By executing more transactions outside the blockchain, the Lightning network can improve scalability and reduce the dust UTXO problem.

With the new Pocket top-up service, it is already possible to buy bitcoin directly via Lightning and store it in a self-custodial wallet. This eliminates the problem of dust UTXOs, but it is important to note that Lightning wallets are hot wallets and that they are not suitable for holding large amounts of bitcoin. This means that Lightning cannot currently offer a definitive solution to the problem.

Summary and outlook

The bitcoin community is constantly working on new developments and solutions to optimise the network. Future improvements could facilitate the management of UTXOs and further optimise the fee structure. It is therefore advisable for people who use bitcoin to keep up to date with these technical details and developments in order to be able to use bitcoin efficiently and cost-effectively. By consciously consolidating UTXO and using efficient wallets, you can reduce the impact of the dust UTXO problem and utilise the potential benefits of the Lightning network.

Spread the knowledge

If you liked this content, make sure to share it with your friends. If you think there's something missing here, send us a quick message.

Mail

You get

0.00405495 BTC

⭐️ purchased 5/10/23, 6:42 AM (CET) at 25,196.30 EUR

⏱️ paid out until 10:00 PM

Congratulations,

Your payment has arrived and was exchanged into bitcoin as follows:

PaymentEUR 100.00