The isFillPriceValid value will be invalid because the conditional is backwards. This leads to both buys and sells being validated at unfavorable prices and, more importantly, at a price that the creator of the order explicitly did not agree to. This can result in orders being settled at bad prices, potentially causing a loss of funds for the user.
When a user creates an order, they can set limit prices for both buys ("increases") and sells ("decreases"). The issue is that these limits are not respected when determining if the off-chain order is being filled at a valid price.
The NatSpec comment above the isFillPriceValid variable describes what should be happening:
Key points are:
When buying, the fillPrice MUST be less than or equal to the target.
When selling, the fillPrice MUST be greater than or equal to the target.
However, the code does exactly the opposite:
Because of this, orders will be wrongly filled when they shouldn't be and not filled when they should be.
Potential loss of funds when orders are wrongly filled or not filled.
Manual analysis
Flip the conditional to:
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.