Coin Selection
Pronunciation: KOYN suh-LEK-shun
Also known as: UTXO Selection, Input Selection
Definition
Coin selection is the wallet process of choosing which unspent transaction outputs to use as inputs for a UTXO-based transaction. The choice affects fees, change, privacy, and the wallet’s future UTXO set. An effective algorithm must fund the payment and fee while avoiding uneconomical inputs, excessive change, unnecessary address linkage, and operational problems such as locked or immature outputs. The decision is both financial and operational.
Overview
Coin Selection determines which available UTXOs a wallet will consume. Because each input adds transaction weight, using many small outputs can increase the fee. Selecting one large output can be cheaper but may reveal links between funds or create a large Change Output.
Algorithms balance several goals: reaching the target amount, minimizing fees, avoiding dust, reducing change, preserving privacy, and maintaining useful future outputs. Some wallets search for an exact or near-exact match, while others group outputs or consolidate them when fees are low. There is no universally optimal strategy.
Not every visible output is eligible. A UTXO can be immature, already reserved by another pending transaction, locked by policy, tied to a specific script, or too small to spend economically at the current feerate. Wallet software must coordinate concurrent spending so two transactions do not select the same input.
Coin selection has privacy consequences because spending several UTXOs together can suggest common control. Reusing a change address or combining funds from distinct business activities can strengthen that inference. Organizations may separate treasury pools, customer funds, or accounting categories even when a lower-fee combination is technically available.
For payouts, the algorithm should be deterministic enough to audit while still adapting to fee conditions. Operators need visibility into selected inputs, expected change, transaction weight, and fee rate before approval. Poor selection can produce expensive transactions, stuck broadcasts, or fragmented UTXO inventories that become costly to manage later. Estimating the final Virtual Byte (vByte) size helps the wallet compare the cost of adding another input with the value and privacy benefit it provides.
Key Takeaway
Coin selection funds a UTXO transaction while balancing fees, privacy, change, and future wallet health, so the cheapest immediate choice is not always the best.
Sources
- Bitcoin Developer Guide: Transactions — Bitcoin Developer Documentation (2026-08-02)
- Bitcoin Developer Guide: Wallets — Bitcoin Developer Documentation (2026-08-02)
- Bitcoin Developer Reference: Transactions — Bitcoin Developer Documentation (2026-08-02)