The protocol is using block.timestamp
as the deadline argument while interacting with the Uniswap NFT Position Manager and Swap Router, which completely defeats the purpose of using a deadline.
Actions in the Uniswap NonfungiblePositionManager and SwapRouter contract are protected by a deadline parameter to limit the execution of pending transactions. Functions that modify the liquidity of the pool check this parameter against the current block timestamp in order to discard expired actions.
These interactions are presented in the L2TokenReceiver contract. The functions swap()
and increaseLiquidityCurrentRange()
call their corresponding functions in the Uniswap Position Manager and Swap Router, providing block.timestamp as the argument for the deadline parameter.
Using block.timestamp
as the deadline is effectively a no-operation that has no effect nor protection. Since block.timestamp
will take the timestamp value when the transaction gets mined, the check will end up comparing block.timestamp
against the same value, i.e. block.timestamp <= block.timestamp
(see https://github.com/Uniswap/v3-periphery/blob/697c2474757ea89fec12a4e6db16a574fe259610/contracts/base/PeripheryValidation.sol#L7).
Failure to provide a proper deadline value enables pending transactions to be maliciously executed at a later point. Transactions that provide an insufficient amount of gas such that they are not mined within a reasonable amount of time, can be picked by malicious actors or MEV bots and executed later in detriment of the submitter.
See this issue for an excellent reference on the topic (the author runs a MEV bot).
Manual Review
Allow the owner to manually specify the deadline parameter.
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.