The lack of a slippage value allows attackers to sandwich attack the transaction and extract the value.
The swap in Fees.sol
the sellProfits
function executes a swap on Uniswap, but the amountOutMinimum
value, which is accountable for slippage protection is at 0, which allows the swap to yield 0 tokens in return for the amount provided. This allows for MEVs to pick the transaction up from the mempool and to sandwich it by manipulating the pool, in which the swap is happening.
The amount getting swapped will be completely lost.
Manual Review
Consider setting amountOutMinimum
to some appropriate value, that includes a conservative amount of tolerance for price impact.
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.