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)

A Bitcoin transaction policy that allows a pending, unconfirmed transaction to be replaced by a new version from the same sender with a higher fee, accelerating its confirmation.
Chainscore © 2026
definition
BITCOIN TRANSACTION POLICY

What is Replace-By-Fee (RBF)?

Replace-By-Fee (RBF) is a node policy in the Bitcoin network that allows an unconfirmed transaction to be replaced by a new version with a higher fee.

Replace-By-Fee (RBF) is a mempool policy that permits a transaction sender to broadcast a new version of an unconfirmed transaction, typically with a higher fee, to incentivize miners to prioritize it. This is a direct solution to the problem of transaction stuckness, where a low-fee transaction may linger in the mempool for hours or days. The policy requires the new transaction to spend at least one of the same inputs and pay a higher absolute fee than all previous versions combined, ensuring the replacement is economically rational for the network. RBF is not a consensus rule but an optional policy adopted by nodes and miners.

There are two primary implementations of RBF: Full RBF and Opt-In RBF. Full RBF, enabled by some nodes, allows any unconfirmed transaction to be replaced. The more common Opt-In RBF, standardized in BIP 125, requires the original transaction to signal replaceability by setting a specific sequence number. This opt-in mechanism provides transparency, allowing recipients to see if a payment might be replaced before considering it final. Wallets use this signal to adjust their confirmation logic, often waiting for more blocks for RBF-enabled transactions.

The primary use case for RBF is fee bumping. If a user broadcasts a transaction with an insufficient fee, they can use RBF to accelerate confirmation without waiting for the original to drop from mempools. It also enables transaction batching corrections and certain smart contract operations. A critical consideration is zero-confirmation risk: merchants accepting unconfirmed payments must check for the RBF signal, as a payment could be replaced by a transaction sending the funds elsewhere. Thus, RBF introduces a trade-off between user flexibility and the finality of zero-confirmation transactions.

how-it-works
BITCOIN TRANSACTION POLICY

How Replace-By-Fee (RBF) Works

Replace-By-Fee (RBF) is a Bitcoin network protocol that allows a sender to replace an unconfirmed transaction with a new version that pays a higher fee, accelerating its confirmation.

Replace-By-Fee (RBF) is a transaction replacement policy in the Bitcoin protocol that enables a sender to broadcast a new version of an unconfirmed transaction, typically with a higher fee, to incentivize miners to prioritize it. This is a deliberate opt-in feature, signaled by setting the nSequence field in a transaction's inputs to a value below 0xffffffff. When a node receives an RBF-enabled transaction, it will replace the original in its mempool if the new version meets specific relay rules, primarily that it pays a higher absolute fee and does not create any new unconfirmed inputs. This mechanism provides a strategic tool for users whose initial transactions are stuck due to insufficient fees.

The core logic of RBF is governed by a set of relay rules enforced by network nodes. The most critical rule is fee bumping: the replacement transaction must pay a higher total fee than the sum of the fees of all transactions it is replacing. Additional constraints include a prohibition on adding new unconfirmed inputs (to prevent certain attacks) and a requirement that the new transaction does not violate other standard policies, such as minimum relay fees. This creates a controlled environment where a transaction's priority can be increased without enabling spam or double-spend attacks against merchants who wait for zero confirmations.

From a user's perspective, implementing RBF typically involves using a wallet that supports the feature. The process is straightforward: the user broadcasts a transaction, and if it remains unconfirmed, the wallet can create a Child-Pays-For-Parent (CPFP) alternative or, if the original was RBF-enabled, directly craft a replacement. Wallets like Bitcoin Core and many popular mobile wallets offer one-click "bump fee" options that handle the technical details. It is crucial for recipients to understand that an RBF-enabled transaction is not settled until it receives confirmations, as the sender retains the ability to replace it before mining.

RBF interacts directly with Bitcoin's mempool dynamics. Miners, who are profit-driven, will naturally select transactions with the highest fee rates for inclusion in the next block. An RFP replacement effectively jumps the queue by increasing the transaction's effective fee rate. This is particularly useful during periods of network congestion when fee markets become volatile. However, it also means that zero-confirmation transactions with RBF enabled are inherently insecure for instant payments, as they can be double-spent by the sender. This trade-off is why some merchants and payment processors may choose to reject or closely monitor RBF-enabled transactions.

The development of RBF, formalized in BIP 125, was a significant policy shift from Bitcoin's original "first-seen" rule, which made unconfirmed transactions immutable. While RBF provides much-needed flexibility for users, it also introduced new considerations for the ecosystem. Its proper use requires an understanding of both its utility for fee management and its implications for transaction finality. As a core tool for Bitcoin fee estimation and congestion management, RBF exemplifies the protocol's evolution to provide users with more control over their transactions in a competitive block space market.

key-features
MECHANISM

Key Features of RBF

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, typically to increase its fee and accelerate confirmation.

01

Fee Bumping

The primary function of RBF is to increase the fee of a stuck transaction. This is done by broadcasting a new transaction that spends the same inputs but includes a higher fee, making it more attractive for miners to include in the next block.

  • Use Case: A user broadcasts a transaction with a low fee, and network congestion causes delays. They can use RBF to 'bump' the fee to outbid competing transactions.
02

Full vs. First-Seen-Safe

There are two main RBF policies. Full RBF (BIP 125) is the standard implementation, allowing any unconfirmed transaction to be replaced if it meets specific signaling and fee increase rules. First-Seen-Safe (FSS) RBF is a more restrictive variant that only allows replacement if all outputs are increased, preventing certain types of fraud.

  • Key Rule: Full RBF requires the new fee to be higher than the sum of the original fee and the fees of all transactions it depends on (ancestor fee).
03

Opt-In Signaling

A transaction must explicitly signal that it is replaceable. This is done by setting the nSequence field of its inputs to a value less than 0xffffffff - 1. This opt-in design prevents accidental or malicious replacements of transactions that were intended to be final.

  • Developer Note: Wallets must construct transactions with the correct nSequence values to enable RBF functionality.
04

Conflict Resolution

RBF provides a conflict resolution mechanism for the mempool. When a higher-fee replacement is valid, nodes and miners will evict the original, lower-fee transaction. This creates a competitive fee market for block space and allows users to correct mistakes without waiting for a timeout.

  • Example: It can also be used to correct a wrong destination address by creating a new transaction that returns funds to oneself.
05

Double-Spend Protection

Contrary to some misconceptions, RBF with proper wallet implementation enhances security against double-spend attacks. By allowing a legitimate sender to replace their own transaction, it reduces the incentive for a malicious receiver to attempt a double-spend via a conflicting transaction, as the sender can always outbid them.

06

Mempool Management

RBF is a critical tool for mempool management at the network level. It helps clear low-fee transactions during congestion, making the mempool a more efficient queue. Miners can prioritize the highest-paying transactions, and users have direct control over their confirmation priority without relying on Child-Pays-For-Parent (CPFP).

etymology-history
ORIGINS

Etymology and History

The concept of Replace-By-Fee (RBF) emerged as a pragmatic solution to a fundamental limitation in Bitcoin's original design, evolving from a contentious user-side patch to a standardized node policy.

The term Replace-By-Fee was coined by Bitcoin Core developer Peter Todd, who first proposed the mechanism in 2013. It directly describes its function: replacing an unconfirmed transaction in the mempool by broadcasting a new version with a higher transaction fee. This was a user-initiated workaround for Bitcoin's default behavior, where the first-seen version of a transaction was typically immutable, potentially leaving funds stuck for hours or days if the initial fee was too low. Todd's initial implementation was a patch that users could apply to their Bitcoin nodes, creating a market for transaction priority within the unconfirmed pool.

RBF's history is intertwined with the Bitcoin scalability debates. Prior to its adoption, the primary method for correcting a low-fee transaction was Child-Pays-For-Parent (CPFP), which required creating a dependent transaction. RBF offered a more direct alternative. Its path to standardization was gradual and debated, as critics argued it could enable double-spend attacks against zero-confirmation transactions. A key milestone was the introduction of Full RBF (BIP 125) in Bitcoin Core 0.12.0 (2016), which established a standardized, opt-in signaling method (replaceable flag) that wallets and services could reliably implement, making the feature safer and more predictable for the network.

The policy's adoption marked a significant shift in Bitcoin's fee market dynamics. It transformed transaction fees from a static, often guess-based cost into a more dynamic bidding system. Users gained agency to accelerate their transactions in real-time, while miners could maximize fee revenue by prioritizing the highest-paying versions. This history reflects Bitcoin's iterative development: a community-created tool to solve a practical problem (stuck transactions) that, through rigorous debate and specification, evolved into a core node policy that enhances user experience and network efficiency without requiring a consensus-level protocol change.

ecosystem-usage
TRANSACTION MANAGEMENT

Ecosystem Usage and Support

Replace-By-Fee (RBF) is a transaction replacement mechanism that allows a sender to increase the fee of an unconfirmed Bitcoin transaction, enabling faster confirmation or correcting errors.

01

Core Mechanism

RBF works by broadcasting a new transaction that spends the same inputs as a prior, unconfirmed transaction but with a higher fee. Miners are incentivized to include the newer, higher-fee version in a block. Key requirements include:

  • The new transaction must pay a higher fee rate (sat/vB).
  • It must include all original outputs, though it can add new ones.
  • It must be signaled as replaceable (via nSequence or full-RBF policy).
02

Opt-In RBF vs. Full RBF

There are two primary implementations in the Bitcoin network:

  • Opt-In RBF (BIP 125): The standard. Transactions must explicitly signal replaceability by setting an nSequence number less than 0xffffffff-1. This provides explicit consent.
  • Full RBF: A more permissive node policy (not a consensus rule) where some nodes will replace any unconfirmed transaction with a higher-fee version, regardless of signaling. This is controversial and not universally adopted.
03

Primary Use Cases

RBF addresses critical wallet and user experience issues:

  • Fee Acceleration: Bumping a stuck transaction during network congestion.
  • Error Correction: Fixing mistakes like an incorrect recipient address or an underpaid fee before confirmation.
  • CPFP Alternative: When the receiver cannot perform Child-Pays-For-Parent, the sender can use RBF directly.
  • Batching Optimization: Replacing a set of individual transactions with a single, more efficient batched transaction.
04

Security Considerations & Risks

While useful, RBF introduces specific risks that merchants and services must manage:

  • Zero-Confirmation Risk: Accepting unconfirmed RBF-enabled transactions is unsafe, as the sender can double-spend by replacing it with a transaction sending funds elsewhere.
  • Pinpointing Attacks: A malicious actor could broadcast a low-fee transaction, get a service to accept it, then replace it to steal goods/services.
  • Mempool Policies: Nodes have different RBF policies, leading to inconsistent propagation and potential network partitioning.
05

Wallet & Node Implementation

Support for RBF is widespread but not uniform across the ecosystem:

  • Wallets: Most major wallets (Electrum, BlueWallet, Sparrow) support BIP 125 Opt-In RBF, often with a toggle during transaction creation.
  • Nodes: Bitcoin Core has configurable RBF policies (mempoolfullrbf). Other implementations like Bitcoin Knots may have different defaults.
  • Explorers & Services: Block explorers (mempool.space) visually flag RBF-enabled transactions. Payment processors and exchanges often have policies to delay credit for such transactions.
06

Related Concepts

RBF is one tool in the transaction management toolkit. Understand its alternatives:

  • Child-Pays-For-Parent (CPFP): The receiver of an unconfirmed output creates a new, high-fee transaction spending it, incentivizing miners to confirm both.
  • Fee Bumping (PSBT): Partially Signed Bitcoin Transactions enable collaborative fee increases, often used with hardware wallets.
  • Transaction Malleability: RBF is distinct from malleability fixes (SegWit); it's a deliberate replacement, not a third-party signature modification.
COMPARISON

RBF vs. Other Fee Bumping Methods

A technical comparison of on-chain Bitcoin transaction fee bumping mechanisms.

FeatureReplace-By-Fee (RBF)Child-Pays-For-Parent (CPFP)Full RBF (Default in some clients)

Primary Mechanism

Replace original transaction with higher-fee version

Spend unconfirmed output with a high-fee child

Allows replacement of any unconfirmed transaction

Requires Signaling (BIP 125)

