Potential loss of funds when swapping tokens if sellProfits
is front ran, because of amountOutMinimum = 0
When swapping tokens, using Uni V3 there is a parameter amountOutMinimum
which basically mean, what is the minimum amount of tokens the contract is willing to accept from the trade. In this case the value is hard coded to 0
, meaning the contract is willing to accept nothing from the trade. A malicious user can front run sellProfits
, executes a purchase or a sell for the profits
token in Uni V3 and manipulate the price, before sellProfits
is executed, causing a loss of funds.
Loss of funds for the protocol, due to front running
Manual review
My suggestion is to add access control to the whole contract and to sellProfits
and add another function parameter inside of sellProfits
to specify the amountOutMinimum
.
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.