Kimoto Gravity Well

This algorithm is used in various altcoins to regulate difficulty. This method was first introduced in Megacoin and used to adjust the difficulty of the network every block adaptively. The logic of the algorithm is shown as follows:

KGW = 1 + (0.7084 * pow((double(PastBlocksMass)/double(144)), -1.228))

The algorithm runs in a loop that goes through a set of predetermined blocks (PastBlockMass) and calculates a new readjustment value. The core idea behind this algorithm is to develop an adaptive difficulty regulation mechanism that can readjust the difficulty in response to rapid spikes in hash rates. Kimoto Gravity Well (KGW) ensures that the time between blocks remains approximately the same. In Bitcoin, the difficulty ...

Get Mastering Blockchain - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.