Coin selection.

The wallet’s job of picking which UTxOs to spend for a given target amount.

Think of it as

Like making change at the till: hand over one 20 or four 5s for the same 20 purchase. Each choice has knock-on effects on fees, privacy, and wallet hygiene.

In depth

Because a UTxO must be spent in full, wallets need an algorithm to pick a set of UTxOs that covers a target amount. Strategies trade off transaction size, fee, change output, dust accumulation, and privacy. CIP-2 documents the strategies used in the Cardano ecosystem.

Example

To send 12 ada, a wallet may pick a 10 ada and a 5 ada UTxO (total 15) rather than one 100 ada UTxO, to keep change small.

Try it interactively Try the three coin-selection algorithms

Next on this path

  1. Dust A UTxO so small it costs more in fees to spend than it is worth.
  2. Change output A new UTxO that returns the leftover value to the spender after a transaction.