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

Lack of slippage protection

Summary

There are no slippage checks in the swap function

Vulnerability Details

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

Impact

The swaped amount might be lower than expected.

Tools Used

Manual Review

Recommendations

Set a proper slippage amount.

Support

FAQs

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