This guide will help you understand the technical scope of this library, and how to contribute.
Coin selection is the operation of selecting a subset of UTXOs from the wallet's UTXO set for constructing transactions. It is a fundamental and generic wallet management operation, and a standalone Rust library would be useful for various downstream wallet projects.
Coin selection is a variant of the Subset-Sum problem and can be solved via various algorithms. Finding an optimized solution depends on various conflicting goals such as minimizing transaction fees (fees per data byte) and confirmation time, avoid spending below dust limits, maximize privacy, and avoid bloating the network's UTXO set.
The following literature describes the current state of coin selection in the Bitcoin ecosystem:
- Murch's coin selection thesis: PDF
- A Survey on Coin Selection Algorithms in UTXO-based Blockchains: PDF
- Bitcoin Core's Coin selection module: GitHub
- Bcoin's Coin selector: GitHub
- A rough implementation of the Lowest Larger Algorithm: GitHub
- Waste Metric Calculation: GitHub
The list of things that you can contribute to,
- Bug fixes.
- New algorithms expanding the technical scope.
- Helper functions to improve the usability.
- Format using
cargo fmt
- Linting using
clippy
- Code coverage using
tarpaulin
- Document well