Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Replace-by-Fee (RBF) Signaling

A protocol mechanism that allows a sender to broadcast a new transaction with a higher fee to replace a prior, unconfirmed transaction in the mempool.
Chainscore © 2026
definition
BLOCKCHAIN TRANSACTION MECHANISM

What is Replace-by-Fee (RBF) Signaling?

Replace-by-Fee (RBF) Signaling is a Bitcoin protocol mechanism that allows a sender to replace an unconfirmed transaction in the mempool with a new version that offers a higher transaction fee, signaling to miners to prioritize the updated transaction.

Replace-by-Fee (RBF) Signaling is an opt-in feature within the Bitcoin network that enables transaction replacement under specific conditions. When a user broadcasts a transaction with a low fee, it may become stuck in the mempool during periods of network congestion. By signaling RBF (using a specific bit in the transaction's nSequence field), the sender retains the ability to create a double-spend of the same UTXOs, but with a higher fee attached. This new transaction, which must pay a higher absolute fee and a higher fee rate, effectively replaces the original one in the mempool, incentivizing miners to include it in the next block.

The primary use case for RBF is fee management and transaction acceleration. It provides a practical solution for correcting underpaid fees without waiting for the original transaction to be dropped from the mempool, which can take days. There are two main RBF policies: Full RBF, where any transaction can be replaced if it pays a higher fee, and Opt-In RBF (BIP 125), which is the current standard. Opt-In RBF requires the original transaction to explicitly signal replaceability and imposes rules like increasing the fee of all unconfirmed inputs and not adding new outputs.

For recipients, RBF introduces a consideration of transaction finality. A zero-confirmation transaction that signals RBF should not be considered settled, as it could be replaced before mining. Wallets and services must monitor the mempool for conflicting transactions. This mechanism is distinct from Child Pays For Parent (CPFP), which accelerates a stuck transaction by spending its output with a high fee. RBF is a core tool for Bitcoin wallet software, providing users with control over fee economics and improving the overall user experience in a dynamic fee market.

etymology
BITCOIN PROTOCOL DEVELOPMENT

Etymology and Origin

The term 'Replace-by-Fee' (RBF) and its associated signaling mechanism emerged from a specific, contentious debate within the Bitcoin community concerning transaction finality and network efficiency.

The concept of Replace-by-Fee (RBF) was formally introduced by Bitcoin Core developer Peter Todd in a 2013 Bitcoin-Dev mailing list post titled "Replacing transactions with higher fees." The proposal addressed a critical user pain point: a transaction broadcast with an insufficient fee could become stuck in the mempool, unable to confirm for hours or days. Todd's initial idea was a full RBF policy, allowing any unconfirmed transaction to be replaced by a new version with a higher fee, provided the new transaction paid for its own bandwidth. This was a radical departure from the then-default First-Seen-First-Served (FSS) rule, which aimed to prevent double-spending by nodes only relaying the first version of a transaction they saw.

The proposal ignited significant controversy. Opponents, including some major payment processors and wallet providers, argued that full RBF undermined zero-confirmation transactions (transactions accepted before a block confirmation) by making them inherently insecure, as a payer could easily replace a payment after a merchant had delivered goods. This led to the development of a compromise: Opt-In RBF, specified in BIP 125. Proposed in 2015, Opt-In RBF requires a transaction to explicitly signal replaceability by setting a sequence number below 0xffffffff-1 and obeying specific rules, such as all original outputs being preserved. This signaling mechanism allowed wallets and services that relied on zero-confirmations to simply reject RBF-signaling transactions, creating a market-based choice.

The terminology itself is descriptive: Replace-by-Fee precisely defines the action (replacing a transaction) and its trigger (a higher fee). The signaling component refers to the specific data field—the sequence number in the transaction input—that indicates a transaction's creator has opted into this protocol rule. The adoption of Opt-In RBF as the standard, eventually activated in Bitcoin Core 0.12.0 (2016), represents a key example of Bitcoin's pragmatic governance. It solved the practical problem of stuck transactions for those who chose to use it, while preserving the existing economic assumptions for others, all without requiring a contentious hard fork.

how-it-works
MECHANISM

How RBF Signaling Works

Replace-by-Fee (RBF) signaling is the process by which a Bitcoin transaction explicitly indicates it can be replaced by a higher-fee version, enabling fee optimization and transaction cancellation.

RBF signaling is a deliberate flag set within a Bitcoin transaction's data structure. The primary method, Full RBF (BIP 125), requires setting the transaction's nSequence field to a value less than 0xffffffff - 1. This acts as an explicit opt-in signal to the network, informing nodes and miners that the sender intends to potentially replace this transaction before it is confirmed. Without this signal, nodes following standard policy will reject a replacement attempt, protecting against certain types of spam and double-spend attacks. The signal is a prerequisite for the replacement mechanism to function.

When a node receives a new transaction attempting to replace an existing one, it performs a series of checks defined by BIP 125. The replacement is only accepted if: the original transaction signaled replaceability, the new transaction pays a higher fee (meeting a minimum incremental increase), the new transaction does not introduce any new unconfirmed inputs, and it pays all the original recipients at least the same amount. This rule set ensures RBF is used for its intended purpose of fee adjustment, not for fraud. Miners observing these valid replacements are incentivized to mine the higher-fee version.

A critical aspect of signaling is mempool policy divergence. Not all nodes or mining pools enable Full RBF by default. Some maintain a First-Seen-Safe policy, where they will only mine the first version of a transaction they see. This means a successfully signaled and created replacement might still not be mined if the pool that first saw the original transaction does not support RBF. Consequently, transaction broadcast strategy becomes important, and wallet interfaces often provide status on whether a replacement is propagating successfully across the network.

key-features
REPLACE-BY-FEE (RBF) SIGNALING

Key Features and Properties

Replace-by-Fee (RBF) signaling is a Bitcoin protocol mechanism that allows a transaction sender to indicate they may broadcast a higher-fee version of the same transaction, enabling fee bumping and transaction replacement under specific conditions.

01

Opt-In Signaling

RBF is an opt-in feature. A transaction must explicitly signal its replaceability by setting the nSequence field of at least one input to a value less than 0xffffffff - 1. This prevents accidental or malicious replacements of transactions that do not intend to allow it. The most common signaling value is nSequence = 0xfffffffd.

02

BIP 125 Rules

For a replacement to be accepted by the network, it must follow the strict rules defined in BIP 125:

  • The new transaction must pay a higher fee rate than the original.
  • The new transaction cannot add any new inputs (except from the original sender).
  • The new transaction cannot remove any outputs that paid the original recipient.
  • The replacement must be received by a node before the original transaction is mined.
  • The original transaction must not be in any block.
03

Fee Bumping Mechanism

The primary use case is fee bumping. If a low-fee transaction is stuck in the mempool, the sender can create a new version with a higher fee, using RBF signaling to replace it. This is crucial during periods of network congestion. Methods include:

  • Direct Replacement: Increasing the fee on the original outputs.
  • Child-Pays-For-Parent (CPFP): An alternative where a new transaction spends the output of the stuck one, but RBF is often simpler for the sender.
04

Mempool Policy vs. Consensus

RBF is a mempool policy, not a consensus rule. Full nodes enforce the BIP 125 rules for transactions they relay and consider for mining, but miners are free to mine either the original or the replacement transaction. This means a replacement is not guaranteed; a miner could still mine the lower-fee original. However, rational miners are incentivized to select the higher-fee version.

05

Security Implications for Receivers

RBF introduces a double-spend risk for zero-confirmation transactions. A merchant accepting an RBF-signaled payment with 0 confirmations risks the sender replacing it with a transaction that pays the coins back to themselves. Therefore, services must either:

  • Wait for at least 1 confirmation for RBF-signaled transactions.
  • Implement detection and reject RBF-signaled transactions for instant payments.
  • Use protocols like RBF Double-Spend Proofs to detect replacement attempts.
06

Full RBF vs. Opt-In RBF

There are two conceptual models:

  • Opt-In RBF (BIP 125): The current standard. Only transactions explicitly signaled can be replaced.
  • Full RBF: A more permissive (and controversial) policy where any unconfirmed transaction could be replaced by a higher-fee version, regardless of signaling. Some node implementations (e.g., Bitcoin Core) allow enabling Full RBF as a non-default configuration option, arguing it simplifies fee estimation and mempool dynamics.
ecosystem-usage
REPLACE-BY-FEE (RBF) SIGNALING

Ecosystem Usage and Adoption

Replace-by-Fee (RBF) signaling is a Bitcoin transaction replacement policy that allows a sender to increase the fee of an unconfirmed transaction to accelerate its confirmation.

01

Opt-In RBF Signaling

The standard method for initiating a replaceable transaction. A sender must explicitly signal that a transaction is replaceable by setting the nSequence field to a value less than 0xffffffff. This opt-in requirement prevents accidental or malicious replacements of transactions that were intended to be final. Wallets like Electrum and Bitcoin Core implement this signaling, allowing users to mark a transaction as replaceable during its creation.

02

Full RBF Policy

A more permissive network policy where nodes accept transaction replacements even without the opt-in signal. This is a contentious topic, as it changes the default security model. Bitcoin Core has a configurable option (mempoolfullrbf=1) to enable this policy. Proponents argue it improves fee market efficiency, while critics contend it weakens zero-confirmation security for merchants. Its adoption is not universal across the network.

03

Fee Bumping Techniques

RBF is one of several methods to increase a transaction's fee post-broadcast. Key alternatives include:

  • Child-Pays-For-Parent (CPFP): A new transaction spending an output from the stuck transaction, with a high enough fee to encourage miners to confirm both.
  • Transaction Accelerators: Services offered by some mining pools or exchanges for a fee. RBF is often the most direct method, as it modifies the original transaction directly.
04

Wallet & Exchange Support

Adoption varies significantly across the ecosystem. Custodial wallets and exchanges often disable RBF for user simplicity and to prevent fraud, as replacements can complicate deposit tracking. Non-custodial wallets like Electrum, Sparrow, and BlueWallet offer robust RBF support, giving users control over fee management. This creates a user experience divide where RBF is a power-user feature rather than a universal default.

05

Security & Double-Spend Risks

RBF introduces a controlled form of double-spend risk for zero-confirmation transactions. A merchant accepting an unconfirmed payment must check if the transaction is signaled as replaceable. If it is, the payment is not secure until confirmed. This is a critical consideration for Point-of-Sale systems. The protocol requires the replacement transaction to pay a higher fee and have all the same original inputs, limiting but not eliminating the risk.

06

Mempool Dynamics & Miner Incentives

RBF interacts directly with mempool economics. When network congestion is high, users can outbid others by replacing their low-fee transactions. This creates a more efficient fee auction within the mempool. Miners are economically incentivized to accept RBF replacements as they collect the higher fee. The feature helps clear the mempool of stale, low-fee transactions, optimizing block space allocation for the highest bidders.

COMPARISON

RBF vs. Alternative Fee Bumping Methods

A comparison of the primary methods for increasing the fee of a stuck or underpaid Bitcoin transaction.

FeatureReplace-by-Fee (RBF)Child Pays for Parent (CPFP)Double-Spend (Manual)

Core Mechanism

Replace original transaction with a new, higher-fee version

Spend an output from the stuck transaction with a high-fee child

Manually broadcast a conflicting transaction with a higher fee

Requires RBF Signaling

Wallet Support

Widespread (Electrum, Bitcoin Core)

Universal (any wallet can create child)

Manual via CLI or advanced tools

Transaction Size Impact

Can increase

Increases total size (parent + child)

No change

Typical Confirmation Time

< 10 minutes

Varies (depends on mempool)

Unpredictable (race condition)

Primary Risk

Original output recipients can be changed

Requires a spendable output from the stuck tx

Can result in loss of funds if original confirms

Best For

Transactions with change outputs or adjustable recipients

Transactions where you control a child output

Emergency scenarios with full control of keys

security-considerations
REPLACE-BY-FEE (RBF) SIGNALING

Security and Economic Considerations

Replace-by-Fee (RBF) is a Bitcoin protocol mechanism that allows a sender to replace an unconfirmed transaction with a new one that pays a higher fee, raising critical security and economic trade-offs.

01

Double-Spend Protection

RBF provides a formal, opt-in mechanism for transaction replacement, which paradoxically helps prevent double-spend attacks. By signaling intent to replace a transaction, the sender provides a clear, mempool-visible alternative, making malicious double-spends (where a sender secretly tries to spend the same UTXO twice) more difficult to execute covertly. This increases network transparency and security for accepting zero-confirmation transactions.

02

Fee Market Dynamics

RBF directly influences Bitcoin's fee auction model. It allows users to participate in fee bidding for block space after a transaction is broadcast. This creates a more efficient market where users can adjust their bids based on changing network congestion, but it can also lead to fee inflation as users compete to get their transactions confirmed in the next block.

03

Mempool Policy & Pin Attacks

Full nodes enforce strict mempool policies for RBF. Key rules include:

  • The new transaction must pay a higher fee rate.
  • It must pay the absolute fee difference to all original recipients.
  • It cannot add new outputs (with some BIP125 exceptions). Without these rules, RBF could enable transaction pinning attacks, where an attacker broadcasts a low-fee transaction to lock up UTXOs, preventing the legitimate owner from spending them.
04

Merchant Risk & Zero-Conf

For merchants accepting fast payments, RBF complicates the security of zero-confirmation transactions. A transaction with RBF signaling is explicitly mutable, making it risky to accept before confirmation. Merchants must implement policies to either:

  • Wait for 1+ confirmations for RBF-enabled transactions.
  • Reject RBF-signaling transactions outright.
  • Use specialized monitoring for double-spend attempts.
06

Wallet Implementation Choices

Wallet developers face key design decisions:

  • Default RBF: Whether to enable RBF signaling by default (common in privacy-focused wallets).
  • Fee Bumping Methods: Offering Child-Pays-for-Parent (CPFP) as a safer, collaborative alternative for recipients.
  • User Interface: Clearly warning users when they are creating a replaceable transaction to prevent unintended security lapses.
REPLACE-BY-FEE

Common Misconceptions About RBF

Replace-by-Fee (RBF) is a standard Bitcoin transaction replacement mechanism, but it is often misunderstood. This section clarifies the most frequent points of confusion regarding its signaling, security, and intended use.

RBF is a deliberate protocol feature, not a security flaw. It was introduced in Bitcoin Core 0.12.0 (BIP 125) to solve the problem of stuck transactions with insufficient fees. The feature provides users with control and flexibility, allowing them to accelerate a transaction when network conditions change. The misconception stems from the fact that unconfirmed transactions from RBF-enabled wallets are not safe to accept as final payment, which is a change in behavior from the early days of Bitcoin. However, this simply reinforces the established rule that zero-confirmation transactions have always carried a replacement risk; RBF makes this risk explicit and manageable.

REPLACE-BY-FEE

Technical Deep Dive

Replace-by-Fee (RBF) is a transaction replacement policy that allows a sender to increase the fee of an unconfirmed Bitcoin transaction, enabling it to be mined faster. This section explores its technical signaling mechanisms, use cases, and implications for network security.

Replace-by-Fee (RBF) is a Bitcoin protocol policy that allows a sender to replace a broadcast but unconfirmed transaction with a new version that pays a higher fee, thereby accelerating its confirmation. It works by creating a new transaction that spends the same unspent transaction outputs (UTXOs) as the original, with a higher fee, and signaling to nodes that this replacement is permitted. The new transaction must pay a higher fee rate (satoshis per virtual byte) and the total fee must be greater than the sum of the original fee plus the fees of all transactions it replaces, as per the BIP 125 specification. This mechanism is crucial for fee bumping when network congestion increases.

REPLACE-BY-FEE (RBF)

Frequently Asked Questions (FAQ)

Replace-by-Fee (RBF) is a Bitcoin protocol mechanism that allows a sender to replace an unconfirmed transaction with a new one that pays a higher fee, accelerating its confirmation. This section addresses common technical and operational questions.

Replace-by-Fee (RBF) is a Bitcoin protocol mechanism that allows a sender to replace an unconfirmed transaction in the mempool with a new version that pays a higher transaction fee, thereby incentivizing miners to prioritize it. It works by creating a new transaction that spends the same inputs as the original, marked with a specific signaling flag (e.g., nSequence < 0xffffffff-1 for BIP125). The new transaction must pay a higher total fee and may have different outputs, but the recipient addresses cannot be changed unless they are the sender's own. This provides a way to correct errors like insufficient fees or to update a transaction before it is mined.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team