I'm building a bitcoin wallet and I'm not sure if it's better to spend smaller UTxOs first or bigger UTxOs?
Asked
Active
Viewed 30 times
0
-
If by small you mean size, it is better to spend smaller UTXO because less fees. If small is about amount, I don't think it matters in most of the cases. It can be important in some cases when you care about privacy and amounts matter. – Nov 07 '21 at 19:42
-
Also coinselection is like a subject in engineering and two mods on this website are experts on it. However my personal opinion: Use coin control most of the times. There can be few times when you need to rely on algos so coinselection algos may help. Bitcoin Core uses 3 AFAIK which I may understand in few years but until then I use coin control. – Nov 07 '21 at 19:46
-
1https://murch.one/wp-content/uploads/2016/11/erhardt2016coinselection.pdf is a study about the performance of different automatic coin selection strategies. Neither largest-first or smallest-first are particularly good ones. – Pieter Wuille Nov 07 '21 at 20:37