Replace By Fee
Learn what Replace By Fee means in Bitcoin mining and how fee bumps affect confirmations and miner revenue.
Definition
Replace By Fee (RBF) is a Bitcoin mempool policy that lets a sender replace an unconfirmed transaction with a new version paying a higher fee. Formalized in BIP 125, RBF allows users to bump transactions stuck in the mempool during periods of high demand. Once a transaction is confirmed in a block, it cannot be replaced.
How It Works
BIP 125 Signaling
BIP 125 introduced opt-in RBF through a sequence number field. A transaction signals replaceability by setting any of its input sequence numbers to a value below 0xfffffffe. This tells nodes and miners that the sender may later broadcast a replacement paying a higher fee. Most modern wallets set this signal by default on outgoing transactions.
When a replacement arrives, nodes verify it spends at least one of the same inputs as the original. This cryptographic link through shared inputs prevents someone from replacing an unrelated transaction — it is what makes RBF a legitimate fee-bumping mechanism.
Replacement Policy Rules
Bitcoin Core enforces several rules before accepting a replacement:
- Higher fee rate: The replacement must pay a higher transaction fee per byte (feerate) than every transaction it replaces.
- Higher absolute fee: The replacement must also pay a higher total fee than the sum of all replaced transactions, preventing griefing where a tiny feerate bump displaces multiple transactions.
- Descendant limits: The replacement cannot cause the mempool to exceed limits on unconfirmed descendant transactions, stopping attackers from chaining replacements to exhaust node memory.
- Marked replaceable: Only transactions with the BIP 125 signal can be replaced. Non-signaling transactions are protected.
Opt-In vs Full RBF
BIP 125 created opt-in RBF — only signaling transactions can be replaced. In practice, most wallets signal RBF by default even if the user never intends to bump, since the sequence number field has no other practical function.
Full RBF would allow any transaction to be replaced regardless of signaling. Bitcoin Core 24.0 introduced a mempoolfullrbf option nodes can enable. This remains controversial — some merchants rely on non-signaling transactions being safe from replacement for zero-confirmation acceptance.
RBF is distinct from Child-Pays-For-Parent (CPFP), where instead of replacing a transaction, a new child transaction spending its output carries a high fee to incentivize miners to confirm both. RBF gives miners a single clean transaction with the exact feerate they want, while CPFP requires evaluating packages of related transactions — harder to optimize during block assembly.
Why It Matters
RBF makes the fee market more responsive. Without it, users who underpaid on fees have no recourse short of waiting. With RBF, senders can adjust fees to match current mempool conditions, giving miners a clearer signal about demand for block space.
For mining pools, RBF raises fee revenue by replacing lower-fee transactions with higher-fee versions before block assembly. During congestion events — high-volume trading periods or token mints — replacements can significantly increase fees captured per block. This supports profitability as the block reward halves and fees become a larger share of miner income.
RBF also affects transaction selection strategies. Mining software must track replacements in real time, evicting old versions and inserting new ones. Pools that maintain accurate mempool state and process replacements quickly assemble blocks with the highest-fee transactions available.
For merchants, RBF means zero-confirmation transactions are never fully settled. Services accepting unconfirmed payments must account for replacement — either by waiting for confirmation or by monitoring for BIP 125 signals and applying risk scoring.