Thursday, August 24, 2017

BitcoinCash difficulty algorithm problems

BitcoinCash allows a drop in difficulty down to 1/4 if the last 5 blocks took > 12 hours. But the rise in difficulty takes 2016 blocks (two weeks if the difficulty matches hashrate) like bitcoin. They did this so that difficulty could drop quickly after the fork. But this asymmetry (long time to adjust up, but short time to adjust down) is causing unexpected feedback that will cause oscillations that could cause too many coins to be issued and the price go towards zero until there is a fork to fix it.

This is how it starts and why it gets worse: Assume price is stable and difficulty matches hashrate correctly. If for some reason price relative to bitcoin falls at the end of a set of 2016 blocks, some will jump ship but next difficulty adjustment will still be too high because it is a long averaging window. A short rolling averaging window would not have caused a problem (and does not even need the attempted BCH "fix" to get difficulty lower). But as it is, difficulty will be too high for the next block, so miners are still discouraged from mining. The slower issuance of coins may actually support price, but maybe he longer solve times, seen as a problem, can cause an even more negative effect on price. If price falls a little more due to this, the threshold of mining profitability may be passed, so a flood of miners could exit, causing really long solvetimes. This can cause the price to drop even further due to not being able to get transactions to go through. So REALLY long solvetime could occur. As soon as the 5 blocks take more than 12 hours, difficulty in the next 2016 set (only the 3rd in this sequence) will go to 1/4. remember difficulty in the 2nd block had actually dropped a little, so the 1/4 is not fixing an accidental 4x increase in difficulty. Suddenly, it is really profitable to mine, unless the price also dropped to 1/4. Let's say it had dropped to 1/2 or less. So the blocks will come at a fast rate. But as soon as that 2016 set ends, difficulty will be massive in the 4th set of 2016 blocks, and the price may be even lower due to people seeing the problem and due to too many coins being mined too quickly and sold. No longer have long solvetimes is "fixed" for that set, but it is only replace by the opposite problem. The 4th set will have very high difficulty and last maybe only 5 blocks as it will take too long to solve, then the 6th block will get the difficulty down to 1/4. If there was more than 4x increase in hashrate due to miners jumping on, then 1/4 downward change may not be a lower difficulty than it was in the 3rd set of 2016. The price should also be worse. These two effects may reduce the oscillation. But notice it depends on a huge number suddenly jumping on AND a worse price, and this is the best case scenario for reducing the size of the oscillations. The alternative of larger oscillations will also have a negative effect on price. So it's an unavoidable downward pressure on price. I saw a buy/sell opportunity in BCH and made good on it. This is actually looking like an impending buying opportunity, right before a fork that fixes it.

A huge part of this is that BCH miners can go back and forth to BTC. But notice large BTC miners have no place to go if there was a similar problem in BTC. It's kind of another reason 1 big coin naturally results.


edit:

Summary
Causes:
1) Asymmetrical math in how difficulty rises verses falls.
2) There is a threshold to mining profitability, so that only a minor fall in price can cause many miners to jump ship
3) Miners can switch back to BTC while waiting for the difficulty to fall which magnifies the problem caused by 2).
3) 1 and 2 may not have been a problem if it was a short rolling average window to determine the difficulty instead of being like BTC and suddenly changing every 2016 blocks.
4) This problem erodes price from reducing the quality of the coin by have 2 hour solvetimes if not issuing too many coins too quickly.

No comments:

Post a Comment