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

No slippage parameter on swap will lead to transactions being sandwhiched

Summary

By setting amountOutMin to 0, the swapRouter is vulnerable to being sandwiched, causing profits to be lost.

Vulnerability Details

lack of a slippage check opens up swaps to sandwich attacks, leading to unprofitable swaps.

Impact

Profits lost due to sandwich attacks.

Tools Used

manual review

Recommendations

Do not use 0 for the slippage parameter. Either calculate the amountOutMin off chain using the UniswapV3Quoter contract or use a price oracle to calculate a minimum value on chain. Alternatively, allow users to designate their slippage parameter when initiating a liquidation and pass this in as an argument.

Support

FAQs

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