code.vegaprotocol.io/vega@v0.79.0/core/integration/features/auctions/opening-auction-indicative-price.feature (about) 1 Feature: Set up a market, create indiciative price different to actual opening auction uncross price 2 3 Background: 4 5 Given 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 | BTC | BTC | default-log-normal-risk-model | default-margin-calculator | 8 | default-none | default-basic | default-eth-for-future | 0.25 | 0 | default-futures | 8 And the following network parameters are set: 9 | name | value | 10 | market.auction.minimumDuration | 8 | 11 | limits.markets.maxPeggedOrders | 2 | 12 13 @IPOTest 14 Scenario: Simple test with different indicative price before auction uncross 15 # setup accounts 16 Given the parties deposit on asset's general account the following amount: 17 | party | asset | amount | 18 | party1 | BTC | 100000000 | 19 | party2 | BTC | 100000000 | 20 | party3 | BTC | 100000000 | 21 | party4 | BTC | 100000000 | 22 | party5 | BTC | 100000000 | 23 | party6 | BTC | 100000000 | 24 | lpprov | BTC | 100000000 | 25 26 When the network moves ahead "3" blocks 27 Then the market data for the market "ETH/DEC19" should be: 28 | trading mode | 29 | TRADING_MODE_OPENING_AUCTION | 30 # start with submitting trades that produce an indicative uncrossing price 31 When the parties place the following orders: 32 | party | market id | side | volume | price | resulting trades | type | tif | reference | 33 | party6 | ETH/DEC19 | buy | 100 | 10900 | 0 | TYPE_LIMIT | TIF_GFA | t6-b-1 | 34 | party5 | ETH/DEC19 | sell | 100 | 10900 | 0 | TYPE_LIMIT | TIF_GFA | t5-s-1 | 35 # continue opening auction 36 When the network moves ahead "4" blocks 37 Then the market data for the market "ETH/DEC19" should be: 38 | trading mode | 39 | TRADING_MODE_OPENING_AUCTION | 40 And the parties cancel the following orders: 41 | party | reference | 42 | party6 | t6-b-1 | 43 | party5 | t5-s-1 | 44 # place orders to set the actual price point at which we'll uncross to be 10000 45 # When the network moves ahead "1" blocks 46 # Then the market data for the market "ETH/DEC19" should be: 47 # | trading mode | 48 # | TRADING_MODE_OPENING_AUCTION | 49 And the parties place the following orders: 50 | party | market id | side | volume | price | resulting trades | type | tif | reference | 51 | party3 | ETH/DEC19 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | t3-b-1 | 52 | party4 | ETH/DEC19 | sell | 1 | 11000 | 0 | TYPE_LIMIT | TIF_GTC | t4-s-1 | 53 | party1 | ETH/DEC19 | buy | 5 | 10000 | 0 | TYPE_LIMIT | TIF_GFA | t1-b-1 | 54 | party2 | ETH/DEC19 | sell | 5 | 10000 | 0 | TYPE_LIMIT | TIF_GFA | t2-s-1 | 55 | party1 | ETH/DEC19 | buy | 5 | 10000 | 0 | TYPE_LIMIT | TIF_GFA | t1-b-2 | 56 | party2 | ETH/DEC19 | sell | 5 | 10001 | 0 | TYPE_LIMIT | TIF_GFA | t2-s-2 | 57 | party1 | ETH/DEC19 | buy | 4 | 3000 | 0 | TYPE_LIMIT | TIF_GFA | t1-b-3 | 58 | party2 | ETH/DEC19 | sell | 3 | 3000 | 0 | TYPE_LIMIT | TIF_GFA | t2-s-3 | 59 And the parties submit the following liquidity provision: 60 | id | party | market id | commitment amount | fee | lp type | 61 | lp1 | lpprov | ETH/DEC19 | 60000 | 0.1 | submission | 62 | lp1 | lpprov | ETH/DEC19 | 60000 | 0.1 | submission | 63 And the parties place the following pegged iceberg orders: 64 | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | 65 | lpprov | ETH/DEC19 | 2 | 1 | buy | MID | 50 | 100 | 66 | lpprov | ETH/DEC19 | 2 | 1 | sell | MID | 50 | 100 | 67 When the opening auction period ends for market "ETH/DEC19" 68 Then the market data for the market "ETH/DEC19" should be: 69 | trading mode | 70 | TRADING_MODE_CONTINUOUS | 71 ## We're seeing these events twice for some reason 72 73 Then the following trades should be executed: 74 | buyer | price | size | seller | 75 | party1 | 10000 | 3 | party2 | 76 | party1 | 10000 | 2 | party2 | 77 | party1 | 10000 | 3 | party2 | 78 And the mark price should be "10000" for the market "ETH/DEC19" 79 ## Network for distressed party1 -> cancelled, nothing on the book is remaining 80 And the orders should have the following status: 81 | party | reference | status | 82 | party1 | t1-b-1 | STATUS_FILLED | 83 | party2 | t2-s-1 | STATUS_FILLED | 84 | party1 | t1-b-2 | STATUS_CANCELLED | 85 | party2 | t2-s-2 | STATUS_CANCELLED | 86 | party1 | t1-b-3 | STATUS_CANCELLED | 87 | party2 | t2-s-3 | STATUS_FILLED | 88 | party5 | t5-s-1 | STATUS_CANCELLED | 89 | party6 | t6-b-1 | STATUS_CANCELLED | 90 #| party6 | t6-b-1 | STATUS_FILLED | 91 And the market data for the market "ETH/DEC19" should be: 92 | mark price | trading mode | horizon | min bound | max bound | ref price | 93 | 10000 | TRADING_MODE_CONTINUOUS | 5 | 9985 | 10015 | 10000 | 94 95