Submitted by gpersoon, also found by hickuphh3, xYrYuYx, and jonah1005
The function depositRewardTokens divides the amount of tokens by allocatedTokensPerEpoch to calculate the endEpoch.
When amount isnt a multiple of allocatedTokensPerEpoch the result of the division will be rounded down,
effectively losing a number of tokens for the rewards.
For example if allocatedTokensPerEpoch is set to 3e18 and amount is 100e18 then endEpoch will be increased with 33e18 and the last 1e18 tokens are lost.
A similar problem occurs here:
In depositRewardTokens() add, in the beginning of function, before the if statement:
In takeOutRewardTokens() add:
Update setAllocatedTokensPerEpoch() to something like:
kitti-katy (Covalent) confirmed:
GalloDaSballo (judge) commented:
