6

In 'Mastering Bitcoin' (pg 130) it is explained that a transaction will require higher fees if it is complex. For example, if I collect bitcoin from 100 people to buy a single tent, then when those 100 UTXO's (unspent transaction outputs) addressed to me will need to be aggregated by the miners when validating my purchase of the tent. This aggregation needs more kilobytes and is more complex so requires a larger fee.

In the real world this would be like getting charged higher fees when paying with smaller coins. So do bitcoin transactions simply become more complex with time? What is there to consolidate UTXO'S and prevent them from being split down further and further making every transaction more complex in the long run?

Imagine if we could only get change, in the fiat world, but never consolidate it for larger notes. In the end we just all have pennies, right?

Where have I misunderstood?

2 Answers 2

5

Yes, they do.

You're right, generally, the size of UTXO Set has been growing over the years. E.g. in May 2014 it was 11 million, in May 2015 it was 19 million, May 2016 it was 38 million, in May 2017 it was 51 million.
Now, there are actually fewer than 50 million UTXO. How did that happen? As you noticed, spending a lot of UTXO in a single transaction is much more expensive. When the Bitcoin network was congested last winter, many Bitcoin users (especially businesses) were paying exorbitant transaction fees, because their funds were split into so many small UTXOs. At peak price and congestion spending a single UTXO could easily cost more than $10. Especially when multiple UTXO were needed to build a transaction, they were painfully expensive. Naturally, many users aimed to create the smallest possible transactions and skipped consolidations altogether, which caused the UTXO Set to grow rapidly in the congested phase.

Let's look at the UTXO Set size in the past year: UTXO Set growth over the last year, peaking around the end of 2017 then sharply retreating in the first months of 2018

Even though more efficient usage patterns had been suggested well before the winter (e.g. Harding's excellent article on Batching in August 2017). Adoption of batching and frequent consolidations only peaked after the crisis. It seems that the price rally in combination with the severe congestion made Bitcoin users more aware of their wallet's UTXO pool compositions. From January to March we see an extreme regression of the UTXO Set size from more than 64 million to 51 million UTXO. When you look up blocks from then, you'll find many transactions that spent numerous UTXOs to single outputs. These transactions often paid very low fees, queuing in the mempool until fee rates dropped low enough for them to be included. These consolidation transactions only had the express purpose of condensing funds into fewer UTXO at the lowest possible cost.

See this example from mid April: The 1 sat/B transactions being flushed from the mempool line up with drops in the UTXO Set size

As the transactions paying very low fees get included in blocks, the size in the UTXO set drops.

Since then, we've also seen a significant increase in use of batching, which tackles the UTXO Set growth from another angle: batching reduces the number of change outputs that get produced. When sending twenty payments in twenty different transactions, chances are that you will be creating 20 change outputs. When you send twenty payments in a single transaction, you'll only create a single change output. Heavy use of batching can therefore cut the UTXO creation per payment almost in half.

8

When you pay someone using a number of utxo's to fund your payment, the output being created is a new single utxo with the total amount of all those input (minus change and fees). Effectively, you are consolidating utxo's as inputs to fund your payment.

UTXO consolidation and breakage happens all the time by normal payments and doesn't usually require special intervention or handling by the user making the payment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.