zawy12 / difficulty-algorithms

See the Issues for difficulty algorithms
MIT License
107 stars 25 forks source link

Smooth Coin-Emission Formula #57

Open zawy12 opened 4 years ago

zawy12 commented 4 years ago

Besides BTC's awful difficulty algorithm, it's baffling that Satoshi did not do a smooth coin emission rate like the following. See discussion below for why this has probably been a little bit of a disaster for BTC.

h = height
T = target solvetime
HalfLife = HL = 4*365*24*3600; // 4-yr half life in seconds
TotalCoins = TC = 21E6; 
// Replace T/HL with half life in blocks if you want.
RewardPerBlock = T*TC*ln(2)/HL*0.5^(h*T/HL)

ln(2)=0.693 which can be done with integer math by scaling. The 0.5 power factor can replaced by a bit shift. It can be shown by integration from 0 to infinite blocks that TC are emitted, except for the round off error which can be largely fixed by a +0.5 when the math is converted to the appropriate integer-based code.

image

Discussion Satoshi's step-function emission formula has possibly been a minor disaster for equipment manufacturers trying to plan the investments that gives BTC all its security. More importantly, it appears to have been a huge contributing factor to at least two huge post-halving price peaks due to it taking months for the mining and exchange markets to figure out the new supply/demand ratio due to the reduced market capitalization to new-coin ratio (aka stock-to-flow). This is more clearly a disaster for a world (and hodlers) looking for a consistently-rising measure of value. The meteoric rises have been a marketing benefit like infamy: there's good and bad to it, more than erased by the subsequent decline. Decent people avoid MLM and Ponzi schemes which they may identify as suddenly rising in value without any apparent change in the underlying story. The subsequent declines harden their wise sentiment to BTC's detriment.