Loopring / protocols

A zkRollup DEX & Payment Protocol
https://loopring.org
331 stars 122 forks source link

Partially filled buy limit order doesn't match crossing ask offer #2591

Open ioanwurf opened 2 years ago

ioanwurf commented 2 years ago

Following up my yesterday email and the discord thread. I'm experiencing a weird issue with the matching engine, with a partially filled order unable to match any further price on the opposite side.

Current behavior The partial filled order do not match any further offer in the order book. See the following screenshot about that: As you can see, the buy order price is 1.4141 and the best ask price at the time is 1.4113. The pending order should have been matched at least with that one.

Expected behavior The pending order should match the other side until completely fulfilled. This is also what's expected from your documentation: Partial order filling is fully supported. How much an order is filled is stored in the Merkle tree. No need for users to re-sign anything if the order was not filled completely in a single ring, a user only needs to sign his order a single time. The order can be included in as many rings as necessary until it is completely filled.

Additional details The partially matched order transaction id: https://explorer.loopring.io/tx/15940-22 List of trades around the time: https://discord.com/channels/488848270525857792/900801318078271508/930486809979404348 I have the pending order still active on my account. I would use that amount to continue my day-trading, but I have kept it there to let you see what's going on. The discord thread: https://discord.com/channels/488848270525857792/900801318078271508/930149210291044443

ioanwurf commented 2 years ago

Quick update: the order is still in the book: immagine