If for any reason the function exactInputSingle from swapRouter reverts, profits of that specific address might be locked forever. For example, Uniswap v3 introduces multiple pools for each token pair, each with a different swapping fee. Liquidity providers may initially create pools at three fee levels: 0.05%, 0.30%, and 1%.
If a specific pool _profits-WETH does not have a 3000 wei fee, the function sellProfits would revert.
Steps to reproduce:
Find a WETH-token pool in Optimism's Uniswap V3 Router Contract (Since according to Beedle's dev, they are deploying on Optimism) that does not have a 0.30% fee.
Execute sellProfits with the token address that you found in the previous step to see the revert.
This would cause the contract to lock up that specific token _profits indefinitely and the user would not be able to withdraw the profits, hence it is a High risk vulnerability.
Foundry
Implement a function emergencyWithdraw(address _profits) onlyOwner to withdraw any stuck funds.
Implement a mapping to track different _profits-WETH pool fees instead of hardcoding 3000.
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.