20,000 USDC
View results
Submission Details
Severity: high
Valid

Missing slippage checks

Summary

Missing slippage protection during calling of Uniswap V3 router

Vulnerability Details

In ExactInputSingleParams struct during interaction with Uniswap V3 router it is not implement any slippage checks with comparing the swap / liquidity results with a minimum swap / liquidity value.

ISwapRouter.ExactInputSingleParams memory params = ISwapRouter
.ExactInputSingleParams({
tokenIn: _profits,
tokenOut: WETH,
fee: 3000,
recipient: address(this),
deadline: block.timestamp,
amountIn: amount,
amountOutMinimum: 0, //@audit slippage protection
sqrtPriceLimitX96: 0
});

Impact

Users can be frontrun and receive a worse price than expected when they initially submitted the transaction.

Tools Used

Mannual review

Recommendations

Add some sort of protection for the user such that they receive their desired amounts. Add a minimum return amount as argument given by user.

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.