Info

The most important facts in brief:

  • A UTXO is the output of a past transaction that has not yet been spent.
  • Contrary to what one might expect, Bitcoin's transaction model is similar to traditional cash in many respects.
  • Like bills and coins, UTXO can only be issued in full and cannot be split.
  • By managing your own UTXO manually, it is possible to both save on fees and optimize your own privacy.

Where does my account balance come from?

If you open your Bitcoin wallet, you will usually see a classic account balance, i.e. a total of all Bitcoin controlled by the wallet. You could therefore assume that this account balance is recorded somewhere in the Bitcoin blockchain and is constantly updated with new transactions.

In fact, the technical reality in the Bitcoin network is completely different from what one would intuitively expect. There are no account balances as with a bank account and no "Bitcoins" that are actually sent to other users. To understand what this is all about, let's first take a closer look at how Bitcoin transactions are structured in the first place.

 

Inputs and outputs

Every Bitcoin transaction consists of so-called inputs and outputs. These terms are often assigned to the sender and recipient of a payment, which is usually correct, but a little too general for this topic.

As there are many parallels between Bitcoin transactions and our traditional cash, let's look directly at an example from everyday life to better understand the actual meaning of inputs and outputs.

Let's imagine a wallet with a total of €185. Although this "account balance" of our wallet is not written anywhere, it is easily calculated from the bills and coins it contains, in this example a €5, €10, €20, €50 and €100 bill.

If we now want to pay something for €25, we select banknotes to settle the amount (as appropriately as possible), e.g. a €5 and a €20 bill, which are our inputs. The recipient of the payment then receives €25, a new output. The banknotes in our wallet are actually nothing more than outputs from past transactions that have not yet been spent, abbreviated to UTXO (Unspent Transaction Output).

Info

Note:

A UTXO is therefore an output of a past (and confirmed) Bitcoin transaction that has not yet been issued and can therefore still be issued.

One should not rely too much on the cash analogy, because a UTXO is of course not "in a Bitcoin wallet". A wallet only manages the user's keys in the background, while transactions take place solely in the Bitcoin network or "on the blockchain". With the information about which keys or addresses belong to the user, the wallet can then check in the Bitcoin network whether there is a UTXO that can be issued by the wallet. The wallet therefore searches the Bitcoin blockchain for our UTXO in order to display their sum as a visual account balance, just as we would do manually with a wallet.

In addition, banknotes are fixed to certain amounts, while Bitcoin outputs can of course accept any amount.

Change

As with a cash payment, however, it is not always possible to pay a desired target amount in full. If we want to pay a bill of €21 with our banknotes from above, we first have to spend more with our inputs than is actually necessary, e.g. €20 + €5. We then expect change of €4, i.e. an additional output that is returned to us.

Both banknotes and Bitcoin outputs can only be consumed in their entirety. You cannot cut a €20 bill in half if you want to pay someone €10.

Accordingly, Bitcoin transactions also often result in change or so-called change outputs, as we cannot split a UTXO, but can only spend it in its entirety. If we do not have a perfectly matching UTXO to pay a desired amount, we have to overpay, just like with cash. We send the excess difference, i.e. the change, back to our own address with another new output. We therefore pay the change back to ourselves with a "transaction to ourselves".

From the outside, it looks at first glance as if we have sent Bitcoin to two other recipients, as these are two ordinary outputs. In reality, however, one of the two recipients is the sender of the transaction itself, which can often be seen from the division of the amounts, as in this example:

Where is the transaction fee?

There is a simple answer to this legitimate question: nowhere. You can save yourself this extra space in the transaction and instead only indirectly indicate the desired transaction fee.

If you pay a €21 bill in a restaurant with €25 and nod a friendly "That's right" to the waiter, you have indirectly indicated that you would like to pay a €4 tip. It is exactly the same in the Bitcoin network: the difference between all inputs and outputs, i.e. the amount that was not explicitly spent, indicates the transaction fee and can be claimed by miners.

Coin Selection

We know from everyday life that there are often different ways to pay an amount, e.g. with large bills, lots of small coins or a mixture of both. It is precisely this task of selecting the UTXO (coin selection) that our wallet does for us in the background. As a simple user, you notice relatively little of this, which is usually a good thing.

The management of change also takes place entirely in the background via specially designated change addresses. For this reason, the user is not shown any change in their transaction overview to avoid any confusion.

However, making an optimal UTXO selection is by no means a trivial problem, as firstly there are often different combinations to fulfill the desired amount and secondly different goals can be pursued. How the coin selection is actually implemented can therefore differ from wallet to wallet.

However, you don't always want to leave the management of your UTXO completely automated to the wallet. In the following sections, we will take a closer look at the two main topics that should be considered.

Save fees

