TempleGold

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

updateReward(address(0), 0) modifier should be after function visibility.

Summary

TempleGoldStaking.sol: 180

the function distributeRewards() will not work correctly because the modifier is placed in the wrong place `

function distributeRewards() updateReward(address(0), 0) external {
if (distributionStarter != address(0) && msg.sender != distributionStarter)
{ revert CommonEventsAndErrors.InvalidAccess(); }
if (totalSupply == 0) { revert NoStaker(); }

`. Modifiers must be placed after the function visibility keyword and before the function body. This will result in a compilation error.

Vulnerability Details

This will result in a compilation error.

Impact

TGLD rewards will not be distributed to stakers. New rewardRate will not be calculated.

Tools Used

Recommendations

function distributeRewards() external updateReward(address(0), 0) {

Updates

Lead Judging Commences

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

Appeal created

Newt Submitter
about 1 year ago
inallhonesty Lead Judge
about 1 year ago
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.