Surely this question has been discussed ad-absurdum but I ask it anyway ... (found no logical explanation).
Satoshi though it's best to change difficulty after n blocks. He chose 2016 blocks as a deciding factor. Now, this works well when the hash rate increases because the 2016 blocks are every only going to be 2016 blocks and then the higher difficulty will be enforced.
However, when the hash rate drops (like right now), the blocks are still 2016 but the time it reaches those 2016 is much longer. In theory, it could be "never" (If all miners quite, or, anyway, say a big portion of the miners quit).
I know block timestamps are just for reference and have to be only "somewhat" correct but how can it be that we can exactly "time" the time it takes to mine the 2016 blocks and adjust the difference, but we cannot "time" the actual "time elapsed" since block -2015 and adjust difficulty based on that !
Since BTC is low and hash rate is at an all time high, miners probably quit. Some of them. I understand that there always will be miners that have cheap enough electricity -- or just skin in the game? -- to mine even though the prices are low, but wouldn't have been better to adjust mining difficulty upwards after 2016 blocks and downwards after 2 weeks?
Saying, change difficulty whatever is first, either 2 weeks passed or 2016 blocks reached.
Now this discussion is old I know, but I've only come across "it's easy to measure exactly 2016 blocks but it's not easy to measure exactly the time it took for the last 2016 blocks".
But how can then the difficulty be adjusted for all clients the same, when the block timestamp is more a guesstimate (it has to be within 2hours of the "overall network" and It must be greater than the median time of the last 11 blocks -- verbatim from a google)
Surely the issue here is that if half of the miners quit because of expensive fees, the burden is on the remaining miners who have to mine DOUBLE as long to reach the 2016 blocks (with the added benefit I guess that fees are higher because only half the blocks are generated... but that may be negligible).
Or did I just answer my own question with the last paragraph on why this is a non-issue?
The difficulty can only drop 75% or less and it can only raise 300% or less every 2016 blocks. Source
Shitcoin forks often reach these maximums because their miners are not loyal and will switch to more profitable forks.
During these periods, those chains may have 2+ hr blocktimes for many weeks or 2 minute blocktimes for a couple days. Its inconvenient/convenient, but it hasn't "killed" any of these forks so far.
reply
If half of the miners quit, the blocks would be produced every 20m. That's still fine, the network works, albeit the mempool will start congesting.
If 5/6ths of the miners quit, the blocks will be 1h long. It's becoming a serious usability problem, but the network still works. However, fees will dramatically pick up (assuming demand for blockspace is still there), so it becomes more profitable and some of the miners might plug back in.
This is BTW why you should keep some inbound and outbound liquidity in Lightning, so you're not affected for everyday usage.
If there is a massive capitulation, say 99% of miners are gone for whatever apocalyptic reason (meaning, they will not rejoin for economic incentives), there's always the nuclear option of hard forking a single off-cycle difficulty adjustment.
reply