feeAmount calculation needs to be in favour of the protocol. The correct code ought to be:
Division should occur by shortToken's min price, not the max price.
Protocol receives less fees and user is able to withdraw more.
Likelihood: Low/Medium, every withdraw, position opened, not liquidated, beenShort or not 1, and the difference between minPrice and maxPrice is significant. Impact: Low, small part of feeAmount and PnL not deducted from collateralDeltaAmount.
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.