Skip to content

Instantly share code, notes, and snippets.

@moocowmoo
Created April 29, 2016 06:19
Show Gist options
  • Save moocowmoo/d0d1ef1c17e8f40e3b68a827ccbe205c to your computer and use it in GitHub Desktop.
Save moocowmoo/d0d1ef1c17e8f40e3b68a827ccbe205c to your computer and use it in GitHub Desktop.
#!/usr/bin/env python2
now_height=460854
now_outstanding=6406809
def min_blok_subsidy(nHeight):
nSubsidy = float(5) # assume minimum subsidy
for i in range(210240, nHeight, 210240):
nSubsidy -= nSubsidy/14
return nSubsidy
year = 2016
total = now_outstanding
for block in range(now_height, now_height+(210240*100), 210240):
year += 1
total += (min_blok_subsidy(block) * 210240) # assume full budget payout
if year % 20 == 0:
print "{} {:9d}".format(year, int(total))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment