pnl 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.
User is able to withdraw more and protocol receives lesser negative PnL position fee.
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.