The claimAndSwap function includes a redundant require statement to validate minimum output (_minOut) after a swap. Since the router contract already enforces a minimum output check, re-validating _minOut after the swap does not provide additional security and results in unnecessary gas consumption.
In the claimAndSwap function, the output of the swap is first validated by the router contract against _minOut. After the swap completes, the following check is performed again:
Since the router call will revert if _minOut is not met, this second check is never expected to fail. Hence, it is redundant and consumes additional gas without improving security.
The main impact of this redundant check is gas inefficiency. Removing it can reduce transaction costs slightly, improving overall protocol efficiency.
Manual Code Review and Foundry
Remove the redundant post-swap slippage check. Instead, rely solely on the router’s _minOut validation. This will streamline the logic and save on unnecessary gas usage.
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.