Author

Topic: Question on UTXOs (Read 257 times)

hero member
Activity: 868
Merit: 952
February 18, 2024, 01:44:07 PM
#15

Note that I'm not invalidating the advice given, I even suggested that the second transaction could be better in general. It'll be important to understand someone's spending habits as well. I don't see any harm trying to understand if OP can possibly predict and estimate their spending behaviors over the long run.

Seriously I have to agree with you, although a bit off topic, my reason been that you have to watch your spendings sometimes before deciding to consolidate. Because most at times consolidation ends into two output. But imagine you have many UTXOs and need to send out some specific amount out your wallet, you can just manually Calculate the total amount + your transaction fee to be spent and look for a UTXO that matches almost that amount, then you send out everything this gives you a direct 1 input and 1 output transaction since you don’t have change again. This was actually by me when fees where high and I needed to use exchanges so I mostly transferred out like that without having to worry about consolidation, so your spending pattern definitely matters when consolidating
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
February 18, 2024, 02:16:47 AM
#14
Actually you didn't pay attention to  the prerequisite accompanied  OP's scenarios.  He clearly said "lets say the fee rate is the same in both scenarios." Besides. no one right minded would not consolidate to "into an exchange " .  Thus, I'm sorry, but you speculations  have no sense. Answers which highlights the second scenario as the cheapest one are accurate.
I did. No need to apologise, you might've misunderstood me. I didn't make the assumption between making transactions of different periods, and thereby differentfee markets.

We usually consolidate UTXOs periodically when fees are low, and hence you gain an advantage in the future; you avoid paying a higher fee in the future when fees are high. Sure, that'll make sense if and only if you expect the benefits for adding another transaction to be lower than that just being able to spend an entire UTXO in its entirety and thereby making it a 1 input to 2 output transactions in the future. As much as we should provide general advice, I'm thinking of a different scenario where it can be applicable to some.

Let's say I have 20 x 0.01 BTC UTXOs, periodic payments, service payments, etc. Then I want to pay another person 0.01BTC, or 0.05BTC periodically, let's say per month.

Would it make sense for me to do a consolidation with:
20 inputs -> 1 UTXO, and then 1 input -> 2 UTXOs over another 4 transactions.
(1402+(141*4)) = 1966

Or

5 inputs -> 1 or 2 UTXOs 4 times
(412*4) = 1648

Note that I'm not invalidating the advice given, I even suggested that the second transaction could be better in general. It'll be important to understand someone's spending habits as well. I don't see any harm trying to understand if OP can possibly predict and estimate their spending behaviors over the long run.
hero member
Activity: 714
Merit: 1298
February 18, 2024, 02:04:31 AM
#13
~

Actually you didn't pay attention to  the prerequisite accompanied  OP's scenarios.  He clearly said "lets say the fee rate is the same in both scenarios."   Thus, I'm sorry, but you speculations  have no sense. Answers which highlights the second scenario as the cheapest one are accurate.
legendary
Activity: 3038
Merit: 4418
Crypto Swap Exchange
February 17, 2024, 11:01:43 PM
#12
Actually, there is insufficient information so none of the answers can possibly be accurate. If you are talking about the scenario that you've posted without any further transactions, then your second transaction would consume less fees because it has a smaller size in total.

Think of it this way: If you are consolidating transactions, you are making use of periods of lower fee rates to reduce the fees that you have to pay if you were to spend multiple inputs at once in the future, where fee rates are higher. Hence, you can pay less fees by having a smaller TX size; 1 inputs to 2 outputs instead of many to 2.

If you know that some of UTXO can possibly cover the entirety of another transaction, ie. depositing it into an exchange in the future, then you can simply deposit with 1 input to 1 output transaction when required, instead of having to consolidate to yourself, thereby incurring additional fees. However, if you are unsure and you want to take advantage of being able to use lower fees to get your transaction confirmed, then a consolidation would be your ideal way forward. Instead of having to spend multiple UTXOs together in the future, you just need to spend one of the UTXOs.

If you have any transactions that you would need to make immediately, it would be a good idea to use all your UTXOs or more UTXOs than needed, and consolidate them into a change output.
hero member
Activity: 714
Merit: 1298
February 17, 2024, 03:08:45 PM
#11
but if all the UTXO meant to arrive at same output address still the option 1 will be cheaper.

Nope, it is not correct.

To ovoid any question mark  you may use the online calculator at  https://btc.network/estimate

.............................................................................................................................

and    persuade yourself of the cheapest  option which is  the Scenario 2 in thy case of OP. 3 x $0.77 = 2,31 (Scenario 1) > $1.73 (Scenario 2)
hero member
Activity: 2366
Merit: 793
Bitcoin = Financial freedom
February 17, 2024, 02:12:11 PM
#10
As explained above, the scenario 2 is incomplete so it has to be like 3 Inputs => consolidated into 1 input => 3 output.
Not really sure that's what OP meant! Because in such scenario, adding an intermediary consolidation transaction doesn't make any sense, it's just a waste of money. The only condition where it would make sense is if the fee rate when consolidating is way lower than usual.
You have two transactions: the first has three inputs and one output, the second has one input and three outputs! Why do you need that! A single transaction with three inputs and three outputs is less costly.

