In the L2TokenReceiver::swap function the deadline parameter is set to block.timestamp.
The L2TokenReceiver::swap function has parameter deadline set to block.timestamp:
Since block.timestamp is always relative, using it in any way is equivalent to using no deadline at all. Needs to use a user defined input to effectively enforce any deadline. If there is no deadline, the transaction will be left hanging in the mempool and be executed later than the user wanted. This leads to user getting a worse price, because a validator can just hold onto the transaction. And when it does get around to putting the transaction in a block, it'll be block.timestamp, so there is no protection.
Here is a link to an article that describes briefly the impact of use block.timestamp as deadline is swap function and how Uniswap deals with it:
https://web.archive.org/web/20230525014603/https://blog.bytes032.xyz/p/why-you-should-stop-using-block-timestamp-as-deadline-in-swaps
The impact of the setting deadline parameter to block.timestamp is that in some cases, transactions might be delayed due to network congestion, causing them to miss their deadline. This could lead to the transaction failing unnecessarily.
Also, this results in the user getting a worse price because the validator can hold the transaction. And when it comes to putting the transaction into a block, it will be block.timestamp, so there is no protection.
Manual Review
It is recommended to set the deadline parameter to be uint256 value. You can define deadline value or add an additional input parameter deadline:
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.