No validation exists to block swapping from a token to itself.
Calling swap with from_token == to_token
causes unnecessary logic execution and potential event/log confusion.
Likelihood:
Easy to exploit with simple UI interaction or script
Common pattern where validation is forgotten
Impact:
Wastes gas, pollutes logs and events
May lead to unexpected balances due to rounding
No-op swap goes through, produces misleading outcome
Add check and then Reject same-token swaps upfront.
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.