Bitcoin Replace-by-Fee (RBF) Explained: Replacement Rules and Risks
An unconfirmed Bitcoin transaction may be replaced by another transaction spending one or more of the same inputs. Replace-by-Fee (RBF) is a policy mechanism used by nodes to decide whether a higher-fee conflicting transaction can replace a transaction already in their mempool. RBF does not change Bitcoin consensus rules.
How replacement works
A replacement normally spends at least one input already spent by the original unconfirmed transaction, changes the transaction contents, and pays fees sufficient for the receiving node's replacement policy. The replacement might preserve the intended payment and increase the fee, but it can also change outputs. The transaction identifier usually changes.
The original BIP125 described opt-in signaling via input sequence numbers and specific replacement conditions. Some Bitcoin Core versions and nodes use full-RBF policies that can consider replacements without explicit opt-in signaling. Therefore, a recipient must not interpret an absence of RBF signaling as a guarantee against replacement.
Why fee rate alone is insufficient
A candidate must meet the relevant node's incremental relay and absolute-fee requirements, as well as other replacement restrictions. Mempool policy is local and can evolve between software versions. A higher sat/vB rate by itself does not guarantee acceptance or network-wide propagation.
Recipient security
A zero-confirmation payment remains vulnerable to conflicting transactions regardless of its displayed RBF flag. Merchants should apply risk controls proportional to the payment and use confirmation policies where settlement assurance matters. Even confirmed transactions have reorganization risk, which generally decreases as confirmations accumulate.
Developer checklist
Inspect the node's mempool entry, current replacement settings, inputs, output amounts, and absolute fee before constructing a replacement. Use supported wallet fee-bumping operations where possible. Do not assume a transaction observed by one node is present in all mempools.
Primary references
BIP125 — https://bips.dev/125/
Bitcoin Core RPC documentation — https://bitcoincore.org/en/doc/
Bitcoin Core policy source — https://github.com/bitcoin/bitcoin/tree/master/src/policy
