Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: corvo.kaan on May 03, 2020, 08:11:12 AM



Title: More Input-Values than necessary. How/why is this possible? No it is not the fee
Post by: corvo.kaan on May 03, 2020, 08:11:12 AM
The TXID I am talking about: 21179a8560a0a0906f0c3396af338f74528130d46b65b7f0c79c378d343b3177

blockchain.com link: https://www.blockchain.com/btc/tx/21179a8560a0a0906f0c3396af338f74528130d46b65b7f0c79c378d343b3177 (https://www.blockchain.com/btc/tx/21179a8560a0a0906f0c3396af338f74528130d46b65b7f0c79c378d343b3177)

3JZq4atUahhuA9rLhXLMhhTo133J9rF97j is a known Exchange-Address.

Within above listed transaction there are multiple output-transactions which this address has received referenced as input-transaction to pay 1Kr6QSydW9bFQG1mXiPNNu6WpJGmUa9i1g.

In the above transaction, the source address 3JZq4a.. issues 7 previously received transactions to pay the target address 1Kr6QSy... with 2000 BTC, the rest goes back to its Change address.

My question now is why 7 transactions are "consumed" for this, when it would have worked with a fraction of the transactions. For example the 7793.90573 BTC transaction.

My first assumption was that this is somehow chronologically handled by the wallet, but even if that were the case, according to the listing in the blockchain explorer after the first 4 referenced transactions used as input, the sum would be sufficient.

131,37735 BTC

1687,1255 BTC

157,79525 BTC

395,876 BTC

Are the first Transactions consumed and the result already exceeds 2k BTC.

I am thankful for any help and ideas!


Title: Re: More Input-Values than necessary. How/why is this possible? No it is not the fee
Post by: Rath_ on May 03, 2020, 08:19:07 AM
My question now is why 7 transactions are "consumed" for this, when it would have worked with a fraction of the transactions. For example the 7793.90573 BTC transaction.

It is a fee saving measure. Transaction fees are relatively low right now so it is a perfect time for consolidating inputs  (https://bitcointalk.org/index.php?topic=2848987.0). In case they need to send a lot of coins when transaction fees spike, they won't have to pay an arm and a leg for a transaction since it will consist of only one input and x outputs. The more inputs and outputs you have, the more your transaction weights and the more you have to pay.


Title: Re: More Input-Values than necessary. How/why is this possible? No it is not the fee
Post by: ranochigo on May 03, 2020, 08:20:24 AM
There are a lot of factors when it comes to inputs selection. You're right in a sense that they could have used a few of the inputs instead of all of them. However, it is not exactly the most cost-efficient way of doing it.

If you analyse the address, you'll realise that for that address, there's only one UTXO. My theory is that the exchange is trying to save on fees and thus attempts to consolidate inputs by spending all of them in order to generate one UTXO in the end.


Title: Re: More Input-Values than necessary. How/why is this possible? No it is not the fee
Post by: corvo.kaan on May 03, 2020, 08:24:47 AM
Thank you very much for your quick answers!

I was not familiar with the concept of consolidating inputs, but it makes perfect sense!

Thanks again for your insights!