code.vegaprotocol.io/vega@v0.79.0/core/integration/features/auctions/0026-AUCT-039.feature (about)

     1  Feature: Set up a market, with an opening auction, then uncross the book. Make sure opening auction can end even if we don't have best bid/ask after uncrossing.
     2  
     3  
     4    Background:
     5      Given the following assets are registered:
     6        | id  | decimal places |
     7        | ETH | 5              |
     8      And the simple risk model named "my-simple-risk-model":
     9        | long                   | short                  | max move up | min move down | probability of trading |
    10        | 0.08628781058136630000 | 0.09370922348428490000 | -1          | -1            | 0.2                    |
    11      And the fees configuration named "my-fees-config":
    12        | maker fee | infrastructure fee |
    13        | 0.004     | 0.001              |
    14      And the markets:
    15        | id        | quote name | asset | risk model           | margin calculator         | auction duration | fees           | price monitoring | data source config     | decimal places | linear slippage factor | quadratic slippage factor | sla params      |
    16        | ETH/DEC20 | ETH        | ETH   | my-simple-risk-model | default-margin-calculator | 1                | my-fees-config | default-none     | default-eth-for-future | 2              | 0.25                   | 0                         | default-futures |
    17      And the following network parameters are set:
    18        | name                                    | value |
    19        | limits.markets.maxPeggedOrders          | 2     |
    20      And the average block duration is "1"
    21      And the parties deposit on asset's general account the following amount:
    22        | party  | asset | amount        |
    23        | party1 | ETH   | 1000000000000 |
    24        | party2 | ETH   | 1000000000000 |
    25        | party3 | ETH   | 1000000000000 |
    26        | lpprov | ETH   | 1000000000000 |
    27      And the parties submit the following liquidity provision:
    28        | id  | party  | market id | commitment amount | fee | lp type    |
    29        | lp1 | lpprov | ETH/DEC20 | 937000000         | 0.1 | submission |
    30        | lp1 | lpprov | ETH/DEC20 | 937000000         | 0.1 | submission |
    31      And the parties place the following pegged iceberg orders:
    32        | party  | market id | peak size | minimum visible size | side | pegged reference | volume | offset | 
    33        | lpprov | ETH/DEC20 | 2         | 1                    | buy  | BID              | 50     | 100    | 
    34        | lpprov | ETH/DEC20 | 2         | 1                    | sell | ASK              | 50     | 100    | 
    35  
    36    @NewAuct
    37    Scenario: 0026-AUCT-039: No best bid after leaving opening auction. Also covers 0016-PFUT-025: normal futures can be submitted without specifying the capped futures fields - all futures tests do this.
    38      # place orders and generate trades - slippage 100
    39      When the parties place the following orders:
    40        | party  | market id | side | volume | price   | resulting trades | type       | tif     | reference |
    41        | party1 | ETH/DEC20 | buy  | 1      | 1000000 | 0                | TYPE_LIMIT | TIF_GFA | t1-b-1    |
    42        | party2 | ETH/DEC20 | sell | 2      | 1000000 | 0                | TYPE_LIMIT | TIF_GTC | t2-s-1    |
    43      Then the market data for the market "ETH/DEC20" should be:
    44        | trading mode                 | supplied stake | target stake |
    45        | TRADING_MODE_OPENING_AUCTION | 937000000      | 937000000    |
    46  
    47      When the network moves ahead "2" blocks
    48      Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20"
    49      #And debug detailed orderbook volumes for market "ETH/DEC20"
    50      And the order book should have the following volumes for market "ETH/DEC20":
    51        | volume | price   | side |
    52        | 1      | 1000000 | sell |
    53        | 2      | 1000100 | sell |
    54  
    55      And the following trades should be executed:
    56        | buyer  | price   | size | seller |
    57        | party1 | 1000000 | 1    | party2 |
    58      And the mark price should be "1000000" for the market "ETH/DEC20"
    59  
    60  
    61    @NewAuct
    62    Scenario: 0026-AUCT-040: No best ask after leaving opening auction.
    63      # place orders and generate trades - slippage 100
    64      When the parties place the following orders:
    65        | party  | market id | side | volume | price  | resulting trades | type       | tif     | reference |
    66        | party1 | ETH/DEC20 | buy  | 2      | 999500 | 0                | TYPE_LIMIT | TIF_GTC | t1-b-1    |
    67        | party2 | ETH/DEC20 | sell | 1      | 999500 | 0                | TYPE_LIMIT | TIF_GFA | t2-s-1    |
    68      Then the market data for the market "ETH/DEC20" should be:
    69        | trading mode                 | supplied stake | target stake |
    70        | TRADING_MODE_OPENING_AUCTION | 937000000      | 936531500    |
    71  
    72      When the network moves ahead "2" blocks
    73      Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20"
    74      #And debug detailed orderbook volumes for market "ETH/DEC20"
    75      And the order book should have the following volumes for market "ETH/DEC20":
    76        | volume | price  | side |
    77        | 1      | 999500 | buy  |
    78  
    79      And the following trades should be executed:
    80        | buyer  | price  | size | seller |
    81        | party1 | 999500 | 1    | party2 |
    82      And the mark price should be "999500" for the market "ETH/DEC20"
    83