The distributePoints
function is responsible for updating the global pointsPerToken
variable, which reflects the total amount of points distributed per staked token. This function ensures that the points distribution is updated according to the time elapsed and the total staked amount.
In the contract, the claimPoints
function triggers the updatePendingPoints
modifier to calculate the pending points for the user based on the current pointsPerToken
. The modifier calculates the additional points earned since the user’s last recorded pointsPerToken
:
If distributePoints
hasn’t updated pointsPerToken
, the modifier calculates the pending points using an outdated pointsPerToken
.
This means the pending points might not include the most recent distributions, leading to users potentially claiming fewer points than they should.
If distributePoints
has not been executed recently, the pointsPerToken
used in the updatePendingPoints
modifier may be outdated. This can lead to users claiming fewer points than they are actually owed, as the latest distribution adjustments have not been applied to their pending points.
Manual
Enforce a call to distributePoints
before users claim points.
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.