Transaction fees are generally specified as a fee rate in sat/vB, i.e. satoshis, the smallest unit of Bitcoin, per storage unit. We therefore pay correspondingly more fees for a transaction that uses a lot of memory or space.

There is therefore an incentive to keep the size of a transaction as small as possible. Now that we understand how Bitcoin's UTXO model works, we can look at two specific approaches to saving transaction fees both today and in the future.

Payment Batching

Batching is about making several payments in a single transaction. To do this, several outputs are simply created for the desired recipients. The transaction is of course still larger, but you still save storage space, as ideally you only need one or a few inputs.

This is a common approach, especially for exchanges and brokers who frequently pay out large amounts of Bitcoin for their customers.

Consolidations

Over time, smaller and therefore possibly impractical UTXO can accumulate in your wallet, similar to small coins in your wallet. However, which UTXO sizes are "impractical" and which are not depends entirely on individual usage, e.g. whether or not you carry out many smaller transactions.

The more UTXO you have to spend on a transaction, i.e. the more inputs a transaction has, the larger and therefore more expensive the transaction is. There is no getting around this fact for the time being, but you can adapt accordingly and take precautions. If there is low demand for transactions and therefore relatively low fees, it may be worthwhile to consolidate your UTXOs into one or a few new UTXOs with foresight. Such a transaction is often called a consolidation and is nothing more than a transaction to a separate address.

If the fees are then higher in the future, you save on transaction fees, as you have already been able to anticipate the costs of consolidating the "small change" at a literally more favorable time.

Consolidation can make sense from time to time, especially for users of a Bitcoin savings plan who regularly make withdrawals to their wallet and therefore accumulate a lot of UTXO. However, as already mentioned, this depends heavily on your own user behavior.

You can easily carry out a consolidation yourself by sending all your Bitcoin to a new address of your own. However, this is not ideal in most cases, as privacy in particular would suffer. The next section should clarify what is meant by this.

Info

Note:

As far as transaction fees are concerned, there is therefore a clear incentive to manage as few and correspondingly large UTXOs as possible and to bundle several payments into one transaction where possible and sensible.

Do I save fees by reusing addresses?

Privacy

All Bitcoin transactions are publicly traceable. If we give Bob an address to send us Bitcoin, he can see all the activities that have taken place so far and will take place in the future.

Most people are probably already aware of this feature of Bitcoin. Many people are therefore careful to use unused addresses for every transaction in order to provide as little information as possible to other participants in the network. This behavior is in any case encouraged by modern wallets, which automatically suggest new addresses for receiving. However, it is often neglected how the UTXO model can throw a spanner in the works.

Let's assume Bob sends us 0.1 BTC to an unused address. In addition to this new UTXO from Bob, we of course have other UTXO that we control with our wallet, but on other addresses. If we now spend 0.2 BTC, for example, and select Bob's UTXO among others, he can of course also see all other inputs in the outgoing transaction and their history accordingly.

Specifically, the following properties should be noted, also in combination:

  • If you use several UTXOs for a transaction, you also link their history and disclose this to the recipient as well as previous or future participants.
  • Change or change outputs are usually clearly recognizable as such. The recipient of a transaction can therefore trace future activities of the Change UTXO.
  • Consolidations are also often recognizable as such. You therefore publish which UTXOs, including their history, belong to your own identity and also disclose future activities through the new consolidated UTXO.
  • If you pay a small amount with a relatively large UTXO, you disclose the large amount to the recipient. This is comparable to paying for a pack of chewing gum with a €500 bill.

Info

Note:

As far as privacy is concerned, there is therefore an incentive to associate as few UTXOs as possible with each other and to pay as appropriately as possible.

Coin Control

Whether your own privacy, the lowest possible fees or a mixture of both is important to you is a matter for each individual to decide. There is no "right" or clear answer to the question of how and whether it is best to manage your UTXO.

However, the option to take this management into your own hands is offered by a relatively widespread function called Coin Control, which allows you to specifically select which UTXO you want to spend on a transaction. This allows you to carry out individual consolidations and/or pay more attention to your own privacy during transactions.

Many of the common software and hardware wallets support Coin Control, including the BitBoxApp of the BitBox02 recommended by Blocktrainer.de. All you need to do is activate the function in the advanced settings of the BitBoxApp in order to be able to manually select UTXO for a transaction.

An excellent overview of your own UTXO and the inputs and outputs of transactions is provided by the Sparrow Wallet, which offers additional functions such as the "freezing" of certain UTXO as well as an alternative algorithm for automatic UTXO selection that is optimized for privacy instead of low fees. In addition to simple hot wallets, the Sparrow Wallet can also be used in conjunction with the vast majority of hardware wallets, making it the ideal software for advanced Bitcoiners.