code.vegaprotocol.io/vega@v0.79.0/core/integration/features/price_monitoring/3362-failing-system-tests-trigger-with-gtt.feature (about) 1 Feature: Replicate failing system tests after changes to price monitoring (trigger with GTT order) 2 3 Background: 4 Given time is updated to "2020-10-16T00:00:00Z" 5 And the price monitoring named "my-price-monitoring": 6 | horizon | probability | auction extension | 7 | 5 | 0.95 | 6 | 8 | 10 | 0.99 | 8 | 9 And the log normal risk model named "my-log-normal-risk-model": 10 | risk aversion | tau | mu | r | sigma | 11 | 0.000001 | 0.00011407711613050422 | 0 | 0.016 | 2.0 | 12 And the markets: 13 | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | 14 | ETH/DEC20 | ETH | ETH | my-log-normal-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring | default-eth-for-future | 0.25 | 0 | default-futures | 15 And the following network parameters are set: 16 | name | value | 17 | market.auction.minimumDuration | 1 | 18 | network.markPriceUpdateMaximumFrequency | 0s | 19 | limits.markets.maxPeggedOrders | 2 | 20 And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC20" 21 22 Scenario: Replicate test called test_TriggerWithMarketOrder 23 Given the parties deposit on asset's general account the following amount: 24 | party | asset | amount | 25 | party1 | ETH | 100000000 | 26 | party2 | ETH | 100000000 | 27 | party3 | ETH | 100000000 | 28 | partyLP | ETH | 100000000 | 29 | aux | ETH | 100000000 | 30 31 When the parties place the following orders: 32 | party | market id | side | volume | price | resulting trades | type | tif | 33 | party1 | ETH/DEC20 | buy | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GFA | 34 | party2 | ETH/DEC20 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GFA | 35 | party1 | ETH/DEC20 | buy | 5 | 95000 | 0 | TYPE_LIMIT | TIF_GTC | 36 | party2 | ETH/DEC20 | sell | 5 | 107000 | 0 | TYPE_LIMIT | TIF_GTC | 37 | party1 | ETH/DEC20 | buy | 1 | 95000 | 0 | TYPE_LIMIT | TIF_GTC | 38 | party2 | ETH/DEC20 | sell | 1 | 107000 | 0 | TYPE_LIMIT | TIF_GTC | 39 And the parties submit the following liquidity provision: 40 | id | party | market id | commitment amount | fee | lp type | 41 | lp1 | party1 | ETH/DEC20 | 16000000 | 0.3 | submission | 42 | lp1 | party1 | ETH/DEC20 | 16000000 | 0.3 | amendment | 43 And the parties place the following pegged iceberg orders: 44 | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | 45 | party1 | ETH/DEC20 | 2 | 1 | buy | BID | 2 | 10 | 46 | party1 | ETH/DEC20 | 2 | 1 | sell | ASK | 13 | 10 | 47 Then the mark price should be "0" for the market "ETH/DEC20" 48 And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC20" 49 50 When the opening auction period ends for market "ETH/DEC20" 51 Then the mark price should be "100000" for the market "ETH/DEC20" 52 And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" 53 54 When time is updated to "2020-10-16T00:00:02Z" 55 And the parties place the following orders with ticks: 56 | party | market id | side | volume | price | resulting trades | type | tif | 57 | party1 | ETH/DEC20 | buy | 1 | 100150 | 0 | TYPE_LIMIT | TIF_GTC | 58 | party2 | ETH/DEC20 | sell | 1 | 100150 | 1 | TYPE_LIMIT | TIF_GTC | 59 ## price bounds are 99771 to 100290 (99845 and 100156) 60 And the parties place the following orders with ticks: 61 | party | market id | side | volume | price | resulting trades | type | tif | expires in | 62 | party3 | ETH/DEC20 | sell | 1 | 99770 | 0 | TYPE_LIMIT | TIF_GTT | 6 | 63 Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" 64 And the mark price should be "100150" for the market "ETH/DEC20" 65 66 When the parties place the following orders with ticks: 67 | party | market id | side | volume | price | resulting trades | type | tif | 68 | party2 | ETH/DEC20 | sell | 5 | 99000 | 0 | TYPE_LIMIT | TIF_GTC | 69 | party1 | ETH/DEC20 | buy | 1 | 99950 | 0 | TYPE_LIMIT | TIF_GTC | 70 Then the market data for the market "ETH/DEC20" should be: 71 | mark price | trading mode | auction trigger | extension trigger | auction end | horizon | ref price | min bound | max bound | 72 | 100150 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | AUCTION_TRIGGER_UNSPECIFIED | 6 | 10 | 100000 | 99711 | 100290 | 73 74 When time is updated to "2020-10-16T00:00:09Z" 75 Then the market data for the market "ETH/DEC20" should be: 76 | mark price | trading mode | auction trigger | extension trigger | auction end | 77 | 100150 | TRADING_MODE_MONITORING_AUCTION | AUCTION_TRIGGER_PRICE | AUCTION_TRIGGER_PRICE | 14 | 78 79 When time is updated to "2020-10-16T00:00:17Z" 80 Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" 81 And the mark price should be "99475" for the market "ETH/DEC20"