UniV3LiquidityAmo provides addLiquidity() and removeLiquidity() to allow liquidity provisioning for RdpxV2Core on UniswapV3.
However, it uses the value type(uint256).max and block.timestamp for the deadline parameter for adding/removing liquidity.
That is not recommended as the transactions could be possibly be re-ordered or delayed and executed at a later time with the malicious intent to obtain MEV from it.
Even though, Arbitrum does not have a mempool at the moment, there could possibly be MEV opportunities in the future when they decentralize the sequencer. And this issue is also applicable if the project intends to expand to other chains or make it omnichain.
Lines of code
https://github.com/code-423n4/2023-08-dopex/blob/main/contracts/amo/UniV3LiquidityAmo.sol#L190 https://github.com/code-423n4/2023-08-dopex/blob/main/contracts/amo/UniV3LiquidityAmo.sol#L250
Vulnerability details
UniV3LiquidityAmo provides
addLiquidity()
andremoveLiquidity()
to allow liquidity provisioning forRdpxV2Core
on UniswapV3.However, it uses the value
type(uint256).max
andblock.timestamp
for the deadline parameter for adding/removing liquidity. That is not recommended as the transactions could be possibly be re-ordered or delayed and executed at a later time with the malicious intent to obtain MEV from it.Even though, Arbitrum does not have a mempool at the moment, there could possibly be MEV opportunities in the future when they decentralize the sequencer. And this issue is also applicable if the project intends to expand to other chains or make it omnichain.
https://github.com/code-423n4/2023-08-dopex/blob/main/contracts/amo/UniV3LiquidityAmo.sol#L190
https://github.com/code-423n4/2023-08-dopex/blob/main/contracts/amo/UniV3LiquidityAmo.sol#L250
Impact
The add/remove liquidity transaction could be subjected to MEV due to the issue.
Recommended Mitigation Steps
Allow
deadline
to be passed in by the user as a parameter.Assessed type
MEV