When setting params
in L2TokenReceiver, the tokenIn
and tokenOut
can be the same.
There is no limitation to avoid the tokenIn
and tokenOut
in params from being the same,
if tokenIn
is equal to tokenOut
, several problems might arise:
Operations like swap
and increaseLiquidityCurrentRange
may be blocked since token 0 and token 1 would be identical.
Compatibility issues with certain tokens may occur during params updates through _editParams, such as with USDT:
Because USDT requires allowance to be zero before the approve
:
Functionality can be blocked.
Manual
It is advised to introduce a check to ensure tokenIn and tokenOut are not the same.
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.