DeFiFoundrySolidity
16,653 OP
View results
Submission Details
Severity: low
Valid

Failure to revive previous router in `StrategyOp` and `StrategyArb` due to `safeApprove` mechanism

Title

Failure to revive previous router in StrategyOp and StrategyArb due to safeApprove mechanism

Summary

StrategyOp and StrategyArb contracts use safeApprove function to give allowance the new router. However, in case the router was previously given allowance, safeApprove will revert ultimately leads to failure of setRouter function.

Vulnerability Details

Here's the implementation of setRouter function in StrategyOp contract:

function setRouter(address _router) external onlyManagement {
router = _router;
>> underlying.safeApprove(router, type(uint256).max);
}

This issue arises from the behavior of the safeApprove function, which prevents approval actions on addresses with a non-zero allowance value.

Impact

Due to this bug, the protocol cannot set the intended router address, potentially disrupting strategy operations for a certain amount of time.

Tools Used

Manual Review

Recommendations

Reset the allowance of the previous router before updating to a new one to efficiently prevent this blocking issue.

Updates

Appeal created

inallhonesty Lead Judge 8 months ago
Submission Judgement Published
Validated
Assigned finding tags:

Old router approval is not revoked after an update

Support

FAQs

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