DeFiFoundrySolidity
16,653 OP
View results
Submission Details
Severity: high
Invalid

Use of infinite approvals in 'StrategyOp.sol'

Summary

The contract uses infinite approvals (type(uint256).max) for the underlying token when interacting with external protocols like the router and the transmuter.

While convenient, this approach increases the risk of token theft if an approved contract is compromised.

Vulnerability Details

In several parts of the contract, infinite token approvals are granted using the safeApprove method.

For example:

function _initStrategy() internal {
router = 0xa062aE8A9c5e11aaA026fc2670B0D65cCc8B2858;
underlying.safeApprove(address(router), type(uint256).max);
}

Impact

A compromised or malicious router/transmuter can drain the full token balance of the contract.

Recommendations

Approve only the specific amount required for each operation rather than granting unlimited approvals

Updates

Appeal created

inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Design choice
inallhonesty Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

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