What is Child Pays For Parent (CPFP)?

The lifesaver when your transaction is 'stuck'

Read time 3 minutes | Sponsor this newsletter

The term Child Pays For Parent, or CPFP, refers to a transaction that allows us to push confirmation of a “stuck” transaction in a cryptocurrency mempool. This is because it has a very low mining fee and therefore has no priority for miners.

Child Pays For Parent (CPFP) transactions are a method where a new transaction with a higher mining fee is created. When this transaction is broadcast to the network, it incentivizes the confirmation of a previous, unconfirmed transaction. This approach is designed to motivate miners to prioritize and expedite the confirmation of these transactions.

Although its concept seems very similar to fee replacement transactions (Replace By Free) they should not be confused with this one. Since CPFP transactions do not invalidate the previous transaction, but instead, it must be confirmed together with the new transaction created. Furthermore, in CPFP the secondary transaction is only created to motivate miners to process and confirm both transactions, and thus be able to receive the associated commission. Therefore, they are known as "the child pays for the father".

How does Child Pays For Parent transactions work?

Sometimes you have that a transaction gets stuck on the Bitcoin Blockchain. The transaction keeps not being confirmed while more and more new blocks appear. Usually, this has to do with you not paying enough fees. It is especially noticeable when the network is congested. In these times of congestion or high demand, miners prioritize only those transactions that have a high or minimally acceptable commission rate. So those transactions with a very low commission may be stagnant and unconfirmed in the bitcoin mempool for several days, and even weeks.

To address this issue, the Child Pays For Parents (CPFP) method is used. In this approach, the user of an unconfirmed transaction creates a new transaction, referred to as a 'child transaction'. This child transaction must include a transaction fee significantly higher than that of the original transaction.

The new CPFP (Child Pays For Parents) transaction utilizes the balance from the yet-to-be-confirmed primary transaction to initiate a transfer to a different address. Essentially, when a user initiates a transaction for sending an 'X' amount of funds and has slightly more than this amount in their wallet, the wallet will automatically generate two outputs. The first output is dedicated to sending the 'X' amount of funds to the intended recipient, while the second output is designed to handle the change or return funds from that transaction.

Remember that in Bitcoin transactions, it's necessary to spend all outputs. This becomes feasible when the initial transaction generates a crypto sending transaction, and at the same time, returns a certain amount of unutilized cryptocurrency to a change address that we control. This unutilized cryptocurrency is known as an Unspent Transaction Output, or UTXO. Essentially, a CPFP (Child Pays For Parents) leverages our UTXO balance to create a new transaction with a higher mining fee, aimed at accelerating the confirmation of the initial transaction.

Therefore, if the original transaction remains unconfirmed, the user can initiate a child transaction (CPFP) linked to the parent transaction. In this child transaction, the user redirects the change or leftover funds to another personal address. The key aspect of this new transaction is its significantly higher mining fee, which makes it more appealing for miners. This fee is also designed to cover the processing costs for both the parent and child transactions.

The moment miners see the secondary transaction, they will be drawn to confirm it to collect the associated commission fee. But they will not be able to confirm said transaction independently, without first confirming the main transaction first. So they will evaluate and verify the secondary transaction to see if it has the necessary fees to cover both transactions.

Mr.Insights and friends 🤝

Not yet finished reading and want to know more about Bitcoin & Ordinals, don't forget to subscribe to these newsletters:

Ordinal Hive NewsletterThe only Ordinal Newsletter you will ever need!