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

Fees::sellProfits doesn’t call approve function

Vulnerability Details

Fees::sellProfits doesn’t call approve function so that transferFrom cannot be executed in the Uniswap, which results in the lock of funds.

Impact

All of the fees are locked.

Tools Used

manual

Recommendations

function sellProfits(address _profits) public {
require(_profits != WETH, "not allowed");
uint256 amount = IERC20(_profits).balanceOf(address(this));
+ IERC20(_profits).approve(address(swapRouter), amount);
ISwapRouter.ExactInputSingleParams memory params = ISwapRouter

Support

FAQs

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

Give us feedback!