13

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?

1 Answer 1

14

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 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.

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.

8
  • 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
    Nov 18, 2016 at 15:53
  • 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
    Nov 18, 2016 at 15:54
  • 1
    CPFP mining is implemented in Bitcoin Core 0.13.0 and later versions. Any miner using that software follows it. Nov 18, 2016 at 16:14
  • 2
    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
    Nov 18, 2016 at 17:42
  • 1
    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. Nov 18, 2016 at 19:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.