What Is Child-Pays-for-Parent (CPFP)?

From The Weekly BOLT ยท

Last week we covered Replace-by-Fee (RBF), the mechanism that lets you bump a stuck transaction by rebroadcasting it with a higher fee. This week: the alternative when RBF isn't available, Child-Pays-for-Parent, or CPFP.

The Basics. Sometimes you can't use RBF. Maybe your wallet didn't flag the transaction as replaceable when you sent it. Maybe you're on the receiving end of a stuck transaction you didn't send. In those cases, you can still accelerate confirmation with a technique called Child-Pays-for-Parent. It works like this: you create a new transaction (the "child") that spends the unconfirmed output from the stuck transaction (the "parent"), and you attach a very high fee to the child. Miners see a package, low-fee parent + high-fee child, and evaluate the combined fee rate. If the total package pays enough per byte, miners include both transactions in the next block. The parent gets confirmed because the child paid for it.

Why It Matters. CPFP is the receiver's tool. If somebody sends you Bitcoin with too low a fee and the transaction stalls for days, you're not helpless waiting on the sender to bump it. You can bump it yourself by spending the incoming funds with a high-fee child transaction. It's also useful for businesses and exchanges that receive customer deposits, if a customer accidentally underpays the fee, the exchange can CPFP the deposit into confirmation rather than telling the customer to wait 72 hours.

The limit: CPFP only works if the parent transaction has an unconfirmed output you control. If the transaction sent funds to an address you don't have the private key for, you can't CPFP it. You have to wait or hope the sender uses RBF.