Question: is the max coin supply limit hard-coded at 21 million coins?
Answer: no; the number 21,000,000 does not appear in the code. But the halving schedule ensures that no more than 21,000,000 coin will be made.
The first blocks (between the years 2009-2012) each added 50 coins to the supply. After 210,000 blocks, that reward was halved to 25 coins.
At 420,000 blocks, that was halved to 12.5 coins.
At 630,000 blocks, that was halved to 6.25 coins.
And so on.
The consensus protocol in BTG (and bitcoin) is hard-coded to halve the reward every 210,000 blocks. The result of this is that there will never be more than 21,000,000 coins.
To see the math and how it adds up, feel free to check out this chart:
Available as a Google Sheet here.
Date (approx) | At Block Number (exact) | Blocks Mined since last halving | Coins per Block (Miner Reward) | Existing Supply (at start) | Coins Created | Annual Inflation next block | Annual Inflation last block |
---|---|---|---|---|---|---|---|
2009 | 0 | 210000 | 50 | 0 | 10500000 | 100.00% | 25.03% |
2012 | 210000 | 210000 | 25 | 10500000 | 5250000 | 12.51% | 8.34% |
2016 | 420000 | 210000 | 12.5 | 15750000 | 2625000 | 4.17% | 3.58% |
2020 | 630000 | 210000 | 6.25 | 18375000 | 1312500 | 1.79% | 1.67% |
2024 | 840000 | 210000 | 3.125 | 19687500 | 656250 | 0.83% | 0.81% |
2028 | 1050000 | 210000 | 1.5625 | 20343750 | 328125 | 0.40% | 0.40% |
2032 | 1260000 | 210000 | 0.78125 | 20671875 | 164062.5 | 0.20% | 0.20% |
2036 | 1470000 | 210000 | 0.390625 | 20835937.5 | 82031.25 | 0.10% | 0.10% |
2040 | 1680000 | 210000 | 0.1953125 | 20917968.75 | 41015.625 | 0.05% | 0.05% |
2044 | 1890000 | 210000 | 0.09765625 | 20958984.38 | 20507.8125 | 0.02% | 0.02% |
2048 | 2100000 | 210000 | 0.04882812 | 20979492.19 | 10253.90625 | 0.01% | 0.01% |
2052 | 2310000 | 210000 | 0.02441406 | 20989746.09 | 5126.953125 | 0.01% | 0.01% |
2056 | 2520000 | 210000 | 0.01220703 | 20994873.05 | 2563.476563 | 0.00% | 0.00% |
2060 | 2730000 | 210000 | 0.00610351 | 20997436.52 | 1281.738281 | 0.00% | 0.00% |
2064 | 2940000 | 210000 | 0.00305175 | 20998718.26 | 640.8691406 | 0.00% | 0.00% |
2068 | 3150000 | 210000 | 0.00152587 | 20999359.13 | 320.4345703 | 0.00% | 0.00% |
2072 | 3360000 | 210000 | 0.00076293 | 20999679.57 | 160.2172852 | 0.00% | 0.00% |
2076 | 3570000 | 210000 | 0.00038146 | 20999839.78 | 80.10864258 | 0.00% | 0.00% |
2080 | 3780000 | 210000 | 0.00019073 | 20999919.89 | 40.05432129 | 0.00% | 0.00% |
2084 | 3990000 | 210000 | 0.00009536 | 20999959.95 | 20.02716064 | 0.00% | 0.00% |
2088 | 4200000 | 210000 | 0.00004768 | 20999979.97 | 10.01358032 | 0.00% | 0.00% |
2092 | 4410000 | 210000 | 0.00002384 | 20999989.99 | 5.006790161 | 0.00% | 0.00% |
2096 | 4620000 | 210000 | 0.00001192 | 20999994.99 | 2.503395081 | 0.00% | 0.00% |
2100 | 4830000 | 210000 | 0.00000596 | 20999997.5 | 1.25169754 | 0.00% | 0.00% |
2104 | 5040000 | 210000 | 0.00000298 | 20999998.75 | 0.6258487701 | 0.00% | 0.00% |
2108 | 5250000 | 210000 | 0.00000149 | 20999999.37 | 0.3129243851 | 0.00% | 0.00% |
2112 | 5460000 | 210000 | 0.00000074 | 20999999.69 | 0.1564621925 | 0.00% | 0.00% |
2116 | 5670000 | 210000 | 0.00000037 | 20999999.84 | 0.07823109627 | 0.00% | 0.00% |
2120 | 5880000 | 210000 | 0.00000018 | 20999999.92 | 0.03911554813 | 0.00% | 0.00% |
2124 | 6090000 | 210000 | 0.00000009 | 20999999.96 | 0.01955777407 | 0.00% | 0.00% |
2128 | 6300000 | 210000 | 0.00000004 | 20999999.98 | 0.009778887033 | 0.00% | 0.00% |
2132 | 6510000 | 210000 | 0.00000002 | 20999999.99 | 0.004889443517 | 0.00% | 0.00% |
2136 | 6720000 | 210000 | 0.00000001 | 21000000 | 0.002444721758 | 0.00% | 0.00% |