How to calculate rewards
Reward calculation
Currently rewards are calculated this way:
- Fetch
iglobal
by callinggetNetworkInfo
method of chain contract (cx00..00
) divide by 10**18 (to convert from units in loop) - Fetch
iprep
by callinggetNetworkInfo
method of chain contract (cx00..00
) - Fetch
totalPower
by callinggetNetworkInfo
method of chain contract (cx00..00
) Fetch prep power (power) by callinggetPRep
method chain contract (cx00..00
) - Fetch
commissionRate
by callinggetPRep
method chain contract (cx00..00
) divide by 10000
Reward dilution for voters due to bond mechanism
If the validator has bonded more than 5% of their voted amount (delegated amount + bonded), as new voters add delegation to the prep the prepPower variable will increase which means the validator and voters will receive more rewards.
If the bond is equal or less than 5% any increase in delegation (new voters delegating more to the validator) will only dilute the rewards of all the voters because the prepPower will not increase.
If prepPower doesnt increase then voters monthly reward gets divided by a bigger amount of delegated (voters)