Home › Glossary › Replace-by-fee (RBF)

Replace-by-fee (RBF)

Also called: RBF, opt-in RBF, full RBF, BIP 125, fee bumping.

Replace-by-fee (RBF) lets you replace an unconfirmed Bitcoin transaction with a new version that pays a higher fee, so it confirms sooner.

Replace-by-fee (RBF) is a mempool policy that lets a node swap an unconfirmed transaction for a conflicting one that spends some of the same inputs and pays more. Its main use is fee bumping: if a payment is stuck because its fee is too low, the sender signs a new version with a higher fee and the network replaces the old one. RBF is policy, not a consensus rule; miners can include whichever version they like.

Opt-in RBF (BIP 125)

BIP 125, by David A. Harding and Peter Todd, defined how a transaction signals that it may be replaced: any input with an nSequence below 0xfffffffe. Unconfirmed descendants of a signaling transaction are replaceable too. Under its rules a replacement must:

  1. pay an absolute fee at least as high as everything it replaces;
  2. also pay for its own size at the node's minimum relay fee rate;
  3. not add new unconfirmed inputs; and
  4. not evict more than 100 transactions in total.

Full RBF

Signaling was meant to warn receivers that an unconfirmed payment could still change. Over time many nodes began accepting replacements without it ("full RBF"), and Bitcoin Core made that the default in version 28.0. In practice, treat any unconfirmed transaction as replaceable.

RBF and other fee tools

The alternative is child pays for parent, where the receiver, or the sender through a change output, spends the stuck transaction's output with a high fee. Contract protocols combine RBF with package relay and TRUC transactions (BIP 431) to avoid pinning. Work out the size of a replacement with the transaction size calculator, and read the replace-by-fee guide.

BIPs that define Replace-by-fee (RBF)

Related terms

  • Child pays for parent (CPFP): Child pays for parent (CPFP) speeds up a stuck transaction by spending one of its outputs in a new high-fee transaction, so miners confirm both together.
  • Mempool: The mempool is a node's waiting area for valid, unconfirmed transactions; miners choose from it, usually by fee rate, when they build a block.
  • Package relay: Package relay lets Bitcoin nodes accept and relay related unconfirmed transactions together, so a high-fee child can carry a low-fee parent.

Learn more

Guides