code.vegaprotocol.io/vega@v0.79.0/core/integration/features/auctions/leave-price-enter-liquidity-auction.feature (about) 1 Feature: Leave a monitoring auction, enter a liquidity auction 2 3 Background: 4 5 And the markets: 6 | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | 7 | ETH/DEC19 | ETH | ETH | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-basic | default-eth-for-future | 0.01 | 0 | default-futures | 8 And the following network parameters are set: 9 | name | value | 10 | market.auction.minimumDuration | 1 | 11 | limits.markets.maxPeggedOrders | 1500 | 12 13 @SLABug 14 Scenario: 15 Given the parties deposit on asset's general account the following amount: 16 | party | asset | amount | 17 | party0 | ETH | 1000000000 | 18 | party1 | ETH | 1000000000 | 19 | party2 | ETH | 1000000000 | 20 | party3 | ETH | 1000000000 | 21 | partylp | ETH | 1000000000 | 22 23 # submit our LP 24 Then the parties submit the following liquidity provision: 25 | id | party | market id | commitment amount | fee | lp type | 26 | lp1 | partylp | ETH/DEC19 | 16000000 | 0.3 | submission | 27 | lp1 | partylp | ETH/DEC19 | 16000000 | 0.3 | amendment | 28 And the parties place the following pegged iceberg orders: 29 | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | 30 | partylp | ETH/DEC19 | 2 | 1 | buy | BID | 2 | 10 | 31 | partylp | ETH/DEC19 | 2 | 1 | sell | ASK | 13 | 10 | 32 33 # get out of auction 34 When the parties place the following orders: 35 | party | market id | side | volume | price | resulting trades | type | tif | reference | 36 | party0 | ETH/DEC19 | buy | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | t0-b-1 | 37 | party1 | ETH/DEC19 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | t1-s-1 | 38 | party0 | ETH/DEC19 | buy | 5 | 95000 | 0 | TYPE_LIMIT | TIF_GTC | t0-b-2 | 39 | party1 | ETH/DEC19 | sell | 5 | 107000 | 0 | TYPE_LIMIT | TIF_GTC | t1-s-2 | 40 41 Then the opening auction period ends for market "ETH/DEC19" 42 And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" 43 44 # trigger liquidity monitoring 45 When the parties place the following orders: 46 | party | market id | side | volume | price | resulting trades | type | tif | reference | 47 | party1 | ETH/DEC19 | sell | 1 | 99844 | 0 | TYPE_LIMIT | TIF_GTC | t1-s-3 | 48 | party0 | ETH/DEC19 | buy | 1 | 99844 | 0 | TYPE_LIMIT | TIF_GTC | t0-b-3 | 49 50 And time is updated to "2019-11-30T00:00:03Z" 51 # enter price monitoring auction 52 Then the market state should be "STATE_SUSPENDED" for the market "ETH/DEC19" 53 And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/DEC19" 54 55 Then the parties cancel the following orders: 56 | party | reference | 57 | party1 | t1-s-3 | 58 59 Then the parties place the following orders: 60 | party | market id | side | volume | price | resulting trades | type | tif | reference | 61 | party1 | ETH/DEC19 | sell | 1 | 100291 | 0 | TYPE_LIMIT | TIF_GTC | t1-s-4 | 62 | party0 | ETH/DEC19 | buy | 1 | 100291 | 0 | TYPE_LIMIT | TIF_GTC | t0-b-4 | 63 64 When the network moves ahead "15" blocks 65 # leave auction 66 Then the market state should be "STATE_ACTIVE" for the market "ETH/DEC19" 67 68 And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" 69 And the mark price should be "100291" for the market "ETH/DEC19" 70 71 Then the parties place the following orders: 72 | party | market id | side | volume | price | resulting trades | type | tif | reference | 73 | party3 | ETH/DEC19 | buy | 106 | 110000 | 0 | TYPE_LIMIT | TIF_GTC | t3-b-1 | 74 75 Then the parties place the following pegged orders: 76 | party | market id | side | volume | pegged reference | offset | 77 | party3 | ETH/DEC19 | buy | 3 | BID | 900 | 78 79 Then the market state should be "STATE_SUSPENDED" for the market "ETH/DEC19" 80 And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/DEC19" 81 82 Then the parties place the following orders: 83 | party | market id | side | volume | price | resulting trades | type | tif | reference | 84 | party0 | ETH/DEC19 | buy | 5 | 108500 | 0 | TYPE_LIMIT | TIF_GTC | t0-b-5 | 85 86 And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/DEC19" 87 And the market state should be "STATE_SUSPENDED" for the market "ETH/DEC19" 88 89 And time is updated to "2019-11-30T00:00:22Z" 90 91 And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/DEC19" 92 And the market state should be "STATE_SUSPENDED" for the market "ETH/DEC19" 93 94 Then the parties place the following orders: 95 | party | market id | side | volume | price | resulting trades | type | tif | reference | 96 | party1 | ETH/DEC19 | sell | 125 | 95000 | 0 | TYPE_LIMIT | TIF_GTC | t1-s-5 | 97 98 When the network moves ahead "15" blocks 99 Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" 100 And the market state should be "STATE_ACTIVE" for the market "ETH/DEC19"