Advertisement
Guest User

Calculate ICX Inflation

a guest
Dec 1st, 2019
531
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.95 KB | None | 0 0
  1. def calculate_yearly_prep_rewards(irep):
  2.     b1 = (irep * 0.5) * 22 * (1 / 1296000)
  3.     b2 = (irep * 0.5) * 100 * (1 / 1296000)
  4.     return (b1 + b2) * 43120 * 365
  5.  
  6. def calculate_yearly_staking_rewards(rrep, delegated_supply):
  7.     b3 = (rrep * delegated_supply) * (1 / 15552000)
  8.     return b3 * 43120 * 365
  9.  
  10. print(f"P-Rep Rewards (50,000 I-Rep): {calculate_yearly_prep_rewards(50000)} ICX")
  11. print(f"P-Rep Rewards (40,000 I-Rep): {calculate_yearly_prep_rewards(40000)} ICX")
  12. print(f"ICONist Staking Rewards: {calculate_yearly_staking_rewards(0.1926, 189022412)} ICX")
  13.  
  14. irep_50k_issuance = calculate_yearly_prep_rewards(50000) + calculate_yearly_staking_rewards(0.1926, 189022412)
  15. irep_40k_issuance = calculate_yearly_prep_rewards(40000) + calculate_yearly_staking_rewards(0.1926, 189022412)
  16.  
  17. print(f"Yearly Inflation (50,000 I-Rep): {round(irep_50k_issuance / 806127870 * 100, 2)}%")
  18. print(f"Yearly Inflation (40,000 I-Rep): {round(irep_40k_issuance / 806127870 * 100, 2)}%")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement