In L2TokenReceiver.sol
, swap()
and increaseLiquidityCurrentRange()
does not set an expiration deadline, resulting in loss of funds when swapping tokens.
Per the contest page, the contracts will also be deployed on Ethereum mainnet along with Arbitrum. Since, Ethereum has mempool and the possibility of this issue is applicable here.
The deadline parameter in the swap()
is set to block.timestamp
. That means the function will accept a token swap at any block.timestamp which means there is no expiry deadline.
swap()
does not allow the function caller to submit a deadline for their actions which execute swaps on Uniswap V3
. This missing feature enables pending transactions to be maliciously executed at a later point.
Similarly, In increaseLiquidityCurrentRange()
, the deadline is hardcoded to block.timestamp
and the above issue will also applicable to this function.
Without an expiration deadline, a malicious miner/validator can hold a transaction until they favor it or they can make a profit.
Manual review
Set the deadline parameter in swap()
and increaseLiquidityCurrentRange()
. This user defind timestamp will ensure, once deadline is passed the transaction will expire.
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.