code.vegaprotocol.io/vega@v0.79.0/core/integration/features/spot/orders/0026-AUCT-029.feature (about) 1 Feature: Spot market 2 3 Background: 4 Given time is updated to "2024-01-01T00:00:00Z" 5 6 Given the following network parameters are set: 7 | name | value | 8 | network.markPriceUpdateMaximumFrequency | 0s | 9 | market.value.windowLength | 1h | 10 11 Given the following assets are registered: 12 | id | decimal places | 13 | ETH | 2 | 14 | BTC | 2 | 15 16 Given the fees configuration named "fees-config-1": 17 | maker fee | infrastructure fee | 18 | 0.01 | 0.03 | 19 Given the log normal risk model named "lognormal-risk-model-1": 20 | risk aversion | tau | mu | r | sigma | 21 | 0.001 | 0.01 | 0 | 0.0 | 1.2 | 22 And the price monitoring named "price-monitoring-1": 23 | horizon | probability | auction extension | 24 | 60 | 0.999 | 1 | 25 26 And the spot markets: 27 | id | name | base asset | quote asset | risk model | auction duration | fees | price monitoring | decimal places | position decimal places | sla params | 28 | BTC/ETH | BTC/ETH | BTC | ETH | lognormal-risk-model-1 | 100 | fees-config-1 | price-monitoring-1 | 2 | 2 | default-basic | 29 30 # setup accounts 31 Given the parties deposit on asset's general account the following amount: 32 | party | asset | amount | 33 | party1 | ETH | 10000 | 34 | party2 | ETH | 10000 | 35 | party4 | BTC | 1000 | 36 | party5 | BTC | 1000 | 37 And the average block duration is "1" 38 39 Scenario: A market with default trading mode "continuous trading" will start with an opening auction. The opening auction will 40 run from the close of voting on the market proposal (assumed to pass successfully) until: the enactment time assuming 41 there are orders crossing on the book, there is no need for the supplied liquidity to exceed a threshold to exit an auction: (0026-AUCT-029) 42 43 # Place some orders that cross 44 And the parties place the following orders: 45 | party | market id | side | volume | price | resulting trades | type | tif | reference | 46 | party1 | BTC/ETH | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | buy1 | 47 | party5 | BTC/ETH | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | sell1 | 48 49 # Check nothing is crossed before the end of the auction 50 When the network moves ahead "50" blocks 51 Then the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "BTC/ETH" 52 53 # Now we have gone past the enactment time, we should come out of auction 54 When the network moves ahead "52" blocks 55 Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "BTC/ETH" 56 57 58 Scenario: No crossed orders, no leaving the auction 59 60 # Place some orders that don't cross so we can't leave auction 61 And the parties place the following orders: 62 | party | market id | side | volume | price | resulting trades | type | tif | reference | 63 | party1 | BTC/ETH | buy | 1 | 999 | 0 | TYPE_LIMIT | TIF_GFA | buy1 | 64 | party5 | BTC/ETH | sell | 1 | 1001 | 0 | TYPE_LIMIT | TIF_GFA | sell1 | 65 66 # After the enactment time has expired, the auction can't leave 67 When the network moves ahead "102" blocks 68 Then the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "BTC/ETH"