When a user stakes with 1 wei, it causes the total points per epoch for other users to decrease. However, the user staking 1 wei does not receive any points themselves due to the calculation method, which results in their claimable points always being zero. This leads to a consistent reduction in claimable points for all other users in the epochs and pointsPerEpoch not being accurate among users.
The vulnerability arises when users stake extremely small amounts of tokens, such as 1 wei, in the staking process. In such cases, the protocol calculates points based on the proportion of tokens staked relative to the total staked amount. However, due to the very small stake amount, the calculation effectively rounds down to zero, resulting in no points being awarded to the user with the 1 wei stake.
Despite not receiving any points themselves, the 1 wei stake impacts the overall distribution of points across all stakers. The presence of these minimal stakes causes the pointsPerEpoch—total points distributed per epoch—to be slightly reduced for all users. This happens because the protocol allocates a portion of points to the 1 wei stake in the Points program, but due to rounding errors or the precision limitations in the calculation, these points are effectively lost.
Copy the Poc and paste it inside the test/unit/points.t.sol
The PoC is checking rewards for 5 epochs
Output
The primary impact of this vulnerability is that it reduces the rewards for users who stake significant amounts of tokens. When users stake extremely small amounts, such as 1 wei, they decrease the total pointsPerEpoch distributed to all stakers
Users who stake amounts as small as 1 wei do not receive any points because their stake is too insignificant to contribute meaningfully to the pool. The calculation effectively rounds down to zero, meaning these small stakers earn no points which means not all the points from pointsPerEpoch gets distributed.
Manual Review
Restrict users that won't be able to earn points due to their small wei stake by not including them into the points process (onStake), they can keep staking until they have a totalstake that can earn points and those points that would not be sent on small wei stakers will be put to use, if not it will disrupt the experience of users with larger amounts.
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.