OrdersFacet.cancelOrderFarFromOracle doesn't return order funds to owner.
OrdersFacet.cancelOrderFarFromOracle
can be called if there are a lot of orders in the order book to close some of them that are with lowest price. The function calls LibOrders.cancelOrder
or LibOrders.cancelManyOrders
to do so.
The problem is that both functions just make sure that order is removed from orderbook and order id is now marked as canceled so it can be used in the future. But refund was not done to order creator.
Even though, order is one of the last in the order book, doesn't mean that small amount funds was escrowed to it. As result user loses those funds.
Creator of canceled order loses funds.
VsCode
You need to return funds back to creator as it's done in other cancel functions.
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.