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

No functions of Fees.sol would be executed

Summary

No functions will be executed in Fees.sol

Vulnerability Details

In function sellProfits() it is calling the uniswap router for swapping the tokens. But here the catch is that before swapping tokens through router the caller of the function must approve the contract to withdraw the tokens from the calling address's account to execute a swap and we must also approve the Uniswap protocol router contract to use the tokens that our contract will be in possession of after they have been withdrawn from the calling address. But here there is no approval given to router to spend our tokens.
Official reference for swapping ISwapRouter.ExactInputSingleParams() - (https://docs.uniswap.org/contracts/v3/guides/swaps/single-swaps)

Impact

As no approval is given to router contract and the tokens are not being transferred to the contract before swapping the tokens the function would fail and no functions would work in Fees.sol.

Tools Used

Manual Review

Recommendations

approve the contract to withdraw the tokens from the calling address's account and approve the Uniswap protocol router contract to use the tokens that our contract will be in possession .

Support

FAQs

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