Requires Change Output

Transaction Malleability

Prevents it for replaced tx

Not applicable

Prevents it for replaced tx

Network Support

Opt-in, widely supported

Native protocol feature

Controversial, not standard

Typical Use Case

Stuck low-fee transaction

Stuck parent in payment channel or batch

Aggressive fee competition

Privacy Impact

Reveals replacement intent

Links parent and child transactions

Reveals replacement intent

Implementation Complexity

Moderate (wallet logic)

Simple (create new tx)

Simple (client policy)

security-considerations
REPLACE-BY-FEE (RBF)

Security and Economic Considerations

Replace-By-Fee (RBF) is a Bitcoin protocol mechanism allowing a sender to replace an unconfirmed transaction with a new one that pays a higher fee, introducing specific security and economic trade-offs.

01

Core Mechanism

RBF is a mempool policy where nodes accept a new transaction that spends the same inputs as a previous unconfirmed one, provided the new transaction pays a higher fee rate and meets other policy rules (e.g., BIP 125). This allows users to accelerate a stuck transaction by fee bumping.

02

Double-Spend Risk

The primary security consideration. RBF explicitly enables a form of double-spend before confirmation. Merchants accepting zero-confirmation transactions must treat RBF-enabled transactions as insecure. This creates a trust model shift, requiring awareness of a transaction's RBF flag.

03

Fee Market Dynamics

RBF influences Bitcoin's fee auction model. It allows users to participate in fee bidding dynamically, increasing fee pressure during congestion. This can lead to more efficient fee estimation but may also result in fee sniping where miners replace low-fee blocks with higher-fee ones.

04

Opt-In vs. Full RBF

  • Opt-In RBF (BIP 125): The standard. The original transaction must signal replaceability via its nSequence field.
  • Full RBF: A more permissive, non-standard node policy that allows replacement of any unconfirmed transaction. This is controversial as it weakens zero-confirmation security for all transactions.
05

User Experience & Wallets

Wallets implement RBF to improve UX by letting users correct underpaid transactions. Key behaviors include:

  • Child-Pays-For-Parent (CPFP): An alternative fee bump method.
  • Bump fee interfaces that create and broadcast the replacement.
  • Clear labeling of RBF-enabled transactions to warn recipients.
06

Miner Incentives & Policies

Miners decide which RBF policies to implement. Their incentive is to maximize fees, so they typically accept valid RBF replacements. However, some mining pools may impose additional constraints, like a minimum fee increase delta, to prevent mempool spam and optimize block construction.

DEBUNKED

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 security, purpose, and proper use.

Replace-By-Fee (RBF) is not an inherent security risk when properly understood and implemented. The perceived risk stems from the zero-confirmation problem, where a merchant accepts an unconfirmed transaction. RBF simply makes a pre-existing vulnerability—double-spend attempts—more explicit and manageable. Merchants can mitigate this by:

  • Waiting for confirmations for high-value items.
  • Using payment processors that monitor the mempool for conflicting transactions.
  • Relying on the First-Seen-First-Served (FSFS) rule for low-value, instant payments where RBF is not signaled. The risk is not RBF itself, but accepting any zero-confirmation transaction without assessing the context.
REPLACE-BY-FEE

Frequently Asked Questions (FAQ)

Replace-By-Fee (RBF) is a transaction replacement mechanism in Bitcoin that allows a sender to increase the fee of an unconfirmed transaction to accelerate its confirmation. This glossary section answers common technical and practical questions about RBF.

Replace-By-Fee (RBF) is a mechanism in Bitcoin that allows a sender to replace a broadcast but unconfirmed transaction with a new version, typically offering a higher fee to incentivize miners to prioritize it. It works by creating a new transaction that spends the same inputs as the original, marked with a specific signal (e.g., nSequence < 0xffffffff-1 for Full-RBF). Miners, who prioritize transactions based on fee density, will typically mine the higher-fee replacement, causing the original lower-fee transaction to be discarded from their mempools. This provides users with a way to correct underpaid transactions or accelerate confirmations without waiting for the original to expire from the network.

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
Replace-By-Fee (RBF): Definition & How It Works | ChainScore Glossary