Order Techniques with Project Serum
Order Techniques with Project Serum
I've started noticing different Order placement/cancellation patterns on Serum, than what normally occurs through the user interface (serum-dex-ui).
Normal post-only limit order (serum-dex-ui)
- NewOrderV3
- ConsumeEvents with the trader's open orders account included
- Settle Funds from the open orders wallet for the market.
Both instructions are for a post-only limit order. Yet this market maker is calling Consume Events, which processes the Event Queue, and Settle Funds, which clears out any unsettled balances and useful for smoother trading.
Order cancellation
(Left: serum-dex-ui, Right: market maker)
The left order still has the unneeded Match Orders instructions, and a single Cancel Order instruction. The market maker has the following flow:
- ConsumeEvents with the trader's open orders account included (decreases settlement time or something)
- CancelOrderByClientIdV2 (normal, nothing special here)
- ConsumeEvents with the trader's open orders account included (again)
- Settle Funds from the open orders wallet for the market.
This acts like a "Super Cancel", which should probably be implemented in serum-dex-ui. It cranks the market, cancels the order, cranks again, then settle funds. This should lead to a smoother trading experience.
Comments
Post a Comment