Closed cdummett closed 3 months ago
what happens is the following: order a0112c2c869569e72bd2f4f5f7ce0671581553323a91dac109b31c048cdd11cd comes in, it is a pegged order, pegged to the top ask with 0 offset. It gets priced using the amm BestPricesAndVolumes and ends up having a price far better than the current top of the book which fails the validation we have that the top of the book level cannot have only pegged orders.
Root cause: at the end of the block, we call CheckBook
on the matching engine, which returns false
if the only orders found on the book were pegged orders. It didn't take AMMs in to account. As part of the changes fixing #11504 this was fixed, so I'm closing the issue as fixed.
Problem encountered
Fuzzing runs panic when including fuzzed AMMs - running against 033b6c0
vega-sim-so7u28xq.zip
Observed behaviour
panic
Expected behaviour
no panic
Steps to reproduce
Software version
033b6c0257dc46a4ff5d1b6596627518ca86516d
Failing test
vega-market-sim fuzz test
Jenkins run
local run
Configuration used
Relevant log output