Replace-by-Fee (RBF)
Abbreviation: RBF
Pronunciation: rih-PLAYS by FEE
Also known as: Opt-in Replace-by-Fee, Transaction Fee Replacement, RBF
Definition
Replace-by-Fee, or RBF, is a Bitcoin transaction policy that lets a sender broadcast a conflicting transaction paying a higher fee so miners are more likely to include the replacement. It is not a way to reverse a confirmed payment.
Overview
What it means and why it exists
Replace-by-Fee, or RBF, is a Bitcoin transaction policy that lets a sender broadcast a conflicting transaction paying a higher fee so miners are more likely to include the replacement. It is not a way to reverse a confirmed payment.
How it works
A wallet constructs a replacement spending one or more of the same inputs, with changes that meet the receiving node's mempool replacement rules. The network considers whether the new fee, feerate and conflicts satisfy its policy. Different nodes may relay different candidates; miners ultimately choose which valid transaction enters a block.
Technical details worth understanding
Historically, opt-in RBF was signaled with an input sequence number, while full-RBF policies may accept replacement candidates regardless of signaling. Relay policy changes across software versions and are not identical to Bitcoin consensus rules. A zero-confirmation merchant must assess double-spend exposure even if a transaction was not visibly flagged replaceable.
What can go wrong
A replacement cannot create BTC from nowhere or undo a transaction already buried in the accepted chain. The replacement may alter recipients, making an earlier unconfirmed payment disappear. Notification systems must track conflicts and not mark a checkout complete simply because a transaction appeared in the mempool.
Practical checks
When tracking a Bitcoin payment before confirmation, keep a conflict set keyed by spent inputs. If a replacement arrives, update the original invoice's candidate transaction reference without recognizing two deposits. Require the configured confirmations before dispatching irreversible goods, particularly where a payment could be replaced by a different destination.
Related concepts
Further reading
Example
A customer sends BTC at 2 sat/vB and sees it waiting for an hour. Their wallet replaces it with a payment using the same destination but 12 sat/vB. The merchant matches the replacement and waits for the normal confirmation threshold instead of counting both as payments.
Comparison
RBF replaces a pending Bitcoin transaction with a conflicting one. Child-Pays-for-Parent (CPFP) adds a higher-fee descendant to improve package economics without changing the parent's outputs.
Key Takeaway
Historically, opt-in RBF was signaled with an input sequence number, while full-RBF policies may accept replacement candidates regardless of signaling.
Sources
- BIP 125: Opt-in Full Replace-by-Fee Signaling — Bitcoin Improvement Proposals (2026-08-02)
- Bitcoin Developer Guide: Transactions — Bitcoin Developer Documentation (2026-08-02)
- Bitcoin Developer Guide: Block Chain — Bitcoin Developer Documentation (2026-08-02)