[BUG] - Unable to leave auction when GFA orders are used in opening auction
Closed this issue · 3 comments
Linked to https://github.com/vegaprotocol/OctoberACs/issues/236
Setup as follows:
new market in opening auction
Submit the following LP
{"id":"18713-83","block":"C4C563612510680A6B0960FFDFB68E9FFC1B8574184423862096E39A0B605BDC","type":"BUS_EVENT_TYPE_LIQUIDITY_PROVISION","liquidityProvision":{"id":"bd53fc79f63c0a1c3563bfd00bd35efc53ec29d978fc1caca7c9d1b05ef901b6","partyId":"dae8b2605c42d52e4f06c544849d3d6286f592ef45056fbf3755582df9616a9c","createdAt":"1694013762420936000","updatedAt":"1694013762420936000","marketId":"6585582eef43dea46a49200da07b7e178604dde3ce0500d56c6f85118723aa67","commitmentAmount":"390500000000000000000000","fee":"0.3","version":"1","status":"STATUS_ACTIVE","reference":"8EFDC3E80CD24B2"},"version":1,"chainId":"testnet-001","txHash":"A200C5565874A846873AAF911554C5794D7B78A273CCC90C277C51EBBEB1EB0D"}
Submit the following orders to cross and create bid/ask
{"id":"18715-85","block":"A983AB62206423D22E71192AEBAC3E49B1E98F5E5916CE77076C852A31A4C300","type":"BUS_EVENT_TYPE_ORDER","order":{"id":"0b106133dcdef1c64090714d7f0ee54ae544e1453323e09b3b1a313c1df81223","marketId":"6585582eef43dea46a49200da07b7e178604dde3ce0500d56c6f85118723aa67","partyId":"dae8b2605c42d52e4f06c544849d3d6286f592ef45056fbf3755582df9616a9c","side":"SIDE_SELL","price":"100000","size":"100000000","remaining":"100000000","timeInForce":"TIME_IN_FORCE_GFA","type":"TYPE_LIMIT","createdAt":"1694013763018078000","status":"STATUS_ACTIVE","reference":"test_GFA_orders_SLA-85834e79","version":"1"},"version":1,"chainId":"testnet-001","txHash":"6D3B76530EDE5E4998398A7C2B6BF9A374878EC371F87AC45F98FAC9E988FDC4"}
{"id":"18717-71","block":"0E29EF96D7404D2589FE45C98691F5D05AC07AF250E7B830ECFBEF2C4C85D5F7","type":"BUS_EVENT_TYPE_ORDER","order":{"id":"79bf473c779d4447e6aebda371e466351db68559abad7d8399eb4eed5ad51731","marketId":"6585582eef43dea46a49200da07b7e178604dde3ce0500d56c6f85118723aa67","partyId":"cc187cafca1b6b4eaf2213ec183e7870c095ed9feeedde9c049654d8717743ec","side":"SIDE_BUY","price":"120000","size":"100000000","remaining":"100000000","timeInForce":"TIME_IN_FORCE_GTC","type":"TYPE_LIMIT","createdAt":"1694013763628013000","status":"STATUS_ACTIVE","reference":"test_GFA_orders_SLA-6c44b340","version":"1"},"version":1,"chainId":"testnet-001","txHash":"C52707D337DB3AB8E600A590E93B3094B6630E5F27AD5141D5622DB42F486BEF"}
{"id":"18719-68","block":"159E953F3B173057585DC3820955AFD1C35DA904EA14F2A12CB7DDEC03CD3B10","type":"BUS_EVENT_TYPE_ORDER","order":{"id":"2060bd69a45e9203b23829d52abc4e2bc0acfbf23fd57cc231aa28598b389f28","marketId":"6585582eef43dea46a49200da07b7e178604dde3ce0500d56c6f85118723aa67","partyId":"dae8b2605c42d52e4f06c544849d3d6286f592ef45056fbf3755582df9616a9c","side":"SIDE_BUY","price":"100000","size":"100000000","remaining":"100000000","timeInForce":"TIME_IN_FORCE_GFA","type":"TYPE_LIMIT","createdAt":"1694013764486696000","status":"STATUS_ACTIVE","reference":"test_GFA_orders_SLA-a1d21056","version":"1"},"version":1,"chainId":"testnet-001","txHash":"B84CEE07919DC2F9D471CC1348F31053DC2F036F98E01A0513B57E226906F93B"}
{"id":"18721-87","block":"5A81822984C10E36BB642088E19C875C6FDF0CDAC4B075871163B3FECE1F19B1","type":"BUS_EVENT_TYPE_ORDER","order":{"id":"c79fa75efaba911da2151fc90b8e131994099e135d360f89791813f774826071","marketId":"6585582eef43dea46a49200da07b7e178604dde3ce0500d56c6f85118723aa67","partyId":"91561f6f9e184a2c17a51b37193b006466384e0a016ab936b411791ea4eec59e","side":"SIDE_SELL","price":"80000","size":"100000000","remaining":"100000000","timeInForce":"TIME_IN_FORCE_GTC","type":"TYPE_LIMIT","createdAt":"1694013765199177000","status":"STATUS_ACTIVE","reference":"test_GFA_orders_SLA-0a7d399c","version":"1"},"version":1,"chainId":"testnet-001","txHash":"F6585B6DA0282DCE809147E5F0AD3374138DE1C97CB4988BBA9BB5CA4B4CC353"}
{"id":"18724-86","block":"7E337B7592E68B166C9581136CDE50A51A40BF9041A92905999DF934CEDF709F","type":"BUS_EVENT_TYPE_ORDER","order":{"id":"285b630a4c33ffe3249d6a47b1fbe5d77c45ac3f27072bcf9432ba48f57e8bb3","marketId":"6585582eef43dea46a49200da07b7e178604dde3ce0500d56c6f85118723aa67","partyId":"cc187cafca1b6b4eaf2213ec183e7870c095ed9feeedde9c049654d8717743ec","side":"SIDE_BUY","price":"10000000","size":"100000","remaining":"100000","timeInForce":"TIME_IN_FORCE_GTC","type":"TYPE_LIMIT","createdAt":"1694013766373770000","status":"STATUS_ACTIVE","reference":"test_GFA_orders_SLA-57306fdc","version":"1"},"version":1,"chainId":"testnet-001","txHash":"EE5BD3CDD5D565AFDA3B3BF93FC7875E3ED5A468DFD556B4B709A8F4A45E90BB"}
{"id":"18726-169","block":"F070F2A71683588C16DF3B5F9CDD7716DE60A77CE5B55FE5354BD42F3194E396","type":"BUS_EVENT_TYPE_ORDER","order":{"id":"91570607fa96dc94955725ea972dd9b1035de80885b3b1814d1002eb75e96525","marketId":"6585582eef43dea46a49200da07b7e178604dde3ce0500d56c6f85118723aa67","partyId":"91561f6f9e184a2c17a51b37193b006466384e0a016ab936b411791ea4eec59e","side":"SIDE_SELL","price":"10000000","size":"100000","remaining":"100000","timeInForce":"TIME_IN_FORCE_GTC","type":"TYPE_LIMIT","createdAt":"1694013767089959000","status":"STATUS_ACTIVE","reference":"test_GFA_orders_SLA-1325ab8d","version":"1"},"version":1,"chainId":"testnet-001","txHash":"DECF54EFD292C30EE71FA8A1289C6BEB7EF64B007707216C7C96D636F03A9C12"}
Market remains in auction liquidity target not met , expected continuous trading. But actually we have exceeded target stake ,"targetStake":"276726450000000000000","suppliedStake":"390500000000000000000000",
When GFA orders are not submitted we enter continuous trading.
Last two GTC orders should def cross.
market data
{"id":"18888-82","block":"334C6BF05D9377282925E65CBC703A559A7B0A5D1E0BC6DFE301385D72E5746B","type":"BUS_EVENT_TYPE_MARKET_DATA","marketData":{"markPrice":"0","bestBidPrice":"10000000","bestBidVolume":"100000","bestOfferPrice":"80000","bestOfferVolume":"100000000","bestStaticBidPrice":"10000000","bestStaticBidVolume":"100000","bestStaticOfferPrice":"80000","bestStaticOfferVolume":"100000000","midPrice":"5040000","staticMidPrice":"5040000","market":"6585582eef43dea46a49200da07b7e178604dde3ce0500d56c6f85118723aa67","timestamp":"1694013881664183000","auctionEnd":"1694013882000000000","auctionStart":"1694013753000000000","indicativePrice":"100000","indicativeVolume":"200000000","marketTradingMode":"TRADING_MODE_OPENING_AUCTION","trigger":"AUCTION_TRIGGER_OPENING","extensionTrigger":"AUCTION_TRIGGER_LIQUIDITY_TARGET_NOT_MET","targetStake":"276726450000000000000","suppliedStake":"390500000000000000000000","marketValueProxy":"0","liquidityProviderFeeShare":[{"party":"dae8b2605c42d52e4f06c544849d3d6286f592ef45056fbf3755582df9616a9c","equityLikeShare":"1","averageEntryValuation":"390500000000000000000000","averageScore":"1","virtualStake":"390500000000000000000000.0000000000000000"}],"marketState":"STATE_PENDING","nextMarkToMarket":"-6795364578871345152","lastTradedPrice":"0","marketGrowth":"0"},"version":1,"chainId":"testnet-001","txHash":"334C6BF05D9377282925E65CBC703A559A7B0A5D1E0BC6DFE301385D72E5746B"}
Might be related with: #9279, to re-tests once fixed and merged.
Feel free to run this against the 9279-rm-peg-checks branch, but looking at the order events, all orders trade, so there's no best bid/ask on the book anymore. The LP auction is triggered still is because the version on develop still checks for remaining volume. The fix is on the aforementioned branch, and will be ready soon