Last active
December 16, 2015 18:48
-
-
Save abromberg/5479950 to your computer and use it in GitHub Desktop.
Function to determine theoretical number of Bitcoin in existence as a function of the number of days since January 3, 2009, when Bitcoin mining began.
This file contains 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
from math import floor | |
def B(t): | |
max = 21*(10**6) # hard cap on number of BTC | |
C = 7200 # initial number of BTC produced per day | |
T = 4*365 # number of days in 4 years | |
B = sum(C / 2**int(floor(i/T)) for i in range(0, t)) | |
return min(B, max) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment