Skip to content

Instantly share code, notes, and snippets.

@StealthSend
Last active March 3, 2021 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save StealthSend/c3c3eb28b9156d78a64b3d293a9a0c2d to your computer and use it in GitHub Desktop.
Save StealthSend/c3c3eb28b9156d78a64b3d293a9a0c2d to your computer and use it in GitHub Desktop.
Calculates Price of StealthNodes on Mainnet
#/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