When totalStaked = 0, lastDistribution will not be updated. This means that when new stakers join, they may receive more points than expected.
When totalStaked equals 0, lastDistribution will not be updated and will directly exit instead. This means that new stakers can claim rewards for the period during which no staking occurred.
For example:
Assume that staking FjordPoints has been deployed in advance, but no stakers have participated yet. After two weeks, staking opens.
After the first staker joins stake and calls distributePoints(), Points are calculated. At this point, totalStaked is already greater than 0, and lastDistribution is the timestamp from two weeks ago. This means that they alone will receive all the Points rewards for the previous two weeks.
After the system has been in a non-staking state for a long time, the first staker can immediately receive all the Points rewards from the previous period.
Manual Review
Update lastDistribution regardless of whether totalStaked is 0 or not.
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.