On-going work: Coin Selection Simulation



Summary:

Murch, a Master's thesis student, has developed a Coin Selection Simulator and re-implemented multiple coin selection strategies of prominent Bitcoin wallets (Bitcoin Core, Mycelium, Breadwallet, and Android Wallet for Bitcoin). He invites interested parties to take a look at his work, which includes preliminary simulation results and three figures showing the simulated wallets' UTXO compositions at the end of the simulation. Murch has analyzed the Coin Selection problem and created a framework to simulate wallet behavior on basis of a sequence of payments. He plans to publish the simulation code around Scaling Bitcoin or after he turns in his thesis. Murch also addresses a question from Daniel Weigl regarding why Mycelium generates a very big UTXO set for 5460sat. Murch explains that his simulation of the Mycelium coin selection adds small change outputs to the fee but got the boundary wrong. Instead of the 5460, he dropped at the dust boundary which calculates to 4440 in his simulation. Therefore, the results in the table might be slightly too big, but likely indicative of the actual Mycelium behavior. Murch assumes that Mycelium doesn't create small change outputs but rather hardly ever spends them when received. Murch believes that Mycelium appears to select UTXO in a FIFO approach, but after the selection, prunes by removing the smallest selected UTXO until the excess beyond the spending target is minimized. This post-selection step seems the likely reason for Mycelium's small UTXO build-up.


Updated on: 2023-05-19T23:54:55.137951+00:00