Skip to content
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

Potential erratic order matching issue involving margin call orders #625

Closed
HarukaMa opened this issue Feb 2, 2018 · 4 comments
Closed

Comments

@HarukaMa
Copy link
Contributor

HarukaMa commented Feb 2, 2018

Dunno if this is discussed before but I couldn't found any old issues about this.

snipaste_2018-02-02_16-35-42

If there are margin call orders waiting to be executed, the buy order with price between call limit and margin call price will be executed on the margin call orders at the order price, instead of executing against lowest asks orders below the margin call order.

Possible cause:

  1. New order - 2. margin call order execution match - 3. execute. In step 1 the new order will first considered as highest bid which is even higher than lowest ask on the order book, so in step 2 the requirement of margin call order execution could be successfully met, leading to step 3.

This is completely guessed from what I could see, but I've been caught once and seems a new market bot is also being affected by placing orders on specified prices.

Ideally, the new buy orders should first match the existing orders on the order book, then being considered for margin call orders. then execute against the margin call order with lowest price available (margin call price in wallet UI)

@pmconrad
Copy link
Contributor

pmconrad commented Feb 2, 2018

Possible duplicate of #338

@abitmore
Copy link
Member

abitmore commented Feb 2, 2018

I guess this ticket is either a duplicate of #338, or #343, or #583, or #606, or a combination of some or all of them. We're working on fixing them in next consensus-changing milestone. Please keep an eye. Helps are always welcome.

@abitmore abitmore added this to the 201803 - Consensus Changing Release milestone Feb 2, 2018
@abitmore
Copy link
Member

abitmore commented Feb 2, 2018

After further analysis I think this issue is related to #338, but not exactly the same. In #338 we said "matching price in favor of the taker", in this issue the favored matching prices are the limit orders but not the margin call orders.

@abitmore
Copy link
Member

Done with #829.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants