On October 2nd, in a post on the Coinbase blog, employees Brock Miller and Eli Haims detailed a new technique the exchange has been using to expedite transaction processing on the Bitcoin blockchain, which Coinbase calls the ‘Child Pays for Parent (CPFP)’ solution.
The key problem that Coinbase is trying to solve is described early on in the blog post:
“Transaction fees are volatile and unpredictable, which can result in significant swings in the amount of time it takes for a transaction to confirm. As a result of this, we’ve had many days here at Coinbase where some users’ transactions would get stuck due to fee rate spikes and general Bitcoin network congestion (which peaked in December 2017). First and foremost, this gives our users a frustrating experience because it takes longer than expected for their transactions to arrive. Second, it means that engineers at Coinbase are getting paged frequently to investigate a situation that is mostly out of their control.”
To provide a better understanding of common scenarios, the two relay the traditional transaction process:
“When a customer wants to send some bitcoin to another address on the network, there are two major factors that we try to balance:
1. The transaction fee, or how much the customer pays to have their transaction included in a block.
2. The speed at which that transaction gets included in a block.”
While credit cards charge fees based on a percentage, Bitcoin is more of a “fee market”. This means that fees change relative to market congestion, allowing the user to “choose” how much they’d prefer to pay. However, miners, who are incentivized through transaction fees to verify transactions, tend to pick the highest paying ones.
So if someone makes a transaction when the network is slow, they’ll pay a small fee. However, if the network suddenly picks up and another person makes a transaction, the fees will be much higher. Miners will then choose to verify the later transaction first, and the previous transaction will have to wait until the network slows down, causing it to be “stuck”.
Suggested Reading : Learn why Coinbase is one of our picks for the best exchanges in cryptocurrency.
‘Child Pays for Parent’ as a Solution
These issues are where the Child Pays for Parent solution comes in—one that incentivizes miners to confirm lower paying transactions.
To explain this, it’s helpful to look at a Bitcoin transaction just as using fiat currency. If you purchase something from me, you are “inputting” funds into my network of cash. Then, when I use that money for something else, I’m “outputting” it into another network. My purchase is considered a “child” of your “parent” purchase since it can only exist thanks to your funding.
Now, imagine that process but with change. To paraphrase the Coinbase example – If you pay me a $10 for a $5 purchase, the change you receive is considered an output from my network, also known as a “change output”. That change output is a child of our transaction, with our two networks being the parents. Every Bitcoin transaction has a change output, which enables the CPFP solution to work.
Child transactions cannot be placed in a block until their parent transactions have been previously added. Under CPFP, the Bitcoin blockchain looks at parent and child transactions as a group. If both parties are waiting to be verified, the network adds their transaction fees together. Not only are miners paid more to confirm the group, but these transactions cannot be verified separately. To receive the high payment from the child transaction, the miner is forced to deal with the two parents as well. Everybody wins.
For the past few months, the platform has been introducing CPFP to traders:
“If a customer’s transaction happens to be stuck pending for at least 4 blocks, we’ll broadcast and pay for a child transaction at a sufficient fee rate to rescue the parent transaction (we actually batch these so that we can rescue multiple parents with one child). This is done without any interaction from the end user, and we’ve seen really positive results thus far with its use.”
The technique has lead to thousands of transactions being verified much faster than with traditional methods.
The post Coinbase Details ‘Child Pays for Parent’ Bitcoin Solution appeared first on UNHASHED.