<p>Details about difficulty adjustment can be found at <a href="https://en.bitcoin.it/wiki/Difficulty" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Difficulty</a> and <a href="https://en.bitcoin.it/wiki/Target" rel="nofollow noreferrer">https://en.bitcoin.it/wiki/Target</a>.  Difficulty adjusts every 2016 blocks, with the goal of keeping the average block time at 10 minutes (so that 2016 blocks takes 2 weeks).  At each adjustment, the difficulty can change by at most a factor of 4 (up or down).</p>

<p>Let's assume the worst case: that this disruption happens immediately after a difficulty adjustment.  With a 90% drop in mining power, each block now takes an average of 100 minutes to mine, instead of the usual 10.  So the next 2016 blocks take 20 weeks instead of 2.</p>

<p>After 20 weeks, there is an adjustment, and presumably difficulty will drop by the maximum factor of 4.  Now the average block time is 25 minutes and the next 2016 blocks will thus take 5 weeks.</p>

<p>At this point the difficulty can drop by a factor of 2.5 and we are back on track, with an average block time of 10 minutes.</p>

<p>So it takes 25 weeks to get back to normal.</p>

<p>Of course, in your situation, a more likely outcome is that Chinese miners will quickly sell their mining hardware to people outside the country, where electricity is still plentiful, and the total mining power will recover.  (Or they'll set up their own offshore mining facilities, and just ship the hardware there.)  If not, then mining hardware producers would try to quickly ramp up production so as to fill the void.  After all, everyone can see that difficulty will drop by a factor of 4 in 20 weeks, which will increase mining revenue by a factor of 4 and make it far more profitable (assuming the price of Bitcoin remains constant).</p>

CC BY-SA 3.0
2016-12-13T14:19:35.867Z
2016-12-13T14:19:35.867Z
Nate Eldredge
<h3>Short answer:</h3>

<p>Around six months.</p>

<h3>Long answer:</h3>

<p>Assume the drop is instant and occurs right after a retarget interval (block number divisible by 2016). Before we reach the next retarget block, what normally takes 14 days will take 140 due to the 10x slower mining. During this time, transaction fees would soar, as blocks are only found every hour and two thirds, yet they can't grow more than a megabyte. This would last for almost five months.</p>

<p>After 140 days, the difficulty would adjust dramatically, but the source code limits the factor to four (at any one time). See the <a href="https://github.com/bitcoin/bitcoin/blob/57b34599b2deb179ff1bd97ffeab91ec9f904d85/src/pow.cpp#L57" rel="nofollow noreferrer">source code</a> for details. The next month would be 2.25x times slower than normal. The seventh month would see the block interval go back to normal (4*4 is 16, so 1/10 > 1/16 and the difficulty will reach the proper value).</p>

<p>Miners won't stop mining due to a ban in one country, though. They'll just move all their equipment to the next cheapest place where it's still legal. Also, people who previously weren't mining will start to because of decreased competition. A 90% drop in hash rate is therefore highly unlikely even in the case of a legal crackdown.</p>

CC BY-SA 3.0
2016-12-13T15:25:02.767Z
Why did you delete that answer? It looks correct to me, and multiple answers can coexist –– even if their content is similar multiple explanations help make a point clearer. :)
Murch
CC BY-SA 3.0
2016-12-13T15:41:57.970Z
You're right. My phone crashed and I posted the answer much later than I wanted (after which I realized my answer was pretty much exactly like Nate's). It kind of looked like plagiarism, even though this is essentially just a math question ;)
maservant
CC BY-SA 3.0
2016-12-13T15:19:01.590Z
2016-12-13T15:19:01.590Z
maservant
<p>TL;DR: 20 weeks of 100 minute blocks and 5 weeks of 25 minute blocks.</p>

<p>Difficulty resets occur every 2016 blocks. In the worst case, the mining power drop would happen immediately after the difficulty reset, and it's 2016 blocks to the next one. Since reduction of the mining power by 90% would cause the expected block interval to rise by a factor of 10, blocks would only be discovered every 100 minutes in average. As 2016 blocks are usually found in two weeks, it would now take up to 20 weeks for a difficulty reset to occur. As the difficulty can only adapt by up to a factor of four, the difficulty would only drop to a quarter of the previous, so the expected block interval would still be 25 minutes after the first difficulty reset. So, it would take another five weeks for the difficulty to return us to ten minute blocks.</p>

CC BY-SA 3.0
2016-12-13T14:22:21.660Z
2016-12-13T14:22:21.660Z
Murch
<p>Hypothetical scenario:</p>

<p>If China decided to stop bitcoin and forced all electrical companies to stop generating electricity (unlikely I know, but work with me for a minute), that I assume would force miners to switch to solar power, meaning there will be a huge drop in mining power, meaning, transactions would take longer etc, until the network corrects itself.</p>

