Simulation of Signum Network with Random Average Commitment

in Signum Blockchain2 years ago

In SIP-27, the Average Commitment is calculated on a per block win basis from the Block Finders's calculated TiB and their commitment which is stored on the chain, using the following formula

newAverageCommitment = (averageCommitment\*23 + commitment)/24

However, a problem identified by many was the sudden shifts this Average Commitment can have in a short period of time, going from 4,000 per TiB to over 7,000 in a matter of a few blocks. This volatility can affect a miner's profitability.

To find a better method, a model of the network using randomized data was created. These randomized Average Miner Commitment per block was created by using

=NORMINV(rand(),mean,sd)

where mean = 5000 and sd = 2000. Then, the average commitment was calculated in accordance to SIP-27, giving us the following graph

image.png

​As one can see, this graph has a lot of noise and short term fluctuations. By changing the formula to

newAverageCommitment = (averageCommitment\*359 + commitment)/360

we can create a much smoother function

image.png

Though the goal is to use a 360 block average, there may be smaller values that result in an acceptable function as well. For example, below uses a 180 block average

image.png

Finally, we use real world data as supplied by jjos to remove the possibility the noise was caused by random generation.

image.png

Only 720 blocks of data were supplied, so graph is between 360-720

In conclusion, increasing the number of blocks used for the average above 24 will help stabilize the average commitment, allowing miners to better predict their short term earnings.