Validate _points value to ensure stakers can get rewards when the owner calls setPointsPerEpoch.
1) Calculating the added new pointsPerToken for the past epochs(one epoch or many epochs) in FjordPoints contract, the formula involved weeksPending * (pointsPerEpoch.mul(PRECISION_18).div(totalStaked)
. Normally, the pointsPerEpoch.mul(PRECISION_18)
is so much greater than totalStaked
when pointsPerEpoch
= 100 ether.
2) However, any positive number can be set when calling setPointsPerEpoch, such as make points = 1000; when the total stake is less than 1000*1e18, the newly added pointsPerToken will be equal to zero.
3) Normally, the input points will be at least greater than one ether when the owner calls this function. It's better to make the points bigger than one value to avoid unnecessary ignorance.
Stakers can't get expected rewards when the owner inputs the little points comparing the user's total staked.
Manual
Add _points validation to guarantee that the user can get rewards.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.