What is replace-by-fee (RBF)?
A rule that lets an unconfirmed Bitcoin transaction be replaced by a version of itself paying a higher fee, so a stuck payment can be resent rather than abandoned.
Not yet verifiedHow we verify
3 min read
In this entry
A rule that lets an unconfirmed Bitcoin transaction be replaced by a version of itself paying a higher fee, so a stuck payment can be resent rather than abandoned.
BIP-125 defined the opt-in form, in which the original transaction flags that it may be replaced and the replacement must pay more in absolute fees than everything it evicts (source: BIP-125). For you this matters twice: it is the standard fix for a withdrawal you underpaid, and it is why a merchant should not treat a zero-confirmation payment as final.
The feature exists because fee estimation is a guess about the future. You pick a rate based on the mempool as it looks now, and thirty minutes later the network is busier and your transaction is behind a queue that keeps growing. Without replacement, the only options are waiting indefinitely or hoping the transaction is eventually dropped.
How it works
- The original signals replaceability. Under the opt-in rule the transaction sets a sequence value marking it as replaceable (source: BIP-125). Most modern wallets do this by default and show a "bump fee" or "speed up" option.
- You build a replacement. It spends the same inputs, so only one of the two can ever confirm, and pays a higher fee.
- Nodes apply the replacement rules. The replacement must pay a higher absolute fee than the transactions it evicts and meet an additional relay fee requirement, which stops replacement being used to spam the network for free (source: BIP-125).
- Miners take the more profitable version. The original becomes unspendable once the replacement confirms, because both spend the same inputs.
Later Bitcoin Core releases relay replacements more broadly than the opt-in signal alone required, so a wallet's assumption that an unflagged transaction is final is weaker than it once was. Where the transaction cannot be replaced, child pays for parent is the alternative: spend one of its outputs with a high enough fee that a miner takes both together.
Example
Illustrative. You withdraw Bitcoin at 4 sat/vB on a quiet Sunday. The transaction is 200 virtual bytes, so it pays 800 satoshis. Overnight, activity rises and the mempool clears only transactions above 25 sat/vB.
Your wallet's bump option builds a replacement at 30 sat/vB, costing 6,000 satoshis, and marks the original as replaced. The difference is 5,200 satoshis, not 6,800, because you were always going to pay the first fee. The replacement confirms in the next block or two, and the original disappears from the mempool. See sat vb.
Why it matters when you buy
A withdrawal from an exchange is sent by the exchange, so you cannot bump it yourself; that is the exchange's call. Where it matters is a transfer you send from your own wallet, particularly the first time you move coins after a purchase, and knowing the option exists prevents an expensive panic. Moving crypto off an exchange covers the sequence and gas fees explained covers the fee side.
Related terms
mempool — where the replacement competes; sat vb — the rate fees are quoted in; child pays for parent — the alternative when replacement is unavailable; confirmation — what makes a payment final; network fee — the cost being raised; double spend — what confirmations prevent.
Questions
Can I speed up an exchange withdrawal?
No. The exchange signed and broadcast it, so only the exchange can replace it. Your wallet can bump only transactions it sent.
Does the replacement cost me both fees?
No. Only one transaction confirms, so you pay only the replacement's fee. The original never settles and is dropped from the mempool.
Is accepting a zero-confirmation payment ever safe?
For small, low-risk amounts some merchants accept the trade. For anything meaningful, wait for confirmations, because replacement makes reversal cheap and does not require any attack on the network.