code.vegaprotocol.io/vega@v0.79.0/core/integration/features/verified/quick-test.feature (about) 1 Feature: Quick-test 2 3 Scenario: 4 And the average block duration is "1" 5 And the following network parameters are set: 6 | name | value | 7 | market.fee.factors.makerFee | 0 | 8 | market.fee.factors.infrastructureFee | 0 | 9 | network.markPriceUpdateMaximumFrequency | 10s | 10 | validators.epoch.length | 1000s | 11 12 # Initialise the markets 13 And the following assets are registered: 14 | id | decimal places | quantum | 15 | USD-1-10 | 0 | 1 | 16 And the simple risk model named "simple-risk-model": 17 | long | short | max move up | min move down | probability of trading | 18 | 0.01 | 0.01 | 100 | -100 | 0.2 | 19 And the margin calculator named "margin-calculator": 20 | search factor | initial factor | release factor | 21 | 1 | 1 | 1 | 22 And the markets: 23 | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | decimal places | position decimal places | 24 | ETH/USD-1-10 | ETH | USD-1-10 | simple-risk-model | margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1e-3 | 0 | default-futures | 0 | 0 | 25 26 # Initialise the parties 27 Given the parties deposit on asset's general account the following amount: 28 | party | asset | amount | 29 | aux1 | USD-1-10 | 1000000000000 | 30 | aux2 | USD-1-10 | 1000000000000 | 31 | party1 | USD-1-10 | 1000000000000 | 32 | party2 | USD-1-10 | 1000000000000 | 33 | party3 | USD-1-10 | 1000000000000 | 34 | a3c024b4e23230c89884a54a813b1ecb4cb0f827a38641c66eeca466da6b2ddf | USD-1-10 | 1000000000000 | 35 36 37 38 39 # Exit opening auctions 40 When the parties place the following orders: 41 | party | market id | side | volume | price | resulting trades | type | tif | 42 | aux1 | ETH/USD-1-10 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | 43 | aux2 | ETH/USD-1-10 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | 44 And the opening auction period ends for market "ETH/USD-1-10" 45 And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/USD-1-10" 46 When the parties place the following orders: 47 | party | market id | side | volume | price | resulting trades | type | tif | 48 | aux1 | ETH/USD-1-10 | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | 49 | aux2 | ETH/USD-1-10 | buy | 1 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | 50 When the network moves ahead "11" blocks 51 Then the parties should have the following account balances: 52 | party | asset | market id | margin | general | 53 | aux1 | USD-1-10 | ETH/USD-1-10 | 0 | 1000000000000 | 54 | aux2 | USD-1-10 | ETH/USD-1-10 | 0 | 1000000000000 | 55 56 57 58 59 60 Given the parties place the following orders: 61 | party | market id | side | volume | price | resulting trades | type | tif | 62 | party1 | ETH/USD-1-10 | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | 63 | party2 | ETH/USD-1-10 | sell | 1 | 1000 | 1 | TYPE_LIMIT | TIF_GTC | 64 When the network moves ahead "1" blocks 65 Then the parties should have the following account balances: 66 | party | asset | market id | margin | general | 67 | party1 | USD-1-10 | ETH/USD-1-10 | 10 | 999999999990 | 68 | party2 | USD-1-10 | ETH/USD-1-10 | 10 | 999999999990 | 69 70 71 # # X 72 Given the parties place the following orders: 73 | party | market id | side | volume | price | resulting trades | type | tif | 74 | party1 | ETH/USD-1-10 | sell | 1 | 990 | 0 | TYPE_LIMIT | TIF_GTC | 75 | party3 | ETH/USD-1-10 | buy | 1 | 990 | 1 | TYPE_LIMIT | TIF_GTC | 76 When the network moves ahead "1" blocks 77 Then the parties should have the following account balances: 78 | party | asset | market id | margin | general | 79 | party1 | USD-1-10 | ETH/USD-1-10 | 0 | 1000000000000 | 80 | party2 | USD-1-10 | ETH/USD-1-10 | 10 | 999999999990 | 81 | party3 | USD-1-10 | ETH/USD-1-10 | 10 | 999999999990 | 82 83 When the parties withdraw the following assets: 84 | party | asset | amount | error | 85 | party1 | USD-1-10 | 1000000000000 | | 86 87 88 Then the network moves ahead "100" blocks 89 Then debug transfers 90 Then the parties should have the following account balances: 91 | party | asset | market id | margin | general | 92 | party1 | USD-1-10 | ETH/USD-1-10 | 0 | 0 | 93 | party2 | USD-1-10 | ETH/USD-1-10 | 11 | 999999999989 | 94 | party3 | USD-1-10 | ETH/USD-1-10 | 11 | 999999999989 |