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

Swap is vulnerable to frontrunning attack

Summary

The sellProfits function is vulnerable to the fronrun attack.

Vulnerability Details

Minimum out amount is not specified which may lead to the frontranning (sandwich) attack.

Impact

This may result in manipulations and transfering _profits tokens from the contract with not appropriate WETH amount returning. The amount of tokens returned may be less than expected.

Tools Used

VS Code

Recommendations

Add the minimumOut parameter to the function and pass it as the amountOutMinimum parameter to the swap.

Support

FAQs

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