fillOffchainOrders()
validates the price wrongly.
fillOffchainOrders()
fills offchain orders by offchain order keepers.
During a validation, it compares targetPrice
with fillPrice
wrongly.
Currently, it passes if targetPrice <= fillPrice
for a buy order but it's wrong because the buyer should pay a higher price(fillPrice
) than he has requested(targetPrice
) while creating an offchain order.
The comment says correctly but the implementation is different from the comment.
There are 2 impacts.
User would lose funds due to the worse fill price when it should revert.
fillOffchainOrders()
would revert when it should work properly because of the wrong price validation.
Manual Review
We should validate like the below.
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.