Difficulty adjustment and retargeting algorithms
The concept of difficulty retargeting algorithms has been introduced with the advent of Bitcoin and associated consensus mechanisms. In Bitcoin, a difficulty target is calculated simply by the following equation; other coins have either developed their own algorithms or implemented a modified version of the Bitcoin difficulty algorithm:
T = Time previous * time actual / 2016 * 10 min
The core idea behind difficulty regulation in Bitcoin is that a generation of 2016 blocks should take roughly around 2 weeks (inter-block time should be around 10 minutes). If it takes longer than 2 weeks to mine 2016 blocks, then the difficulty is decreased, and if it takes less than 2 weeks to mine 2016 blocks, then the difficulty is increased. When ASICs were introduced due to a high block generation rate, the difficulty increased exponentially, and that is one drawback of PoW algorithms that are not ASIC resistant. This leads to mining...