The claimAndSwap function in the StrategyMainnet contract lacks validation for the _routeNumber parameter, potentially allowing access to uninitialized storage slots when attempting to execute swaps through Curve.
Details In the claimAndSwap function, the contract attempts to access route data using an unchecked index:
While the function is protected by onlyKeepers, there's no validation that \_routeNumber is less than nRoutes, which could lead to accessing uninitialized storage slots.
Could cause transaction reverts in unexpected ways
Makes the code rely on external contract behavior for validation
Poor error reporting for keepers when using invalid routes
Manual code review, Foundry
Add explicit validation at the start of the function:
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.