Created
April 13, 2020 14:08
-
-
Save cbarraford/b570aa52ef387e10d56349225a5d9846 to your computer and use it in GitHub Desktop.
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
#!/usr/bin/env python | |
# add rune per block | |
add_rune = 100000000 | |
blocks_per_year = 6311390 | |
blocks_per_day = 17280 | |
total_nodes = 100 | |
for emission_curve in range(1, 11): | |
reserve = 22000000000000000 | |
count = 0 | |
last_total_rewards = 0 | |
node_rewards = 0 | |
while True: | |
reserve += add_rune | |
total_rewards = reserve / emission_curve / blocks_per_year | |
if total_rewards / total_nodes == 0: # not enough rewards to pay evenly amongst our nodes | |
break | |
reserve -= total_rewards | |
if last_total_rewards == total_rewards: | |
node_rewards = total_rewards / total_nodes | |
break | |
last_total_rewards = total_rewards | |
if count % 10000000 == 0: | |
pass # print("Remaining Reserve:", reserve) | |
count += 1 | |
print "Emission Curve:", emission_curve | |
print "Blocks:", count | |
print "Years:", float(count) / blocks_per_year | |
print "Node Rewards:", node_rewards / 100000000 | |
print "Total Reserve:", reserve / 100000000 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment