Author

Topic: Find out max supply just from github source code (Read 196 times)

full member
Activity: 240
Merit: 100
https://github.com/Infernoman/C-Bit/blob/73bc5652564d344af6847eefde6d386225d4ad02/src/chainparams.cpp#L73
Halving interval = each 210.000 blocks

https://github.com/Infernoman/C-Bit/blob/73bc5652564d344af6847eefde6d386225d4ad02/src/chainparams.cpp#L81
Average time between 2 blocks = 60* 10 seconds (10 minutes)

https://github.com/Infernoman/C-Bit/blob/73bc5652564d344af6847eefde6d386225d4ad02/src/main.cpp#L1729
subsidy = 500 coins

The rest should be simple math... You start with a block reward of 500, the average time between blocks should be ~10 minutes and the block reward halves every 210.000 blocks.

Hint: bitcoin has a max supply of 21.000.000 BTC (slightly less), and started with a block reward of 50 BTC Wink It also halves every 210.000 blocks and has an average time between blocks of 10 minutes

Last but least, this line is also interesting:
https://github.com/Infernoman/C-Bit/blob/73bc5652564d344af6847eefde6d386225d4ad02/src/main.cpp#L1726
It tells you how many halvings before the subsidy will return 0 (even if the subsidy is > 0 at that time) Smiley

Thank you, I calculated the answer  Smiley
legendary
Activity: 3388
Merit: 4919
https://merel.mobi => buy facemasks with BTC/LTC
https://github.com/Infernoman/C-Bit/blob/73bc5652564d344af6847eefde6d386225d4ad02/src/chainparams.cpp#L73
Halving interval = each 210.000 blocks

https://github.com/Infernoman/C-Bit/blob/73bc5652564d344af6847eefde6d386225d4ad02/src/chainparams.cpp#L81
Average time between 2 blocks = 60* 10 seconds (10 minutes)

https://github.com/Infernoman/C-Bit/blob/73bc5652564d344af6847eefde6d386225d4ad02/src/main.cpp#L1729
subsidy = 500 coins

The rest should be simple math... You start with a block reward of 500, the average time between blocks should be ~10 minutes and the block reward halves every 210.000 blocks.

Hint: bitcoin has a max supply of 21.000.000 BTC (slightly less), and started with a block reward of 50 BTC Wink It also halves every 210.000 blocks and has an average time between blocks of 10 minutes

Last but least, this line is also interesting:
https://github.com/Infernoman/C-Bit/blob/73bc5652564d344af6847eefde6d386225d4ad02/src/main.cpp#L1726
It tells you how many halvings before the subsidy will return 0 (even if the subsidy is > 0 at that time) Smiley
full member
Activity: 240
Merit: 100
Hi, is there a way how I can find out the max supply of on altcoin (SHA256) just from searching in the source code?

https://github.com/Infernoman/C-Bit

Thanks in advance
Jump to: