code.vegaprotocol.io/vega@v0.79.0/core/integration/features/price-mon-trigger-leaving-auction.feature (about) 1 Feature: replicating the incentive panic from issue 10858. 2 Background: 3 Given the following network parameters are set: 4 | name | value | 5 | network.markPriceUpdateMaximumFrequency | 1s | 6 And the price monitoring named "my-price-monitoring": 7 | horizon | probability | auction extension | 8 | 30 | 0.99999 | 1 | 9 | 30 | 0.99999 | 1 | 10 | 30 | 0.99999 | 1 | 11 | 30 | 0.99999 | 1 | 12 | 30 | 0.99999 | 1 | 13 | 30 | 0.99999 | 1 | 14 | 30 | 0.99999 | 1 | 15 | 30 | 0.99999 | 1 | 16 | 30 | 0.99999 | 1 | 17 | 120 | 0.9999999 | 5 | 18 | 120 | 0.9999999 | 5 | 19 | 120 | 0.9999999 | 5 | 20 | 120 | 0.9999999 | 5 | 21 | 120 | 0.9999999 | 5 | 22 | 200 | 0.9999999 | 5 | 23 | 200 | 0.9999999 | 5 | 24 | 200 | 0.9999999 | 5 | 25 | 200 | 0.9999999 | 5 | 26 | 200 | 0.9999999 | 5 | 27 And the liquidity monitoring parameters: 28 | name | triggering ratio | time window | scaling factor | 29 | lqm-params | 0.00 | 24h | 1e-9 | 30 And the simple risk model named "simple-risk-model": 31 | long | short | max move up | min move down | probability of trading | 32 | 0.1 | 0.1 | 100 | -100 | 0.2 | 33 34 # this is just an example of setting up oracles 35 And the composite price oracles from "0xCAFECAFE1": 36 | name | price property | price type | price decimals | 37 | oracle1 | price1.USD.value | TYPE_INTEGER | 0 | 38 | oracle2 | price2.USD.value | TYPE_INTEGER | 0 | 39 | oracle3 | price3.USD.value | TYPE_INTEGER | 0 | 40 41 And the markets: 42 | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | price type | decay weight | decay power | cash amount | source weights | source staleness tolerance | oracle1 | oracle2 | oracle3 | 43 | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | my-price-monitoring | default-eth-for-future | 0.25 | 0 | default-futures | weight | 1 | 1 | 0 | 0,0,0,1,0 | 1m0s,1m0s,1m0s,1m0s,1m0s | oracle1 | oracle2 | oracle3 | 44 45 @MPP 46 Scenario: Oracle data significantly higher than trade price, submitted before leaving opening auction 47 Given the parties deposit on asset's general account the following amount: 48 | party | asset | amount | 49 | buySideProvider | USD | 100000000000 | 50 | sellSideProvider | USD | 100000000000 | 51 | party | USD | 948050 | 52 53 When the parties place the following orders: 54 | party | market id | side | volume | price | resulting trades | type | tif | reference | 55 | buySideProvider | ETH/FEB23 | buy | 10 | 14900 | 0 | TYPE_LIMIT | TIF_GTC | | 56 | buySideProvider | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | 57 | buySideProvider | ETH/FEB23 | buy | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | 58 | party | ETH/FEB23 | sell | 3 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | | 59 | sellSideProvider | ETH/FEB23 | sell | 2 | 15920 | 0 | TYPE_LIMIT | TIF_GTC | sell-2 | 60 | sellSideProvider | ETH/FEB23 | sell | 1 | 15940 | 0 | TYPE_LIMIT | TIF_GTC | sell-3 | 61 | sellSideProvider | ETH/FEB23 | sell | 3 | 15960 | 0 | TYPE_LIMIT | TIF_GTC | sell-4 | 62 | sellSideProvider | ETH/FEB23 | sell | 5 | 15990 | 0 | TYPE_LIMIT | TIF_GTC | sell-5 | 63 | sellSideProvider | ETH/FEB23 | sell | 2 | 16000 | 0 | TYPE_LIMIT | TIF_GTC | sell-7 | 64 | sellSideProvider | ETH/FEB23 | sell | 4 | 16020 | 0 | TYPE_LIMIT | TIF_GTC | sell-8 | 65 | sellSideProvider | ETH/FEB23 | sell | 1 | 100000 | 0 | TYPE_LIMIT | TIF_GTC | | 66 67 68 # AC 0009-MRKP-012 69 When the network moves ahead "2" blocks 70 Then the mark price should be "15900" for the market "ETH/FEB23" 71 And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/FEB23" 72 73 And the parties place the following orders: 74 | party | market id | side | volume | price | resulting trades | type | tif | reference | 75 | buySideProvider | ETH/FEB23 | buy | 1 | 10 | 0 | TYPE_LIMIT | TIF_GTC | cancel1 | 76 | sellSideProvider | ETH/FEB23 | sell | 1 | 10 | 0 | TYPE_LIMIT | TIF_GTC | cancel2 | 77 78 #When the network moves ahead "1" blocks 79 #Then the mark price should be "15900" for the market "ETH/FEB23" 80 81 And the trading mode should be "TRADING_MODE_MONITORING_AUCTION" for the market "ETH/FEB23" 82 83 # Broadcast significantly higher prices via the oracle 84 Then the oracles broadcast data with block time signed with "0xCAFECAFE1": 85 | name | value | time offset | 86 | price1.USD.value | 26000 | 0s | 87 | price2.USD.value | 25900 | 0s | 88 | price3.USD.value | 25940 | 0s | 89 90 Then the parties cancel the following orders: 91 | party | reference | 92 | buySideProvider | cancel1 | 93 | sellSideProvider | cancel2 | 94 95 And the parties place the following orders: 96 | party | market id | side | volume | price | resulting trades | type | tif | reference | 97 | buySideProvider | ETH/FEB23 | buy | 1 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | cancel1 | 98 | sellSideProvider | ETH/FEB23 | sell | 1 | 15900 | 0 | TYPE_LIMIT | TIF_GTC | cancel2 | 99 100 When the network moves ahead "10" blocks 101 Then the mark price should be "15900" for the market "ETH/FEB23" 102 103 When the network moves ahead "2" blocks 104 Then the mark price should be "15900" for the market "ETH/FEB23" 105 106 107