The FjordPoints
contract has a vulnerability in the claimPoints function, enabling users to accumulate an unfair amount of points by staking and unstaking within the same epoch. This exploitation becomes feasible once at least one epoch has elapsed since the last point distribution.
In FjordPoints, the distributePoints
function is invoked through the checkDistribution
modifier, which ensures points are only distributed if enough time has elapsed:
The claimPoints function in FjordPoints allows users to claim their pending points:
Here's a scenario that user can accumulate points for the entire epoch despite having tokens staked for just a brief period:
Wait for a period just after an epoch boundary after lastDistribution
.
User stake a specific amount of tokens.
Call point distribution and claim points
Unstake within the same epoch.
Users can earn points disproportionate to their actual staking time, undermining the incentive structure meant to reward long-term stakers. This can result in an unfair distribution of points, potentially devaluing them for honest stakers and leading to centralization of power or economic advantages if points carry governance or utility value.
Manual Review
Call 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.