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

Unsafe Router Migration in StrategyOp Leaves Tokens Vulnerable to Being Stuck

Summary :

looking at StrategyOp.sol, the setRouter function doesn't handle old approvals when changing routers:

Vulnerability Details :

The setRouter function in StrategyOp.sol allows changing the DEX router without revoking previous approvals or recovering potentially stuck tokens, creating a risk of permanent token loss during router migrations.

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

The vulnerability stems from incomplete router migration handling in StrategyOp.sol. When management changes the router address, the function fails to revoke existing approvals from the previous router, maintains no verification of potentially stuck tokens in the old router contract, and lacks any built-in mechanism to recover those tokens. This creates a compound security risk where multiple routers retain spending permissions while tokens could become permanently locked in deprecated router contracts.

Impact :

  • Tokens stuck in old router become unrecoverable

Tools Used :

Manuel review.

Recommendations :

  1. Implement approval revocation for old router.

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.