AFAIK, he said transaction meant spending it and that is why the second consolidation doesn't really come under spending, it just gonna combines three UTXOs into one in one of his addresses so when we want to send the funds again three times it will be more costly than initially spending in three but if all the UTXO meant to arrive at same output address still the option 1 will be cheaper.
legendary
Activity: 2702
Merit: 3045
Top Crypto Casino
February 16, 2024, 04:37:23 PM
#9
As explained above, the scenario 2 is incomplete so it has to be like 3 Inputs => consolidated into 1 input => 3 output.
Not really sure that's what OP meant! Because in such scenario, adding an intermediary consolidation transaction doesn't make any sense, it's just a waste of money. The only condition where it would make sense is if the fee rate when consolidating is way lower than usual.
You have two transactions: the first has three inputs and one output, the second has one input and three outputs! Why do you need that! A single transaction with three inputs and three outputs is less costly.
hero member
Activity: 2366
Merit: 793
Bitcoin = Financial freedom
February 16, 2024, 10:42:51 AM
#8

Another way to visualize your question

Scenario 1: 3 inputs + 3 outputs.
Scenario 2: 3 inputs +1 output

Inputs and Outputs makes the fee higher.

As explained above, the scenario 2 is incomplete so it has to be like 3 Inputs => consolidated into 1 input => 3 output.

So if the intention is to send to 3 different user then simply use 3 input and 3 output is the cheapest than consolidating than paying the fee again and more inputs if there is any change left from the previous and so on.
legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
February 16, 2024, 06:46:49 AM
#7
Scenario 1: I have 3 UTXOs and I make 3 transactions out of them.
Scenario 2: I have 3 UTXOs and I consolidate them to 1 transaction.

Is the total fee I pay in both scenarios the same?
Most of the members take the phrase "consolidate them to 1 transaction" as "to one UTXO", so am I.
If so, those scenarios don't represent the same use-case so it's unfair to the other option to compare fees.
'Scenario 1' pays three recipients and 'Scenario 2' pays only one; to balance it, second scenario should also be paying three recipients.

-> If the use-case is to pay three different recipients in a short period when mempools' average fee should be similar;
  • In "Scenario 1", you will create three separate transactions with 'one input' - 'one or two outputs' each.
  • In "Scenario 2", you will create three separate transactions, the first one will have 'three input' - 'two outputs', then the change will be spent by the second txn (1in-2out) and the second's change to be spent by the third txn (1in-1or2out).
Basically you'll spend more fee in "Scenario 2" because of the unnecessary consolidation of 3 inputs in the first transaction that'll be larger than spending just 1 input.

-> But if Scenario 2 will pay all three recipients in one transaction, the single transaction will spend all three inputs and create three or four (if has change) outputs.
The overall size, so as the fee in "Scenario 2" in this case would be lower than three separate transactions.
legendary
Activity: 2352
Merit: 6089
bitcoindata.science
February 15, 2024, 11:29:34 AM
#6
lets say the fee rate is the same in both scenarios.

Scenario 1: I have 3 UTXOs and I make 3 transactions out of them.
Scenario 2: I have 3 UTXOs and I consolidate them to 1 transaction.

Is the total fee I pay in both scenarios the same?

No matter what kind of addresses they are, the fee will always be slightly higher when you add additional outputs to the transaction, even though outputs are quite small for the regular address types.

Another way to visualize your question


Scenario 1: 3 inputs + 3 outputs.
Scenario 2: 3 inputs +1 output

Inputs and Outputs makes the fee higher.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
February 15, 2024, 07:38:50 AM
#5
No matter what kind of addresses they are, the fee will always be slightly higher when you add additional outputs to the transaction, even though outputs are quite small for the regular address types.

Although the difference does not become noticeable unless the fee rate skyrockets to hundreds of satoshis per vbyte. If you are spending them now, when the fee rate is low, you won't nocide the dollar fee becoming larger.
legendary
Activity: 1512
Merit: 7340
Farewell, Leo
February 15, 2024, 06:14:51 AM
#4
Is the total fee I pay in both scenarios the same?
We will need a little bit more context, but likely no. The fee in the second scenario will be less, because the change (if any) will create one output instead of three. If you don't create any change, and simply spend each UTXO to create another UTXO, then it is still cheaper. A transaction spending a segwitv0 input and creating a segwitv0 output is 110 vb. Multiply it by 3, you get 330 vb. On the other hand, if you spend three segwitv0 inputs to create one segwitv0 output, the transaction size will be 246 vb.
legendary
Activity: 1512
Merit: 4795
Leading Crypto Sports Betting & Casino Platform
February 15, 2024, 06:11:29 AM
#3
Let us assume it is segwit address (bc1q).

Scenario 1: I have 3 UTXOs and I make 3 transactions out of them.
Each will have vbyte of 110 which is 330 for the three transactions.

Scenario 2: I have 3 UTXOs and I consolidate them to 1 transaction.
It will have a vbyte of 246 in total.

You can also play around with this: https://jlopp.github.io/bitcoin-transaction-size-calculator/
legendary
Activity: 3290
Merit: 16489
Thick-Skinned Gang Leader and Golden Feather 2021
February 15, 2024, 06:11:17 AM
#2
Is the total fee I pay in both scenarios the same?
No.
See Coinb.in's Bitcoin Fee Calculator, and play around with the sliders.
member
Activity: 67
Merit: 14
February 15, 2024, 06:05:02 AM
#1
lets say the fee rate is the same in both scenarios.

Scenario 1: I have 3 UTXOs and I make 3 transactions out of them.
Scenario 2: I have 3 UTXOs and I consolidate them to 1 transaction.

Is the total fee I pay in both scenarios the same?
Jump to: