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

Hardcoded Curve Router Address Without Update Mechanism

Summary

I've identified that StrategyMainnet.sol contains a hardcoded Curve Router address with no update mechanism. This is concerning as Curve has recently migrated to a new router contract, while the contract's hardcoded address has been inactive for approximately 20 days. This architectural decision could impact the strategy's functionality if the old router becomes obsolete or compromised.

The new router can be found here:

https://etherscan.io/address/0x16C6521Dff6baB339122a0FE25a9116693265353

Vulnerability Details

The router initialization occurs in _initStrategy():

https://github.com/Cyfrin/2024-12-alchemix/blob/82798f4891e41959eef866bd1d4cb44fc1e26439/src/StrategyMainnet.sol#L44

Critical concerns:

Impact

The vulnerability presents several risks:

  • Perpetual approval to potentially deprecated contract

  • Strategy functionality could cease if router becomes deprecated

  • Reduced performance from inability to access updated pricing and pools

  • Missing potential optimizations from newer router versions

Tools Used

Manual Review

Recommendations

Add a setRouter function:

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

Appeal created

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

Cannot Set A New Router In `StrategyMainnet.sol`

Support

FAQs

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