The sellProfits function is always using the 0.3% fee pool, which may not be the most liquid one for the specified token pair, leading to worse slippage and price impact.
The sellProfits
function in Fees.sol
swaps profits from one token to WETH. The issue arises due to the contract only using the 0.3% fee pools for each of the swaps.
This is an issue because some pairs' 0.3% pools may not be the most liquid ones. If the pool is not the most liquid one the swap will experience higher slippage than needed, losing some amount of funds in the process.
The slippage on swaps in pools with less liquidity will be higher than can be even with proper slippage tolerance.
Manual Review
Consider checking the liquidity in each of the available pools for the pair and swapping in the most liquid one.
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.