The Black Swan That Could Turn Bitcoin Upside Down

in #bitcoin7 years ago (edited)
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

Sort:  

Segwit totally changes the way the blocks are arranged. It may work for now, for next few years. Or a vulnerability nobody thought possible could occur - but much later on. Both chains will go fine, tomorrow, next year.

★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★
https://freebitco.in/?r=8869745
WIN BITCOIN
Roll to win up to $200 BITCOIN
You can enter to win every hour
There is also a weekly jackpot drawing of $500
The more you roll the more entries you get for the weekly lotto
The best thing is it's completely FREE!!!!!
★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★★

This is a page from the carbohydrate/sugar - that could be in bitcoin too.
https://steemit.com/sugar/@tuventure/bitcoin-and-ancel-keys

Do. Not like Black swans

Interesting .. what are the chances of this scenario playing out the way you've explained above ?

I don't think it is likely to happen prior to Nov 1, when the 2X part of the NYA kicks in. Core just released new version that disconnects 2x nodes. I believe that if the NYA fails, there is a strong chance that a lot of miners will jump chains at that point. Then this scenario could possibly play out.

Wow thanks so much for posting. 11 days after your post here it is August 18th and the price of BCH has skyrocketed almost as if the tide is turning toward this scenario actually occurring. Look at this. Screen Shot 2017-08-18 at 6.04.41 PM.png

I think this scenario is going to happen. I feel it in my gut. And BCH will go up and beyond the current value of BTC (~$4100) in a jiffy.

Lol, what Jiffy? There is space for both coins but Bitcoin will be number one for quite a while longer.

Updated profitability of mining graph http://fork.lol/#/dari/7

.... and I am betting on it .... bought more Bitcoin Cash .....

When designing Zcash 1.0 (“Sapling”) we were concerned about this possibility hitting Zcash: https://github.com/zcash/zcash/issues/95 What we decided to do about it for Zcash 1.0 Sapling was just recalculate the difficulty factor more frequently (https://github.com/zcash/zcash/issues/147), similarly to how Bitcoin Cash has apparently done.

Interesting post, thanks for your thoughts

Interestingly highlighted points. I have always been a proponent for a total overhaul (BCH) instead of a "windowdressing" (SEGWIT) approach to bitcoin scaling issues. For anyone who still hasn't understood what bitcoin scaling,SEWIT and the birth of BCH really is, you can head to my blog, I have a recent article that explains in simple terms what this is. This can help us understand what the future really should be like for bitcoin.