The current implementation of adding liquidity to the Uniswap pool sets amount0Min equal to amount0 and amount1Min equal to amount1, resulting in zero slippage tolerance. This means that the transaction will only succeed if the exact desired amounts are met, which is highly unlikely due to market fluctuations, leading to a high risk of failed transactions.
Lines of code
https://github.com/code-423n4/2024-06-vultisig/blob/cb72b1e9053c02a58d874ff376359a83dc3f0742/src/ILOPool.sol#L285-L303
Vulnerability details
Impact
The current implementation of adding liquidity to the Uniswap pool sets amount0Min equal to amount0 and amount1Min equal to amount1, resulting in zero slippage tolerance. This means that the transaction will only succeed if the exact desired amounts are met, which is highly unlikely due to market fluctuations, leading to a high risk of failed transactions.
Proof of Concept
Tools Used
Manual review.
Recommended Mitigation Steps
Add some slippage (0.5% for example) to
addLiquidity
function call.Assessed type
DoS