How to speed up a transaction

Let's hypothesize we are receiving a transaction from a friend but he has set up a very low fee and the transaction gets no confirmation. How could we solve that if he is not intended to increase the fee? We could arrange a CPFP transaction.

What are CPFP transactions?

CPFP means "Child Pays For Parents". With this kind of transaction, we are spending the unconfirmed coins, sending them to one of our addresses setting up a higher fee. Doing so miners that want to take the big fee of our transaction have to confirm also the transaction with a lower one.

How to arrange a CPFP transaction

In our case, a friend has arranged a transaction to our address mxhf3LRP3C9gZRacvJMiYvq5K3dpeWRPaG (it's a testnet address),

but he has set a very low fee.

We can see the transaction in the "History" tab of our Electrum client, but we'll have to wait several hours to have it confirmed by the network.

To arrange a CPFP transaction, we have to go to the "Addresses" tab, select the mxhf3LRP3C9gZRacvJMiYvq5K3dpeWRPaG address (the one that is receiving the transaction with low fees) and, clicking on the right button, we have to select "Add to coin control". In doing so we are going to spend only the UTxOs related to this address.

Now we can go to the "Send" tab and dispose a transaction to another address we own, like the n3ReAt8GJ6m1ricoanTsBJpANc4zYVkXSG address in our case, spending all the available amount (clicking on the "Max" button).

Now, clicking on the "Pay..." button, we can set up the fee. We can consider setting it accordingly to our needs. In our case, we have set it to the maximum available value.

Now we can see the new transaction in our "History" tab.

As we can see, there is an alert sign because the transaction is trying to spend unconfirmed coins. Waiting a few minutes, we will see that both transactions have been confirmed together by the network.

Looking at the transactions' details, we can also see that both have been included in the same block number 2473282.

Final thoughts

This method may not be used daily and may also be inconvenient since we have to pay a transaction fee to receive funds, but it may be useful in some situations and it is also a good method to learn how the Bitcoin protocol works.

This article was updated on 26 Oct 2023