What Is Replace-By-Fee (RBF) in Bitcoin?
Learn what Replace-By-Fee (RBF) is in Bitcoin, how it works to speed up stuck transactions, practical examples, risks, and how to use it in your wallet.
What Is Replace-By-Fee (RBF) in Bitcoin?
Replace-By-Fee (RBF) is a Bitcoin feature that allows a user to replace an unconfirmed transaction with a new one that pays a higher fee. This mechanism helps accelerate transactions that are stuck due to low fees during periods of network congestion. RBF gives senders more control over their pending payments, but it also introduces important trade‑offs, especially for merchants and zero‑confirmation spending.
How Replace-By-Fee (RBF) Works in Practice
Every Bitcoin transaction must be confirmed by miners, who prioritize transactions paying higher fees. When a user broadcasts a transaction with a low fee, it may sit in the mempool (the pool of unconfirmed transactions) for hours or even days. RBF enables the sender to create a replacement transaction that spends the same inputs but with a higher fee, effectively “bumping” the original out of the mempool and into the next block.
Opt-In RBF vs. Full RBF
There are two main implementations of RBF:
- Opt-In RBF (BIP 125) – The sender explicitly signals that the transaction is replaceable by setting a specific flag (number sequence) in the transaction. Most modern wallets support this.
- Full RBF – Any unconfirmed transaction can be replaced regardless of whether it signaled replaceability. Full RBF was adopted by some Bitcoin Core nodes starting in version 0.21.0 and became default in later releases.
The table below highlights the key differences:
| Feature | Opt-In RBF (BIP 125) | Full RBF |
|---|---|---|
| Signaling required? | Yes – sender must set a flag | No – any unconfirmed tx can be replaced |
| Wallet compatibility | Widely supported by modern wallets | Only supported by nodes that enable the option |
| Merchant protection | Easier to detect double-spend attempts | More difficult; zero-confirmation risk increases |
| Adoption status | Standard in many wallets | Becoming more common as nodes upgrade |
Example: Bumping a Stuck Transaction
Imagine Alice sends Bob 0.01 BTC with a fee of 5 satoshis per virtual byte (sat/vB). The network is congested, and the recommended fee rises to 20 sat/vB. Alice’s transaction remains unconfirmed for several hours. Using RBF, Alice creates a new transaction that spends the same inputs but increases the fee to 20 sat/vB. Miners see the higher fee and replace the original transaction. Bob receives the funds in the next block.
The Main Benefit of Replace-By-Fee: Speed for Stuck Payments
The primary use case for RBF is accelerating stalled transactions. Without RBF, a user stuck with a low‑fee transaction either had to wait indefinitely or use a risky workaround (like “child‑pays‑for‑parent”). RBF provides a straightforward, built‑in way to raise the fee.
When to Use RBF
- Network congestion – If mempools are full and fees spike, an initial low fee may never confirm. RBF lets you react in real time.
- Miscalculated fee – Maybe your wallet estimated a fee that turned out too low; RBF corrects that without needing a second transaction.
- Time‑sensitive payments – If you need a transaction confirmed before a deadline (e.g., a time‑locked contract), RBF gives you a second chance.
📝 Note: RBF only works for unconfirmed transactions. Once a transaction has one or more confirmations, it cannot be replaced.
Controversies and Risks of Using Replace-By-Fee
While RBF is a useful tool, it has sparked debate in the Bitcoin community, mainly around double‑spending risks.
Zero‑Confirmation Transactions
Merchants who accept payments without waiting for a confirmation (e.g., coffee shops, vending machines) are vulnerable to RBF. A malicious sender could:
- Send a transaction with a low fee that reaches the merchant’s wallet.
- The merchant sees the transaction and releases the product (e.g., a coffee).
- The sender then uses RBF to replace the original transaction with one that sends the same coins to a different address (the sender’s own wallet) with a higher fee.
The original payment is never confirmed, and the merchant loses the funds. This is why many merchants either wait for at least one confirmation or use detection tools that flag replaceable transactions.
Mitigation Strategies
- Detect RBF signals – Wallets can check if a transaction opted‑in (BIP 125) and warn the merchant.
- Use a minimal confirmation policy – Wait for even one confirmation before delivering digital goods.
- Accept only non‑RBF transactions – Some payment processors reject any transaction that signals replaceability.
How to Use Replace-By-Fee in Your Wallet
Most modern Bitcoin wallets support Opt-In RBF by default or allow you to enable it. Here is a general workflow:
- Send a transaction with a fee you believe is appropriate.
- Monitor the mempool – If the transaction remains unconfirmed for longer than expected, look for a “bump fee” or “replace” option.
- Create a replacement – The wallet will create a new transaction with the same inputs but a higher fee. Some wallets let you choose the new fee manually or use a slider.
- Broadcast the replacement – Miners will see the higher fee and replace the old transaction. You do not need to do anything else.
Wallets that support RBF include Bitcoin Core, Electrum, BlueWallet, and many others. Always check your wallet’s documentation to confirm whether RBF is supported and whether it is opt‑in or full.
Conclusion: Replace-By-Fee – A Double‑Edged Sword for Bitcoin Users
Replace-By-Fee (RBF) is a powerful feature that gives Bitcoin users the flexibility to unstick low‑fee transactions without relying on third‑party tools. However, it also demands caution, especially from merchants and anyone accepting unconfirmed payments. By understanding how RBF works, when to use it, and the risks it introduces, both senders and receivers can navigate the Bitcoin network more effectively. Whether you are a daily spender or a business owner, knowing how Replace-By-Fee functions is essential for a smooth Bitcoin experience.
RELATED ARTICLES

A rug pull is a crypto scam where developers abandon a project after taking investors' money. These schemes exploit trust and hype to create a false sense of legitimacy before vanishing. Understanding how rug pulls work is essential for protecting your funds in decentralized finance (DeFi) and token markets.

Algorand and Pure Proof of Stake: A Beginner's Guide
