Ethereum-UTXOs: Basics and solutions to the Dust-UTXO problem
Ethereum UTXOs are fundamental components of the ethereum 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 ethereum 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 ethereum 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 ethereum transaction.
Ethereum transactions: The principle
A ethereum transaction is the essential building block of the ethereum network that makes it possible to transfer ethereum between different parties. Various factors play a role here:
The building blocks of a ethereum transaction
- Transaction ID (TxID): A unique identification number that identifies each transaction on the network.
- Inputs: The inputs of a transaction refer to pre-existing UTXOs received in previous transactions. These inputs indicate how many ethereum are to be processed in the transaction and refer to the ethereum addresses of the UTXOs.
- Outputs: The outputs determine where the ethereum should be sent. Each output contains a ethereum address and the amount of ethereum that will be sent to this address.
- 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 ethereum transaction –– Example
Assuming Peter wants to send Anna 0.1 ethereum, the process is as follows:
- 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 ethereum.
- 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 ethereum in his wallet.
- The wallet now uses this UTXO as input for the new transaction and specifies that 0.1 ethereum should be sent to Anna.
- The wallet now generates a digital signature to prove that it is authorised to use the ethereum from the selected UTXO.
- The transaction is sent to the ethereum 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 ethereum.
- Once the transaction has been confirmed in the block, Anna receives the 0.1 ethereum in her wallet and the UTXO of 0.2 ethereum 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 ethereum results in a new UTXO in Peter's wallet of 0.09 ethereum and a UTXO in Anna's wallet for the amount of 0.1 ethereum.
The UTXO principle and its effects
As already explained in the transaction structure and process, UTXOs play a major role in ethereum 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 ethereum blockchain that has not yet been used as an input in a transaction. In other words, it is an amount of ethereum 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 ethereum address thus results from the sum of the UTXOs that are assigned to this address. Each time a ethereum 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 ethereum transaction in the blockchain and prevents the "double-spending problem", i.e. that a ethereum 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 ethereum transfer itself, in which UTXOs are used as inputs. A UTXO, on the other hand, is the unused amount of ethereum 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 ethereum network, the UTXO model is used to ensure that only as much ethereum 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 ethereum 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 ethereum would automatically result in higher fees.
However, the main reason for the fee differences lies in the way transactions are processed in the ethereum 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 ETH. The total value of these UTXOs is therefore 0.01 ETH. However, another transaction uses only a single UTXO worth 0.01 ETH. Although both transactions have the same total value of 0.01 ETH, 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 ethereum amount in both transactions is the same.
To summarise, this means that the network fee does not increase linearly with the amount of ethereum 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 ethereum 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 ethereum 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.
Ethereum'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 ethereum transaction, it's like someone putting a coin in your physical wallet. This is because a ethereum 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 ethereum 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 ethereum 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 ethereum are accumulated over time, depending on the regularity and amount.
For example, if you currently invest 100 euros per week in ethereum, this can still be spent well, as the transaction fees are currently (March 2024) a few thousand gwei, 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 ETH or 0.000076 ETH are to be spent, the average transaction fee is 0.0002 ETH or more, then the person who wants to spend or move the UTXOs must pay more ethereum in fees than ethereum is to be transferred. Thus, the ethereum 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 ethereum stacking
- UTXO consolidation: One way to minimise the dust UTXO problem is to consolidate your regular ethereum 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.
- Efficient fee calculation: Choose a ethereum 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 ethereum 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 ethereum. This means that Lightning cannot currently offer a definitive solution to the problem.
Summary and outlook
The ethereum 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 ethereum to keep up to date with these technical details and developments in order to be able to use ethereum 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.