Function Fees.sellProfits(address)
is used for swapping loan tokens for collateral tokens from liquidations using UniswapV3 swap router. However, Fees
contract does not approve tokens to swap router so function sellProfits(address)
will always fail
There is no function to approve tokens or increase allowance in sellProfits
's logics
https://github.com/Cyfrin/2023-07-beedle/blob/658e046bda8b010a5b82d2d85e824f3823602d27/src/Fees.sol#L26-L44
Loan tokens sent to Fees
contract could not be sold to send to staking contract. So tokens locked in the contract forever
Foundry
Update the function logics like below:
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.