TempleGold

TempleDAO
Foundry
25,000 USDC
View results
Submission Details
Severity: medium
Invalid

No incentive to claim dust reward

Summary

In TempleGoldStaking, when the totalSupply becomes large, the reward per token will get down. Users will have less incentive to claim dust reward, leaving the dust reward amount stuck in the staking contract. Especially when the user's reward needs to be claimed by each index, causing unnecessary gas consumptions and costs.

Vulnerability Details

In _rewardPerToken, the result is calculated based on totalSupply:

return
rewardData.rewardPerTokenStored +
(((_lastTimeRewardApplicable(rewardData.periodFinish) -
rewardData.lastUpdateTime) *
rewardData.rewardRate * 1e18)
/ totalSupply);

If the totalSupply is large, the reward per token will get down.

Thus, users with small stakes will have less incentive to claim dust reward, leaving the dust reward amount stuck in the staking contract forever. Especially when the user's reward needs to be claimed by each index, causing unnecessary gas consumptions and costs.

Impact

Small dust reward will never be claimed by users. And users are discouraged from getting their reward.

Tools Used

Manual

Recommendations

It is recommended to revise the design of staking using multiple indexes.

Updates

Lead Judging Commences

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.