Open Transisto opened 2 years ago
The coin selection algo should chose the smallest available single output that's larger than the amount to send.
This is also bad for time domain privacy, basically the wallet will always reused the same large UTXO change for every transaction.
Wondering if anyone can double check that this is what the Coin Selection is doing. In my testing there was no amounts that would select any other UTXO than the largest one.
Not how it works. You can read more about the available coin selection algorithms here:
we use the default one
looks like it sorts utxo first, so maybe thats why the largest utxo gets spent first
hmm, maybe we should look more into this
https://github.com/bitcoinjs/coinselect/issues/74
Is that library popular? Looks like such a basic oversight.
...
To reproduce, example:
A wallet has 21 UTXO, 20 between 0.01 and 0.02 BTC and one of 1.00000000 BTC
Ask the wallet to send 0.009
The wallet will always send from the largest UTXO.