Created
July 6, 2022 02:19
-
-
Save jesperkristensen58/be1ba1c1142d2beb6bef8f6cd89b774c to your computer and use it in GitHub Desktop.
A script for calculating how much total bitcoin will be issued
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original block reward for miners was 50 BTC | |
start_block_reward = 50 | |
# 210000 is around every 4 years with a 10 minute block interval | |
reward_interval = 210000 | |
def max_money(): | |
# 50 BTC = 50 0000 0000 Satoshis | |
current_reward = 50 * 10**8 | |
total = 0 | |
while current_reward > 0: | |
total += reward_interval * current_reward | |
current_reward /= 2 | |
return total | |
print("Total BTC to ever be created:", max_money(), "Satoshis") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment