Sunday, October 15, 2017

Smoothing coin release rate for bitcoin


If a coin wants to implement a continuous reward adjustment to give the same number of coins released as the same rate as bitcoin use:

C/block = 69.3*(0.5)^(-height/210,000)

But to implement it in an an existing coin, it takes a little more work to find a solution:

The halving events in BTC seem absurb in being such a powerful step function. Due to rounding error and trying to keep the same quantity of satoshis emitted every 4 years, it takes some effort to find a formula that exactly ends in 1/2 as many coins per block after 4 years (210,000 blocks) and gives the exact same number of Satoshis in those 4 years. Here's what I came up with.

Once every 4 hours, starting half-way into a halving event, set coins awarded to

BTC=C*int(1E8*A*B^(N/8750))/1E8

where

C = number of coins supposed to be emitted in this halving event.
A = 1.072026880076
B = 0.46636556
N = blocks after the 1/2-way point, up to 8750 when N goes back to 1 and C is cut in half.

8750 is 4 years' worth of 4-hour periods. I didn't like 5, 7, or 10 hours because it is not a multiple of a day. 2 hours would have been harder to check in excel, having 2*8750 adjustment per halving. Other options were not an integer number of blocks. I guess 8 hours is an option.

I guess it could be improved to not have to reset C and N every 4 years.

I believe there is a starting point that is better in the sense that it results in a simpler equation that is good for all time, like ln(2) = 0.693 into a halving event or maybe 1/e into it or 1/e before the end.


No comments:

Post a Comment