TempleGold

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

Lack of function to collect rewards from multiple stakings

Summary

Currently, if an user wants to claim his reward in TempleGoldStaking, he could only call getReward to get rewards for an certain index. To claim rewards from multiple stakings, he has to call the function multiple times. This increases costs for users and discourage them from staking multiple times.

Vulnerability Details

In TempleGoldStaking, if an user wants to claim his reward, he could only call getReward to get rewards for an certain index.

function getReward(address staker, uint256 index) external override updateReward(staker, index) {
@=> _getReward(staker, staker, index);
}

To claim rewards from multiple stakings, he has to call the function multiple times since currently there is no function allowing him to collect rewards from multiple staking in 1 function call. This increases costs for users and discourage them from staking multiple times.

Impact

Lack of such function disallows claiming reward for multiple stakings and thus discouraging users from staking and claiming.

Tools Used

Manual

Recommendations

Add a function getReward(address staker, uint[] indexes) to enable claiming rewards for multiple stakings.

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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