code.vegaprotocol.io/vega@v0.79.0/core/integration/features/price_monitoring/3362-failing-system-tests-trigger-with-amend.feature (about) 1 Feature: Replicate failing system tests after changes to price monitoring (trigger auction with amends) 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 ## price bounds are 99711 - 99845 - 100156 - 100290 55 ## sell order violates 1 price bound -> 6 second auction 56 When the parties place the following orders with ticks: 57 | party | market id | side | volume | price | resulting trades | type | tif | reference | 58 | party2 | ETH/DEC20 | sell | 3 | 99840 | 0 | TYPE_LIMIT | TIF_GTC | t2-s-1 | 59 | party3 | ETH/DEC20 | buy | 5 | 99600 | 0 | TYPE_LIMIT | TIF_GTC | t3-b-1 | 60 Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" 61 And the mark price should be "100000" for the market "ETH/DEC20" 62 63 When the parties amend the following orders: 64 | party | reference | price | size delta | tif | 65 | party3 | t3-b-1 | 100100 | 0 | TIF_GTC | 66 Then the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/DEC20" 67 And the mark price should be "100000" for the market "ETH/DEC20" 68 69 ## We've only violated a single price boundary, so auction should be ending in 6 seconds 70 ## Expected mid-price: 99970 71 When time is updated to "2020-10-16T00:00:09Z" 72 Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20" 73 And the mark price should be "99970" for the market "ETH/DEC20"