In the setRouter function, directly setting a new router and approving the underlying token is risky. It is recommended to first set the approval amount of the previous router to 0 before changing the router address. This precaution helps prevent potential approval-related attacks by ensuring that no residual allowance is left for the old router, which might be exploited.
Impact
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.