Coin Selection
Coin selection is the process by which a bitcoin wallet chooses which unspent transaction outputs to spend when building a transaction. The choice affects fees, privacy, and the wallet's future flexibility. Bitcoin Core added a branch-and-bound algorithm in 2018 that searches for input combinations matching the payment amount exactly, eliminating the change output entirely when it succeeds.
Why it matters
Every input added to a transaction adds bytes, and every byte costs fees, so selecting two large outputs is cheaper than selecting twenty small ones. Privacy pulls in another direction: combining outputs from different sources links them publicly under the common input ownership heuristic, telling the world they belong to the same owner. Selection also shapes the future, since spending recklessly can leave a wallet full of dust, fragments too small to be worth spending when fees rise.
How it works
Simple strategies spend the largest or oldest outputs first. More refined algorithms, like the branch-and-bound search used by Bitcoin Core, hunt for a combination whose value matches the payment plus fees closely enough that no change output is needed, which saves bytes and removes a privacy leak. Wallets aimed at privacy let users select coins by hand, quarantining outputs from identified sources. The differences are invisible on the surface but compound over hundreds of transactions.
Related Terms
Ready to convert your gold to Bitcoin?
Get Your Free Kit →