1

With the Child Pays for Parent (CPFP) Do I sent more bitcoin to the SAME address the stuck transaction was sent to? The second transaction (with fees high enough to cover both transactions) will push the first transaction through? Or will they both get stuck? Or will the latter bypass the lesser?

For example.

1- I sent 5 BTC to address flsdjlfksdjfli3w320r89we2182eq78e9r7239 and it gets stuck

2 - so I sent ANOTHER transaction to flsdjlfksdjfli3w320r89we2182eq78e9r723 (+ fees for both transactions),

3 - and then both transactions go through?

Thanks in advance for the answers.

1 Answer 1

5

No, it's not a matter of sending to the same address multiple times, rather, CPFP works by spending the output of a previous transaction in a second transaction with a higher fee.

Example:

An unconfirmed transaction A with 500B size paid 20000 satoshis fee which corresponds to a fee rate of 40 satoshis per byte. The transaction has two outputs:

  • A:0 is signing over funds to the recipient
  • A:1 is signing the remainder back over to the sender

Let's say that the transaction is stuck because it would have needed a fee rate of 100 satoshis per byte to get selected into a block.

As the sender, you now create a second transaction B that uses the unconfirmed transaction A's change output A:1 as one of its inputs. Let's say that this second transaction B has 250B. To pay a fee rate of 100 sat/B for the second transaction, you'd specify a fee of 25,000 satoshis. But you also wanted to speed up the unconfirmed parent transaction! To do so, you add another 30000 satoshis, which brings the child transaction's fee up to 55000 satoshis.

This leaves the parent transaction A with a fee rate of 40 satoshis/byte, and the child transaction B with a fee rate of 220 satoshis/byte, but the two transactions in sum with 75,000 satoshis for 750 bytes of transactions, or a fee rate of 100 satoshis per byte. In order to get the juicy fee from the child transaction B, a miner has to also confirm transaction A as B is invalid if A is unconfirmed. They are thusly incentivized to include both A and B by the child paying for the parent.

Note that the recipient has the same option by creating an analogous CPFP transaction via spending A:0. (H/T Thalis K. for pointing this out in the comments)

4
  • Thank you. How do you choose the send address on an exchange?
    – Shes2smart
    Dec 23, 2017 at 0:47
  • 1
    @Shes2smart: As far as I know all exchanges take custody of your funds, so you cannot.
    – Murch
    Dec 23, 2017 at 1:17
  • 1
    Worth noting, that a CPFP transaction can by created either by recipient of funds i.e. recipient of A:0 in the example above, or by the spender (initial sender) if the transaction has change which would be A:1 in the example above.
    – Thalis K.
    May 29, 2018 at 17:57
  • @ThalisK.: Thanks, I've added a comment to point this out.
    – Murch
    May 29, 2018 at 20:03

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.