<p><strong>Replace-by-fee</strong> means transactions spending the same coin to the same addresses are not considered double-spends by the network and are still relayed, as long as they pay a higher fee than the preceding transaction.</p>

<p>Example:
Alice pays Bob with a coin worth 1 BTC, sending 0.5 BTC to Bob, 0.49995 BTC to herself as change, and 0.00005 BTC to fees. Alice sees that her transaction is quite slow to confirm, so she sends an identical transaction (spending the same coin), but with twice the fee. The network relays the updated transaction and rational miners quickly mine the higher fee transaction.</p>

<p><strong>Child pays for parent</strong> means, as the name implies, that spending an unconfirmed transaction will cause miners to consider confirming the parent transaction in order to get the fees from the child transaction included in the same block.</p>

<p>Example: Eve spends 1 BTC at a shop owned by Alice. But Eve is greedy: she only pays the bare minimum fee, and her transaction will take hours to confirm. Alice spends Eve's transaction to her banker Bob, but this time with a higher fee. Miners will now want to confirm Eve's cheap transaction in order to be able to include Alice's more rewarding transaction in their block.</p>

<p>RBF is currently live since 0.12, but is opt-in for the spender: Unless the spender marks the transaction as replaceable with a non-maximal sequence number, the transaction is final.</p>

<p>CPFP is not a change in the protocol, but in miner strategy.
Since it is rational for miners to implement it (they make more money), it is expected that most miners do implement it. At least <a href="https://m.reddit.com/r/Bitcoin/comments/3r1dad/what_pools_implement_cpfp/" rel="noreferrer">Eligius</a> seems to have implemented it. As mentioned by Pieter in the comments, any miner using version 0.13 or above will mine using CPFP rules.</p>

<p>Which one should you use?</p>

<p>If you're the spender and want your transaction to confirm faster, use RBF. If you received a payment and are unable to convince the sender to up the fee, or the transaction is marked as non-replaceable, use CPFP.</p>

<p>Better yet, send your transaction with the proper fee the first time.</p>

CC BY-SA 3.0
2016-11-18T15:53:31.073Z
As a user, though, which one should I prefer to use? Probably RBF since it has the fees of only 1 transaction instead of 2? CPFP is outsourceable, though, anyone can pay to get my transaction confirmed, including the person on the receiving end of the transaction.
morsecoder
CC BY-SA 3.0
2016-11-18T15:54:31.693Z
Interestingly, you could do CPFP on the predecessor of a RBF transaction, which would send mixed signals to miners as to which version of the RBF transaction they should accept.
morsecoder
CC BY-SA 3.0
2016-11-18T16:14:09.293Z
CPFP mining is implemented in Bitcoin Core 0.13.0 and later versions. Any miner using that software follows it.
Pieter Wuille
CC BY-SA 3.0
2016-11-18T17:42:17.967Z
RBF is done by the spender. CPFP is used by the recipient. You are correct, CPFP uses twice the blockchain space and is therefore less efficient.
maservant
CC BY-SA 3.0
2016-11-18T18:52:26.590Z
Also, not everyone can pay for your transaction's fees; only the recipient who can spend the output, except if you explicitly signed the transaction with the ANYONECANPAY flag. You can't use CPFP on the predecessor of a RBF transaction, as the R stands for Replace: the original transaction isn't in the memory pool anymore, and your CPFP transaction is therefore orphaned and non-replaceable.
maservant
CC BY-SA 3.0
2016-11-18T19:22:55.303Z
Note that in the typical case where a change output is used, the sender is also a recipient and thus would also have the ability to use CPFP.
Nate Eldredge
CC BY-SA 4.0
2018-05-24T07:40:11.463Z
Why isn't RBF a miner strategy, too? Can't a miner just choose the higher paying transaction from the mempool?
mikezter
CC BY-SA 4.0
2022-12-08T19:48:58.713Z
@maservant: a sequence of MAX-1 indicates that a transaction is using locktime. For replaceability the sequence has to be MAX-2 or smaller.
Murch
CC BY-SA 3.0
2016-11-18T14:45:24.970Z
2016-11-18T18:49:42.067Z
2016-11-18T18:49:42.067Z
maservant
<p>Both RBF and CPFP attempt to solve the problem of transactions not confirming because of an insufficient fee. What are the pros/cons of using one vs the other?</p>

<p>Are both currently functional and available for use on the bitcoin network?</p>

<unconfirmed-transactions><terminology><replace-by-fee><child-pays-for-parent>
Replace-by-Fee vs Child-pays-for-Parent?
morsecoder
# Replace-by-Fee vs Child-pays-for-Parent?

(Asked by: username_0 on 2016-11-18)

Both RBF and CPFP attempt to solve the problem of transactions not confirming because of an insufficient fee. What are the pros/cons of using one vs the other?

Are both currently functional and available for use on the bitcoin network?

**Tags:** unconfirmed-transactions, terminology, replace-by-fee, child-pays-for-parent


---

## 1 answers

### Answer by username_1 on 2016-11-18. Score: 15

**Replace-by-fee** means transactions spending the same coin to the same addresses are not considered double-spends by the network and are still relayed, as long as they pay a higher fee than the preceding transaction.

Example:
Alice pays Bob with a coin worth 1 BTC, sending 0.5 BTC to Bob, 0.49995 BTC to herself as change, and 0.00005 BTC to fees. Alice sees that her transaction is quite slow to confirm, so she sends an identical transaction (spending the same coin), but with twice the fee. The network relays the updated transaction and rational miners quickly mine the higher fee transaction.

**Child pays for parent** means, as the name implies, that spending an unconfirmed transaction will cause miners to consider confirming the parent transaction in order to get the fees from the child transaction included in the same block.

Example: Eve spends 1 BTC at a shop owned by Alice. But Eve is greedy: she only pays the bare minimum fee, and her transaction will take hours to confirm. Alice spends Eve's transaction to her banker Bob, but this time with a higher fee. Miners will now want to confirm Eve's cheap transaction in order to be able to include Alice's more rewarding transaction in their block.

RBF is currently live since 0.12, but is opt-in for the spender: Unless the spender marks the transaction as replaceable with a non-maximal sequence number, the transaction is final.

CPFP is not a change in the protocol, but in miner strategy.
Since it is rational for miners to implement it (they make more money), it is expected that most miners do implement it. At least [Eligius](https://m.reddit.com/r/Bitcoin/comments/3r1dad/what_pools_implement_cpfp/) seems to have implemented it. As mentioned by username_2 in the comments, any miner using version 0.13 or above will mine using CPFP rules.

Which one should you use?

If you're the spender and want your transaction to confirm faster, use RBF. If you received a payment and are unable to convince the sender to up the fee, or the transaction is marked as non-replaceable, use CPFP.

Better yet, send your transaction with the proper fee the first time.

> **Comments:**
> **username_0**: As a user, though, which one should I prefer to use? Probably RBF since it has the fees of only 1 transaction instead of 2? CPFP is outsourceable, though, anyone can pay to get my transaction confirmed, including the person on the receiving end of the transaction.  
> **username_0**: Interestingly, you could do CPFP on the predecessor of a RBF transaction, which would send mixed signals to miners as to which version of the RBF transaction they should accept.  
> **username_2**: CPFP mining is implemented in Bitcoin Core 0.13.0 and later versions. Any miner using that software follows it.  
> **username_1**: RBF is done by the spender. CPFP is used by the recipient. You are correct, CPFP uses twice the blockchain space and is therefore less efficient.  
> **username_1**: Also, not everyone can pay for your transaction's fees; only the recipient who can spend the output, except if you explicitly signed the transaction with the ANYONECANPAY flag. You can't use CPFP on the predecessor of a RBF transaction, as the R stands for Replace: the original transaction isn't in the memory pool anymore, and your CPFP transaction is therefore orphaned and non-replaceable.  
> **username_3**: Note that in the typical case where a change output is used, the sender is also a recipient and thus would also have the ability to use CPFP.  
> **username_4**: Why isn't RBF a miner strategy, too? Can't a miner just choose the higher paying transaction from the mempool?  
> **username_5**: @username_1: a sequence of MAX-1 indicates that a transaction is using locktime. For replaceability the sequence has to be MAX-2 or smaller.  

---

