You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Market-sim PR introduces a check which queries the market depth API whilst a market is in continuous trading and asserts the greatest bid price is smaller than the smallest ask price.
The check is currently on scenarios including the fuzzing runs.
Local run failed with a crossed order book:
2024-02-23 18:08:25,815 - root - ERROR - Market dd37c4 in TRADING_MODE_CONTINUOUS but greatest bid > smallest ask (1520.47 > 1518.58)
it fails claiming: ERROR - Market b4a51a in TRADING_MODE_CONTINUOUS but greatest bid > smallest ask (1489.00 > 1487.42)
I'm assuming you stop as soon as you see a crossed market data, but if you look at the market data on the last block in the run for that market:
it's not crossed, and even if it were, it's in a monitoring auction. So what's going on?
this is the replay file tail:
Looking at all the events from this market the bid and ask are never crossed when the market is not in an auction so not sure where this failure is coming from. Can you please double check the simulator code?
ok, more insights: the "crossing" happens when an order is submitted, matched but then can't cover the fees. This can happen because the order is a market order which is matched against a ridiculously large bid price - so the fee is high, higher than what the party has in their general + margin account so the aggressor order which has already gone in the book is matched with the passive order which has hence already been taken out of the book. The result is that the trade isn't done, but the passive order is gone from the book and data node is none the wiser. In addition a bonus is that this can (and does) leave the order book with headless pegged orders, with nothing to peg to until something gets them repriced.
Problem encountered
Market-sim PR introduces a check which queries the market depth API whilst a market is in continuous trading and asserts the greatest bid price is smaller than the smallest ask price.
The check is currently on scenarios including the fuzzing runs.
Local run failed with a crossed order book:
vega-sim-ag8ruz_l.zip
Note: CI run in progress, will hopefully fail with same error.
https://jenkins.vega.rocks/job/common/job/vega-market-sim-reinforcement/268/
Observed behaviour
Expected behaviour
Steps to reproduce
Software version
feature/enable-isolated-margin
Failing test
vega-market-sim fuzz test
Jenkins run
No response
Configuration used
Relevant log output
The text was updated successfully, but these errors were encountered: