0xProject / 0x-launch-kit-frontend

Apache License 2.0
114 stars 208 forks source link

Limit orders won't get matched #551

Closed icinsight closed 5 years ago

icinsight commented 5 years ago

As seen in the picture, matching buy-sell limit orders won't meet and trade won't take place.

The same happens when the limit buy order is HIGHER than the lowest sell order.

Market order executes correctly.

image

icinsight commented 5 years ago

See this for "negative" spread non-match.

image

tomhschmidt commented 5 years ago

The current Launch Kit backend implementation is just an open orderbook relayer, so it's not matching orders by design. Bots can match overlapping orders together and collect the spread by calling matchOrders, and we find that this generally happens quite quickly on OO relayers.

Might be nice to warn people who are placing a limit order above the spread to use a market order instead (?), but this is working as intended for now.

icinsight commented 5 years ago

Market orders work, but not even matching orders execute, see the first screen. If that is a "feature" I'm fine with that. It means one can't really buy using limit orders, right? That is odd feature but we can live with that.

tomhschmidt commented 5 years ago

Yeah, this is by design. Open orderbook relayers have no "matching engine" that would actually fill the orders and pay for the gas. Users can do it themselves, or bots can find orders that overlap and fill them to capture the spread https://0x.org/wiki#Open-Orderbook

icinsight commented 5 years ago

Ok. So a market order is the only way to buy, right?