-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Figure out and handle Serum market orders #216
Comments
After talking with the Serum team it seems like the fees weren't being accounted for. Let's say the lowest ASK was 15. If we use a makePlaceOrderTransaction instruction passing in the limitPrice of 15, the transaction will pass but nothing happens because after the fees are accounted for there's not enough to match the order. When placing a limit order that is higher than the lowest Ask, the DEX matches the order appropriately |
This is tied to this Serum-TS bug project-serum/serum-ts#84 |
WIP on the FE repo here: Currently using the serum taker fees when it's a market order. This transaction goes through, however the Not sure if we should add an additional buffer for |
new branch to use is |
Image showing the OrderParams being passed to Serum's
Market.makePlaceOrderTransaction
function along side the existing order book for context.https://explorer.solana.com/tx/54TDQAGSUzbKYAiPSCSMjwpYMS37NvKi6n66DzSFuJhTWyXaJyY7Lo7acStbhw9vZYwB157Hf7hYRpXEnScLhGNU?cluster=devnet
When trying to handle a market order I'm using the "ioc" orderType. But for some reason the order book doesn't change. You can even see from the posted explorer link above that 15 USDCT (mint address
HinfVnJuzMtJsyuLE2ArYCChDZB6FCxEu2p3CQeMcDiF
) gets debited from my token account.Are we handling market orders correctly? Or is there some sort of crank we need to turn for the orders to match and the order book to update? If we need to run the
ConsumeEvents
function, I'll need more information on the arguments. I have not been able to get it to work properly and it stems from the openOrdersAccounts passed in.Note [this, quite confusing, document[(https://docs.google.com/document/d/17-FlYTIcLiciWdjXaQEdUnEJFbvIeIEYW3fdcEQu8ds/edit) listing some of the changes from DEX V2 -> DEX V3. In particular "The MatchOrders instruction still exists, but it doesn’t do anything.".
The text was updated successfully, but these errors were encountered: