You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The calculation for paying out a reward currently "rounds down" as a result of integer division. This result is then amplified by the number of blocks used to calculate how much should be paid over time, effectively dampening the payout rate.
As an extreme example, if payable_per_block were calculated as 2/3 (e.g. info.total_reward - first_paid == 2 and T::VestingPeriod::get() == 3), the result would be 0 (because floor(2/3) == 0). In this extreme case, no rewards would ever be paid out (as a result of lines 439/440).
The above is the case when (info.total_reward - first_paid) < T::VestingPeriod::get().
In less extreme examples (such as 11/10) the results would be that the payout rate is reduced, although the user would eventually be able to claim the entire balance (e.g. line 444).
The text was updated successfully, but these errors were encountered:
The calculation for paying out a reward currently "rounds down" as a result of integer division. This result is then amplified by the number of blocks used to calculate how much should be paid over time, effectively dampening the payout rate.
The relevant code starts here.
As an extreme example, if
payable_per_block
were calculated as2/3
(e.g.info.total_reward - first_paid == 2
andT::VestingPeriod::get() == 3
), the result would be 0 (becausefloor(2/3) == 0
). In this extreme case, no rewards would ever be paid out (as a result of lines 439/440).The above is the case when
(info.total_reward - first_paid) < T::VestingPeriod::get()
.In less extreme examples (such as
11/10
) the results would be that the payout rate is reduced, although the user would eventually be able to claim the entire balance (e.g. line 444).The text was updated successfully, but these errors were encountered: