TempleGold

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

Anyone can claim on behalf of others in `TempleGoldStaking`

Summary

In TempleGoldStaking, there's no access control on the function getReward, anyone can call getReward on behalf of others even if the staker is not will to do so.

Vulnerability Details

In TempleGoldStaking, there's no access control on the function getReward.

/**
* @notice Get rewards
* @param staker Staking account
* @param index Index
*/
function getReward(address staker, uint256 index) external override updateReward(staker, index) {
_getReward(staker, staker, index);
}

As a result, anyone can call getReward on behalf of others even if the staker is not will to do so.

Impact

This may violate the staker's own intention and thus cause bad user experience.

Tools Used

Manual

Recommendations

Add a check require(staker==msg.sender);

Updates

Lead Judging Commences

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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