The addRoute
function allows the management role to add routes without validation.
This opens the door to potential misconfigured or malicious routes being added, which could lead to failed swaps or asset loss during swap operations.
The addRoute
function is responsible for adding swap routes that dictate the path and parameters for token swaps.
However, there is no validation to ensure that the added routes align with the strategy’s expected swap paths, such as starting with the underlying token and ending with the asset token.
The _route
array is added directly without validation, allowing malicious or unintended routes to be configured.
If an invalid route is added, subsequent swaps using that route could fail or result in unintended token transfers.
Add validation checks to ensure the added route aligns with the expected swap paths, specifically:
Ensure the route starts with the underlying token.
Ensure the route ends with the asset token.
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.