Last active
March 3, 2021 14:51
-
-
Save StealthSend/c3c3eb28b9156d78a64b3d293a9a0c2d to your computer and use it in GitHub Desktop.
Calculates Price of StealthNodes on Mainnet
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 python3 | |
K_SCALE = 12000 # scales price of StealthNodes | |
K_INCENTIVE = 64 # tiers the price | |
K_TIER = 21 # 32 - 11 (first tier is 11) | |
INFLATION = 0.01 # fractional inflation rate | |
# price of N+1 (N is number of extant StealthNodes) | |
def get_price(N, supply): | |
blen = (N + K_TIER).bit_length() | |
return ((supply // K_SCALE) * (blen - 1) + (K_INCENTIVE * N)) | |
# example usage | |
# gather prices, money supply, total spent, and apy yield for StealthNode | |
supply = 39000000 | |
total = 0 | |
prices = [] | |
supplies = [] | |
totals = [] | |
apys = [] | |
for i in range(200): | |
price = get_price(i, supply) | |
supply = supply - price | |
supplies.append(supply) | |
prices.append(price) | |
total += price | |
totals.append(total) | |
apys.append((INFLATION) * supply / total) | |
print(total) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment