joystream
joystream copied to clipboard
Patronage interest rate calculation
Current patronage computation
patronage_amount = issuance * patronage_rate * blocks_per_year
Desired patronage calculation
patronage_amount = issuance * ( 1 + patronage_rate)^blocks_per_year - issuance
- isnt the patronage rate annual? not per block?
- why is
issuance
being subtracted?
- isnt the patronage rate annual? not per block?
blocks
meant number of blocks in a year (I have renamed it now). The user gets to specified the annual rate, but we store it as per block rate to have easier computations (which is similar to what the pallet vesting is doing)
- why is
issuance
being subtracted?
To obtain the net amount that will be granted to the creator account:
If I put 10 $ into a risk free bond with 3% interest rate in 10 years the amount will be 10 * (1 + 3%)^10
the net gain 10 * (1 + 3%)^10 - 10
ok, makes sense.
Remember to update benchmark if extra computation is required