Bitcoin’s Child Pays For Parent (CPFP) Explained

As Bitcoin’s user, you will, or you might have already faced the problem of long-standing unconfirmed transactions at some point or the other.

The reason for this long-standing unconfirmed transaction is because either you have attached too low transaction fees, or the Bitcoin’s network itself is too much congested.

For example, see the comment of this Reddit user:

I’ve received a bitcoin tx that is unconfirmed for close to two days now. The fee was much too small, so I understand why it’s stuck.

Can someone explain how CPFP works and how I would use this as a receiver?

Thanks

After reading many such comments on forums and Reddit, I decided to write today on Bitcoin’s Child Pays For Parent- a concept that helps to seep up unconfirmed Bitcoin transactions, because I think you will need this at some point or the other if you transact in BTC.

So let’s jump in right away:

What Is Child Pays For Parent (CPFP) In Bitcoin?

Well, before telling you about Bitcoin’s Child Pays For Parent, I urge you to read our guide on Bitcoin’s UTXOs because without understanding UTXOs, CPFP will not make any sense to you.

So assuming that you have read and understood UTXOs, let me begin:

Bitcoin’s Child Pays For Parent (CPFP) is an elementary concept which means that the child transaction is paying and compensating for the parent transaction so that both can be confirmed soon.

On a lighter note, you can think of it as a parent having less money for their expenses, and that’s where their child comes to rescue to pay the difference on their behalf.

Just stick with me, because in a moment I will clarify what this child or parent thing is!!

In other words, it is a technique through which you can un-stuck your stuck transactions by making a new transaction with higher fees (Child transaction) using the outputs from the previous transaction (parent transaction) that is stuck.

And as the miners by default mine only those transactions that have high or atleast the minimum required fees, they will naturally be tempted to pick the child transaction but since the child transaction itself wouldn’t be valid untill the parent transaction is confirmed !!

So this inbuilt mechanism of Bitcoin transactions will incentivize miners to look at both the transactions (i.e., child & parent transaction) collectively and confirm the parent transaction first so that they can collect higher fees attached to the child transaction.

Note: These are called parent and child transactions because the following transaction (child) is being generated from the previous one (parent) only !!

Confusing?

See this simple example:

Let say a transaction (X1) is stuck from two days in Bitcoin’s mempool due to low fees.

The size of this transaction is 500 bytes, and you have attached 20000 Satoshis as fees that translate into 40 Satoshis/byte.

You originally have 2 BTC, and you are paying 1 BTC to another party, and in this case, the transaction anatomy will look like this:

Input 

  • 2 BTC (bitcoins outputs, i.e., UTXOs needs to be spent in its entirety)

Output

Now, after checking for appropriate Bitcoin transaction fees on Bitcoinfees.com, you realized that a minimum fee rate of 100 Satoshis/byte would be required to confirm your transaction.

As a sender, you got to know somehow that you can create another transaction (Y, i.e., Child transaction) using the Bitcoin change outputs of X2 transaction as input ( i.e., UTXOs of X2 transaction).

Let say, the size of this child transaction (Y) is 250 bytes, and you decide to give it a transaction fee of 25000 Satoshis which translates into the required fee of 100 Satoshis/byte. (you haven’t done this transaction, but you are contemplating appropriate fees for it !!)

But since your goal is to create such an incentivized scenario for the miners that they look at both the transactions and are compelled to confirm parent transaction first to claim the lucrative fee of child transaction.

So for creating this scenario, you decide to increase the fees of child transaction (Y) to 55000 Satoshis and now you fees per bytes is translating into 220 Satoshis/bytes, which is now looking attractive from miner’s point of view because that’s way beyond the required fee, i.e., 100 Satoshis/byte.

But because the miner will not be able to claim this extra fee without confirming the parent transaction (X2), so the miner will be compelled to pick that parent transaction also.

Now in this case, if you see the effective fees that the miner will be receiving by including both transactions (child & parent) is still 100 Satoshis/byte (i.e., a fee of total 75000 Satoshis for a total of 750 bytes size).

Thus miner will be incentivized to pick both of these transactions.

See here for another real example of Bitcoin transaction that used Bitcoin’s Child Pays For Parent:

Bitcoin Parent Transaction

See this transaction was done 258 minutes ago but it remained in Bitcoin Mempool for long due to its low fee (2.9 Sat/B), let us call it as transaction X (parent transaction).

So to bump the fees, CPFP was implied in another transaction, and the unconfirmed output of 0.02066496 BTC was used as an input in another transaction, i.e. (child transaction).

Let’s call it as Y transaction, and here you can see in the below image that the transaction fee was increased to 63.442 Sat/B and then the transaction was picked within 10 minutes into the next block.

But since the miner couldn’t just confirm transaction Y independently, he/she had to pick the previous parent transaction X, and if you notice carefully, both these transactions were accommodated in block number 527496.

Child Transaction

Conclusion: 

So this is how you can speed up your Bitcoin confirmations and you will easily find enough Bitcoin wallets that support this functionality.

Some of these wallets that have support for CPFP are:

  • Bitcoin core wallet
  • Electrum wallet
  • Samourai wallet etc.

Lastly, I know some of you might be confused about Bitcoin CPFP with Bitcoin RBF (i.e., Replace By Fee) but let me tell you both are completely different.

You can learn more about Bitcoin’s Replace By Fees functionality here in our exclusive guide:

And if you liked this article, then do share it with your friends and follow us on Twitter @themoneymongers !!

Sudhir Khatwani

Leave a Reply

Your email address will not be published. Required fields are marked *