What is the purpose of consolidating UTXOs, in simple terms?

Never understood why it’s important but want to learn

Reply to this note

Please Login to reply.

Discussion

TIL there’s a remind me bot on nostr

In a high fee environment it makes sense to smaller UTXOs combined into a larger one. Depending on free level, the cost to send s transaction could be higher than the UTXO itself rending it basically valueless

Lots of typos, but hopefully that makes sense

Got it, thank you!

YES

There are a few schools of thought on this.

One as mentioned is that a lot of small UTXOs will incur higher fees because your transaction size (in bytes not sats) will be larger.

I don’t like UTXOs being too larger for on-chain transactions because anyone you paid can see how much you have and you don’t want to pay someone 1 million sats from a 100 million sat (1 BTC) UTXO.

I just keep my cold storage UTXOs at about 1 million sats. Nice round number for me.

Makes sense, thank you!

when paying onchain the fee is a function of the transaction size (the bigger the transaction, the higher the fees).

having multiple input UTXO makes the transactions bigger, so it is sometimes a good idea consolidating UTXO.

One thing you have to take care of however is privacy: if you don't mix your UTXOs carefully you might link your identity to unwanted TX or reveal the amount of Bitcoin you own.

just a clarification: when saying "bigger" I'm referring to the number of bytes representing the transaction, not the amount in BTC transferred

Thank you for the explanation, that makes sense

Consolidate when fees are low, so if you need to spend when fees are higher—presuming the future will have higher fees with lower block subsidy—your tx size will be smaller (more UTXOs in a transaction is larger tx size).

Another consideration tho is combining UTXOs shows common ownership, so don’t combine KYCd UTXOs with non KYCd UTXOs for privacy’s

Thank you sir 🫡

Would you consider withdrawal from exchange and send it theough 2 nodes before sending it to cold storage somewhat cleaned? Or little less KYCed?

I’d give it a nice whirlpool using sparrow :)

Yes you need to coinjoin with whirlpool or bridge through Monero or Liquid for privacy if you want forward privacy. Doesn’t take away the KYC just gives your privacy moving forward.

Consolidating UTXOs is done when fees are low so that additional block space is not used for transactions when fees are high. You should always use Wasabi Wallet when consolidating UTXOs since it will be done privately in a coinjoin, preventing common ownership from being revealed on chain.

How so? If they consolidate it’s obvious that they are commonly owned. Or what do I misunderstand?

The coinjoin also consolidates inputs from other peers, so it isn't possible to separate which inputs are owned by each peer. Here's an example of a coinjoin transaction: https://mempool.space/tx/659e7f15dca41fb521915d5e436ad173af776ec414870c41287f4667e19dd98b

I see. And how do I consolidate in Wasabi so it’s part of a coinjoin?

Coinjoins are automatic in Wasabi any time you receive a transaction or create change as long as your balance is high enough and fees are low enough. Waiting until you have multiple UTXOs to consolidate instead of coinjoining them one by one saves on fees, this tutorial shows two inputs being consolidated in one coinjoin transaction: https://www.youtube.com/watch?v=UbOAbXjzBJg

In the video, 2 utxos were combined into 4 utxos. If I send all 4 together, won't that reveal common ownership and the coinjoin was for nothing? Or does it still make sense because there were so many different inputs to the coinjoin that it's still difficult to determine where they came from even if sent together afterwards? Trying to understand that

Sending all 4 UTXOs together is the least private way to spend them since that would give a clue indicating the total amount you registered for that round, but it would not be fully effective since there are many input combinations that add up to that amount. Spending the private UTXOs individually or remixing them before sending your entire balance is the best way to handle them.

OK. Thank you. That's the way I understand it. But then consolidating 2 UTXOs in a coinjoin and getting 4 back isn't really consolidation, is it? The point of consolidation is to have fewer UTXOs after than before, because I want to save on fees when fees are high. No?

You can consolidate more than 2 inputs in each coinjoin round (up to 30 in BTCPay Server's implementation), but yes, you will receive multiple outputs to hide the amount.

Ah okay. That makes more sense. If I have 10 UTXOs I could consolidate them and then maybe get 5 out of it. Got it