Bitcoin Cash's new difficulty algorithm



Summary:

Bitcoin cash will implement a new difficulty algorithm with their hard fork on November 13th. Bitcoin may need to hard fork and use a similar algorithm, as the current DA is slow and only sufficient if the coin has the highest hashpower. If SegWit2x manages to be more comparable in price than BCH, hashpower could very well oscillate back and forth between the two coins, causing delays in both of them. The first one to hard fork to fix the difficulty problem will have a large advantage, as evidenced by what happens in alts. BTC developers are recommended to watch what happens as BCH goes live with a much better algorithm, in case BTC needs to hard fork for the same reason and needs a similar fix. The current averaging window for Bitcoin's difficulty algorithm is probably significantly too long (N=144). It uses the following formula: next_D = sum (past 144 D's) * T / sum(past 144 solvetimes). Bitcoin cash's new algorithm uses a nice median of 3 for the beginning and end of the window to help alleviate bad timestamp problems. They also have 2x and 1/2 limits on the adjustment per block, which is a lot more than they will ever need. One of the contenders to the current algorithm is Degnr8's D622 difficulty algorithm, which gives a linearly higher weight to the more recent timestamps. It is recommended that Bitcoin consider using Bitcoin Cash's new algorithm and making it N=50 instead of 144. Any attempts to modify the current algorithm with things like a low pass filter, starting the window at MTP, or preventing negative timestamps will only reduce its effectiveness. The +12 and -6 limits on the timestamps are sufficient and well chosen, although something a bit smaller than the +12 might have been better.


Updated on: 2023-06-12T22:00:16.883306+00:00