Closed code423n4 closed 2 years ago
https://github.com/Badger-Finance/vested-aura/blob/d504684e4f9b56660a9e6c6dfb839dcebac3c174/contracts/MyStrategy.sol#L391
performUpkeep is not protected by whenNotPaused modifier unlike manualProcessExpiredLocks, which basically do the same thing.
whenNotPaused
manualProcessExpiredLocks
function performUpkeep(bytes calldata performData) external { // Works like this because it reverts if lock is not expired LOCKER.processExpiredLocks(false); }
Add whenNotPaused modifier to performUpkeep
performUpkeep
Don't believe there's any security vulnerability here, code inconsistency (QA) is totally valid though
Lines of code
https://github.com/Badger-Finance/vested-aura/blob/d504684e4f9b56660a9e6c6dfb839dcebac3c174/contracts/MyStrategy.sol#L391
Vulnerability details
Impact
performUpkeep is not protected by
whenNotPaused
modifier unlikemanualProcessExpiredLocks
, which basically do the same thing.Proof of Concept
https://github.com/Badger-Finance/vested-aura/blob/d504684e4f9b56660a9e6c6dfb839dcebac3c174/contracts/MyStrategy.sol#L391
Recommended Mitigation Steps
Add
whenNotPaused
modifier toperformUpkeep