<p>If mining power instantly dropped by 90% tomorrow, how long would this correction take? and how long would transactions take in such a scenario, until the network corrects itself?</p>

<difficulty><hashpower>
Hypothetical Scenario - How long does a network correction take?
oshirowanen
# Hypothetical Scenario - How long does a network correction take?

(Asked by: username_0 on 2016-12-13)

Hypothetical scenario:

If China decided to stop bitcoin and forced all electrical companies to stop generating electricity (unlikely I know, but work with me for a minute), that I assume would force miners to switch to solar power, meaning there will be a huge drop in mining power, meaning, transactions would take longer etc, until the network corrects itself.

If mining power instantly dropped by 90% tomorrow, how long would this correction take? and how long would transactions take in such a scenario, until the network corrects itself?

**Tags:** difficulty, hashpower


---

## 3 answers

### Answer by username_1 on 2016-12-13. Score: 3 | Accepted answer

Details about difficulty adjustment can be found at <https://en.bitcoin.it/wiki/Difficulty> and <https://en.bitcoin.it/wiki/Target>. Difficulty adjusts every 2016 blocks, with the goal of keeping the average block time at 10 minutes (so that 2016 blocks takes 2 weeks). At each adjustment, the difficulty can change by at most a factor of 4 (up or down).

Let's assume the worst case: that this disruption happens immediately after a difficulty adjustment. With a 90% drop in mining power, each block now takes an average of 100 minutes to mine, instead of the usual 10. So the next 2016 blocks take 20 weeks instead of 2.

After 20 weeks, there is an adjustment, and presumably difficulty will drop by the maximum factor of 4. Now the average block time is 25 minutes and the next 2016 blocks will thus take 5 weeks.

At this point the difficulty can drop by a factor of 2.5 and we are back on track, with an average block time of 10 minutes.

So it takes 25 weeks to get back to normal.

Of course, in your situation, a more likely outcome is that Chinese miners will quickly sell their mining hardware to people outside the country, where electricity is still plentiful, and the total mining power will recover. (Or they'll set up their own offshore mining facilities, and just ship the hardware there.) If not, then mining hardware producers would try to quickly ramp up production so as to fill the void. After all, everyone can see that difficulty will drop by a factor of 4 in 20 weeks, which will increase mining revenue by a factor of 4 and make it far more profitable (assuming the price of Bitcoin remains constant).


---

### Answer by username_2 on 2016-12-13. Score: 3

### Short answer:

Around six months.

### Long answer:

Assume the drop is instant and occurs right after a retarget interval (block number divisible by 2016). Before we reach the next retarget block, what normally takes 14 days will take 140 due to the 10x slower mining. During this time, transaction fees would soar, as blocks are only found every hour and two thirds, yet they can't grow more than a megabyte. This would last for almost five months.

After 140 days, the difficulty would adjust dramatically, but the source code limits the factor to four (at any one time). See the [source code](https://github.com/bitcoin/bitcoin/blob/57b34599b2deb179ff1bd97ffeab91ec9f904d85/src/pow.cpp#L57) for details. The next month would be 2.25x times slower than normal. The seventh month would see the block interval go back to normal (4\*4 is 16, so 1/10 > 1/16 and the difficulty will reach the proper value).

Miners won't stop mining due to a ban in one country, though. They'll just move all their equipment to the next cheapest place where it's still legal. Also, people who previously weren't mining will start to because of decreased competition. A 90% drop in hash rate is therefore highly unlikely even in the case of a legal crackdown.

> **Comments:**
> **username_3**: Why did you delete that answer? It looks correct to me, and multiple answers can coexist –– even if their content is similar multiple explanations help make a point clearer. :)  
> **username_2**: You're right. My phone crashed and I posted the answer much later than I wanted (after which I realized my answer was pretty much exactly like username_1's). It kind of looked like plagiarism, even though this is essentially just a math question ;)  

---

### Answer by username_3 on 2016-12-13. Score: 3

TL;DR: 20 weeks of 100 minute blocks and 5 weeks of 25 minute blocks.

Difficulty resets occur every 2016 blocks. In the worst case, the mining power drop would happen immediately after the difficulty reset, and it's 2016 blocks to the next one. Since reduction of the mining power by 90% would cause the expected block interval to rise by a factor of 10, blocks would only be discovered every 100 minutes in average. As 2016 blocks are usually found in two weeks, it would now take up to 20 weeks for a difficulty reset to occur. As the difficulty can only adapt by up to a factor of four, the difficulty would only drop to a quarter of the previous, so the expected block interval would still be 25 minutes after the first difficulty reset. So, it would take another five weeks for the difficulty to return us to ten minute blocks.


---

