TempleGold

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

`TempleGoldStaking::migrateWithdraw` should only be callable when contract is paused

Summary

When migrating to a new staking contract, you should only allow transfers to be done when the current one is paused.

Vulnerability Details

With migrateWithdraw lacking the modifier whenPaused, the assigned onlyMigrator can start transferring funds of users even when the current contract is still live.

Impact

This can cause confusion of users to the system, or the executor could forget to pause and a endless loop of people staking still happening and the executor calling migrateWithdraw.

Tools Used

Foundry

Recommendations

Add the whenPaused modifier to migrateWithdraw -

- function migrateWithdraw(address staker, uint256 index) external override onlyMigrator returns (uint256) {
+ function migrateWithdraw(address staker, uint256 index) external override onlyMigrator whenPaused returns (uint256) {
....
}
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.