pull down to refresh
68 sats \ 1 reply \ @alt 18 Dec \ on: Question - in Sparrow, when you send bitcoin, why are there multiple inputs? bitcoin
My guess is that it's not optimising for single transaction efficiency, but rather efficiency over the long run. The most efficient strategy is to have one UTXO in your wallet, so you always need only one input.
If you have multiple UTXOs in your wallet, it makes sense (from efficiency perspective) to use multiple UTXOs now in order to consolidate them into a change UTXO. Over time, the number of UTXOs will get smaller. This way you tradeoff a small amount of efficiency in that particular transaction to gain high efficiency in the long run.
The alternative is to use the minimum number of UTXOs now, and eventually end up with a large number of small UTXOs. At some point you will be hit with huge transaction fees when you try to spend them.
That's probably what's happening here.
I think you're right. It's way more complex than I thought it was.
It looks like the code is in here, in the SendController.java file.
reply