The Black Swan That Could Turn Bitcoin Upside Down

SegWit Vulnerability Discovered

Last week Bitcoin forked into two competing blockchains, which for the purpose of this article I will call Bitcoin Cash and Bitcoin SegWit. There is one previously unforeseen black swan event could possibly bring the Bitcoin SegWit chain to a grinding halt in the coming weeks.

After four years of arguing about how to scale Bitcoin, some members of the “bigger blocks” faction hard forked on August 1st to form “Bitcoin Cash” following Satoshi’s original vision of simply increasing the block size.

The remaining “SegWit” faction expect to activate their new protocol “segregated witness” on their blockchain in two weeks. SegWit has kept the block size capped at 1 megabyte for the past four years, even though this has led to transaction processing delays and skyrocketing transaction fees.

Even though Bitcoin Cash is now separated from the SegWit blockchain, the two are still economically connected by the scarcity of mining hash power because they use the same proof of work algorithm.

Bitcoin transactions are processed by “miners” who run specialized hardware to solve the math problem called proof of work. This algorithm is solved by custom made processors called “ASICs”.

There are a limited number of ASIC computers in the world, and nearly all of them are currently employed in mining Bitcoin. This means the supply of Bitcoin mining hashpower is inelastic over the short term, but fairly elastic over longer periods that allow for manufacture and delivery of new ASIC machines.

Bitcoin’s difficulty automatically adjusts every 2016 blocks to keep the network producing new transaction blocks every ten minutes. It normally takes two weeks to mine 2016 new blocks.

When Bitcoin Cash forked away, the initial difficulty of the new chain was the same as the SegWit chain. Since only a small percentage of miners initially supported Bitcoin Cash, it took over six hours to mine the first Bitcoin Cash block. This would normally take ten minutes, so Bitcoin Cash was taking 36 times longer than Bitcoin SegWit to process the same transactions.

The slow initial block production was loudly jeered in social media by the supporters of SegWit, and the price of Bitcoin Cash dropped accordingly for the first five days, bottoming around $200 on Saturday.

However, the creators of the Bitcoin Cash fork anticipated that they would initially have very little miner support. So they added a second difficulty adjustment rule to reduce difficulty every 12 hours if enough blocks have not been mined. The SegWit blockchain does not have this emergency difficulty reduction rule and cannot add it without a hard fork of their own. This small feature addition by Bitcoin Cash may have unintentionally exposed an asymmetric vulnerability on the SegWit chain.

Bitcoin miners tend to choose where to apply their mining power based purely on profitability. The two Bitcoin forks are now competing for a limited pool of mining hash power.

The profitability of mining Bitcoin depends on three factors - the price of Bitcoin, the price of electricity, and the mining difficulty. More efficient miners are able to solve more blocks at a lower cost of electricity. For this reason the majority of Bitcoin mining is done in countries with low electricity costs, primarily China and Iceland.

This chart shows the profitability of mining the two chains over the past 24 hours. http://ztnark.com/bitcoin-fork

Mining Profitability on BTC vs BCC

At the current prices, if the price of Bitcoin Cash remains stable and the difficulty continues to fall, when the difficulty reaches 10% of the SegWit chain, it will become more profitable to mine Bitcoin Cash than to mine SegWit. The green and gold lines on the chart above will cross.

SegWit is coming up on its two week difficulty adjustment, and based on the hashpower, the difficulty is expected to increase by 7%. That will push Bitcoin Cash even closer to profitability.

The Runaway Scenario

By the end of the first week, the difficulty of Bitcoin Cash had fallen to 17% of that of the SegWit chain.

It is expected that if the profitability of the Bitcoin Cash chain surpasses that of SegWit, some miners will make the rational decision from self-interest, and start redirecting their machines to mine the Bitcoin Cash chain instead of SegWit. However, this could cause a runaway scenario.

If the SegWit blockchain loses a significant amount of hashpower from miners jumping to the other chain, it will have major slowdowns and delays in transaction processing. Because SegWit has no built-in mechanism to reduce difficulty, it would take two weeks before the difficulty would be reduced, and even then, the current difficulty algorithm limits reductions to 75% in one period, which may not be enough.

Thus a migration of 25% of mining hashpower to the Bitcoin Cash chain could result in the main Bitcoin SegWit blockchain slowing substantially. This in turn could cause a panic crash of the Bitcoin SegWit price on exchanges, pushing the profitability of mining SegWit even further underwater.

If the panic and ensuing price crash were large enough, the hashpower for the SegWit blockchain might fall so much that it takes more than two weeks to reach the end of the 2016 block period when the next difficulty adjustment is made.

Consider that if hashpower fell by 50%, it would take 4 weeks instead of two. If hashpower fell by 75% it would take 8 weeks. If it falls by 90%, it will take 20 weeks to reach the next difficulty adjustment.

This scenario assumes that the miners make decisions purely pragmatically on the basis of profitability. Undoubtedly some miners are ideologically motivated and might continue mining the SegWit chain even if the profitability went negative. But that costs them money in the form of electricity, and there is a limit to how long any organization can afford to operate at a loss.

Miners also have to consider the damage that would be done to Bitcoin as a whole if the SegWit chain suddenly died. Even if Bitcoin Cash survives, this black swan event might significantly reduce the market value of Bitcoin for a long time, cutting into profits.

On the other hand, it will only takes a few miners jumping chain to start the process. Once that process begins, a race to the bottom may ensue.

This scenario seems improbable, unless Core is successful in blocking Segwit2X from activating on November 1st. At that point the miners will have to decide whether to fork bitcoin again, as Segwit2X, or simply move their hashpower over to the Bitcoin Cash chain.

Bitcoin Cash was designed by the mining faction of the Bitcoin scaling debate to keep mining Bitcoin profitable. The SegWit faction has long viewed miners in a negative light and proposed the SegWit changes to reduce the power of miners over the Bitcoin network. In the economic nature of competition, this may lead to Bitcoin SegWit losing the support of its miners if Bitcoin Cash is seen as a viable alternative.

In such a scenario the only way the Bitcoin SegWit could recover would be to do an emergency hard fork on very short notice to reduce the difficulty. It is unclear whether that is even possible.

Some people in the SegWit forums are now discussing the vulnerability.

death_spiral.png

More information about the runaway miner scenario:

https://medium.com/@shludvigsen/traders-guide-to-bitcoin-cash-bitcoin-segwit-819933694b34

https://medium.com/@freetrade68/the-bitcoin-cash-flippening-is-coming-faster-than-you-expect-3fb75fa61138

https://medium.com/@malimujo/bitcoin-cash-bombshell-incoming-soon-44eee7d1fca6

H2
H3
H4
3 columns
2 columns
1 column
74 Comments