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

Lack of path validation in the `swapUnderlyingToAsset` function in both StrategyOp.sol and StrategyArb.sol contracts

Summary

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

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

Vulnerability Details

_swapUnderlyingToAsset function does not perform explicit path validation. The _path parameter is accepted as input from the caller and passed directly to the router's swapExactTokensForTokens function without any checks this introduces potential risks because an invalid or malicious _path could result in unexpected outcomes.

Impact

Both contracts may execute swaps at unfavorable routes, resulting in significant financial loss

Tools Used

manual

Recommendations

Validate the Path, ensure that the _path starts with the correct underlying token and ends with the correct asset token

Updates

Lead Judging Commences

inallhonesty Lead Judge
about 1 year ago

Appeal created

inallhonesty Lead Judge 12 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!