Browse Source

Add data about hush total supply bug and how it will be fixed on our new KMD chain

master
Jonathan "Duke" Leto 5 years ago
parent
commit
68dfa18001
  1. 40
      whitepaper/v3/hush-v3.tex

40
whitepaper/v3/hush-v3.tex

@ -465,6 +465,46 @@ electronic commerce and payment, financial privacy, proof of work, zero knowledg
\nsection{Introduction}
\nsection{Hush v1-v2 Total Supply Bug}
The original Hush devs added the original pre-mine in such a way that Hush would have a supply greater than the intended 21,000,000 after about 30 years. This fact was discovered in the process of emulating the current Hush supply curve (halving interval) on our new Komodo-based chain. This bug will be corrected on our new chain (Hush v3) by ceasing block rewards when total supply hits 21M coins, as intended.
As a reminder, NONE of the current Hush team received any the original 0.76% (160,000 HUSH) pre-mine. All of the original Hush developers who received the reward have long since left the project.
Details
Small excerpt from ~ 1.2 GB of data (180MB of data until 21M supply, 1.1GB of data until block reward goes to 0) generated by https://github.com/MyHush/hush3/blob/duke/contrib/hush\_supply :
# block, totaly supply, block reward, halvings
5922238,20999999.9023438,0.09765625,7
5922239,21000000,0.09765625,7
5922240,21000000.0976562,0.09765625,7
26039998,21159937.4895,1.16415321826935e-08,30
26039999,21159937.4895,1.16415321826935e-08,30
26040000,21159937.4895,5.82076609134674e-09,31
Please contact me for this raw data if you have any trouble generating it yourself.
Background
The current Hush chain (version 2) will attain a supply of 21,000,000 coins at Block 5922239 which will have a Block Reward of 0.09765625 HUSH. This happens between the 7th and 8th halvings.
But because the original devs of Hush added a pre-mine of 160,000 HUSH in blocks 1 through 4, the current Hush supply curve will continue past the 21M supply mark until Block 26039999 when supply is 21159937.4895 HUSH and the last block reward of 1 satoshi is awarded just before the 31st halving.
The core issue is that blocks 1 through 4 had a block reward of 40,000 each instead of 12.5 each in the GetBlockSubsidy() function defined in main.cpp, but the overall emission schedule was not modified to take this into account.
This mistake would eventually lead to an extra 159,937.4895 HUSH of total supply beyond the intended totaly supply of 21M, which would happen after about 30 years, between the 7th and 8th halvings.
The Fix
This bug in the supply curve of Hush will be fixed during the migration to a Komodo asset chain, where we can use ac_end=N to specify a block when block rewards should cease. This will allow us to enforce the intended 21M total supply of Hush.
To calculate the value of ac\_end for the new Hush chain:
ac\_end = 5922239 - (number of blocks in old Hush chain) - (zero block reward transition period)
ac\_end = 5922239 - 500000 - 128
ac\_end = 5422111
To clarify, Hush will have a consensus rule that block rewards stop at block 5422111 which will enforce a total supply of 21M coins.
\nsection{Special Thanks}
Special thanks to jl777 and the greater Komodo community for inspiring a new

Loading…
Cancel
Save