On-going work: Coin Selection Simulation



Summary:

A researcher, Murch, has analyzed the Coin Selection problem and re-implemented multiple coin selection strategies of prominent Bitcoin wallets including Bitcoin Core, Mycelium, Breadwallet and Android Wallet for Bitcoin. As part of this research, Murch created a framework to simulate wallet behavior on basis of a sequence of payments. The simulation results are presented in a two-page description along with three figures showing the simulated wallets' UTXO compositions at the end of the simulation. Murch also invited feedback and requested another sequence of incoming and outgoing payment amounts to run the simulation on. In response to Murch's email, Daniel Weigl, from Mycelium, inquired about the behavior of Mycelium coin selection algorithm. Murch clarified that Mycelium selects UTXO in a FIFO approach, but prunes by removing the smallest selected UTXO until the excess beyond the spending target is minimized. This post-selection step seems to be the likely reason for Mycelium's small UTXO build-up. BreadWallet uses a very similar FIFO approach, but doesn't prune which causes their average UTXO set to be much smaller. A balanced approach between these two approaches might be that instead of pruning all small inputs, a few of the small inputs could be allowed to be selected to slowly drain low-value UTXO out of the wallet by spending them over time.


Updated on: 2023-06-11T20:05:27.910500+00:00