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

Fees cannot be swapped for rewards.

Summary

The sellProfits function should convert a token to WETH and send it to the staking contract. However, there is currently no allowance to swap tokens through the router.

Vulnerability Details

After receiving the fees in other tokens, it is necessary to call sellProfits to convert the token to WETH and then send it to staking contract that is converted to staking rewards, but there is no allowance to router to enable to swap the tokens to WETH

Impact

Can't convert any fee to reward

Tools Used

Manual Review

Recommendations

Add an approve for router before call swapRouter.exactInputSingle() function.

Support

FAQs

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