The sellProfits
function cannot swap tokens as intended because the IERC20(_profits)
tokens are not approved by the contract.
The swapRouter.exactInputSingle(params)
call will always fail because the swapRouter
did not receive allowance to spend the _profits
tokens.
https://github.com/Cyfrin/2023-07-beedle/blob/658e046bda8b010a5b82d2d85e824f3823602d27/src/Fees.sol#L26
Funds are locked in the contract and the sellProfits
function will always revert.
Manual review
Add a token approve
before calling the Uniswap exactInputSingle
function
Unit tests should also be added.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.