-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers
Description
Overview
Enhance the on-chain Bitcoin transaction functionality with better UTXO selection algorithms and Replace-by-Fee (RBF) support.
Current State
- basic P2WPKH tx building and signing
- multi-source fee estimation with fallback
- dust threshold and minimum relay fee handling (NOTE: Implemented but haven't tested)
- simple largest first UTXO selection
- RBF flag enabled but no bumping logic
TODO
-
Improve UTXO Selection Algorithm
-
currently using largest first selection, which can:
- Create unnecessary change outputs
- Reduce privacy by consolidating UTXOs
- Lead to suboptimal fee efficiency
-
Sub-Tasks
- Implement Branch and Bound algorithm for exact matches
- Add privacy-focused selection (avoid address reuse patterns)
- Implement coin selection strategies (smallest-first for small payments)
- Add tests comparing selection algorithms
-
Ref:
-
Implement RBF (Replace by Fee) Support
-
File: backend/src/services/onchain/transaction_builder.rs, backend/src/api/wallet.rs
-
currently setting
ENABLE_RBF_NO_LOCKTIMEbut missing:- Fee bumping logic
- API endpoints for RBF
- Tx replacement validation
-
Sub-Tasks
- Add
bump_fee()method to TransactionBuilder - Implement fee rate increase validation (BIP 125 rules)
- Add API endpoint
/api/wallet/bump-fee - Handle mempool conflict detection
- Add RBF status tracking in transaction history
- Add
-
Ref:
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestgood first issueGood for newcomersGood for newcomers