code.vegaprotocol.io/vega@v0.79.0/core/integration/features/mark-price/0009-MRKP-026.feature (about) 1 Feature: Mark price calculation on auction exit 2 3 Background: 4 Given the average block duration is "1" 5 Given the following network parameters are set: 6 | name | value | 7 | network.markPriceUpdateMaximumFrequency | 5s | 8 And the liquidity monitoring parameters: 9 | name | triggering ratio | time window | scaling factor | 10 | lqm-params | 0.00 | 24h | 1e-9 | 11 And the simple risk model named "simple-risk-model": 12 | long | short | max move up | min move down | probability of trading | 13 | 0.1 | 0.1 | 100 | -100 | 0.2 | 14 And the price monitoring named "price-monitoring": 15 | horizon | probability | auction extension | 16 | 60 | 0.99 | 10 | 17 And the markets: 18 | 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 | 19 | ETH/FEB23 | ETH | USD | lqm-params | simple-risk-model | default-margin-calculator | 1 | default-none | price-monitoring | default-eth-for-future | 0.25 | 0 | default-futures | weight | 0 | 0 | 100 | 0,1,0 | 1m0s,1m0s,1m0s | 20 21 Scenario: Order book price set to indicative price during auctions and mark price calcualted on auction exit (0009-MRKP-024)(0009-MRKP-025)(0009-MRKP-026)(0009-MRKP-027) 22 Given the parties deposit on asset's general account the following amount: 23 | party | asset | amount | 24 | buySideProvider | USD | 100000000000 | 25 | sellSideProvider | USD | 100000000000 | 26 | aux1 | USD | 100000000000 | 27 | aux2 | USD | 100000000000 | 28 And the parties place the following orders: 29 | party | market id | side | volume | price | resulting trades | type | tif | reference | 30 | buySideProvider | ETH/FEB23 | buy | 10 | 14970 | 0 | TYPE_LIMIT | TIF_GTC | bestBid | 31 | aux1 | ETH/FEB23 | buy | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | 32 | aux2 | ETH/FEB23 | sell | 1 | 15000 | 0 | TYPE_LIMIT | TIF_GTC | | 33 | sellSideProvider | ETH/FEB23 | sell | 10 | 15090 | 0 | TYPE_LIMIT | TIF_GTC | bestAsk | 34 When the opening auction period ends for market "ETH/FEB23" 35 # the book price at auction uncrossing should be set to the price of the uncrossing trade 36 Then the mark price should be "15000" for the market "ETH/FEB23" 37 38 When the network moves ahead "6" blocks 39 Then the mark price should be "15030" for the market "ETH/FEB23" 40 41 Given the market data for the market "ETH/FEB23" should be: 42 | mark price | trading mode | horizon | ref price | min bound | max bound | 43 | 15030 | TRADING_MODE_CONTINUOUS | 60 | 15000 | 14900 | 15100 | 44 And the parties amend the following orders: 45 | party | reference | price | size delta | tif | 46 | sellSideProvider | bestAsk | 15190 | 0 | TIF_GTC | 47 | buySideProvider | bestBid | 15070 | 0 | TIF_GTC | 48 And the parties place the following orders: 49 | party | market id | side | volume | price | resulting trades | type | tif | reference | 50 | aux1 | ETH/FEB23 | buy | 1 | 15125 | 0 | TYPE_LIMIT | TIF_GTC | auctionBid | 51 | aux2 | ETH/FEB23 | sell | 1 | 15125 | 0 | TYPE_LIMIT | TIF_GTC | auctionAsk | 52 When the network moves ahead "10" blocks 53 Then the market data for the market "ETH/FEB23" should be: 54 | mark price | trading mode | 55 | 15030 | TRADING_MODE_MONITORING_AUCTION | 56 Given the parties amend the following orders: 57 | party | reference | price | size delta | tif | 58 | aux1 | auctionBid | 15100 | 0 | TIF_GTC | 59 | aux2 | auctionAsk | 15100 | 0 | TIF_GTC | 60 When the network moves ahead "1" blocks 61 Then the market data for the market "ETH/FEB23" should be: 62 | mark price | trading mode | 63 | 15100 | TRADING_MODE_CONTINUOUS | 64 65 66 67 68 69 70 71 72