code.vegaprotocol.io/vega@v0.79.0/core/integration/features/auctions/2952-opening-auction-uncrossing.feature (about)

     1  Feature: Set up a market, with an opening auction, then uncross the book. Make sure opening auction can end if we have remaingin volume in the uncrossing range
     2  
     3  
     4    Background:
     5  
     6      And the simple risk model named "my-simple-risk-model":
     7        | long                   | short                  | max move up | min move down | probability of trading |
     8        | 0.08628781058136630000 | 0.09370922348428490000 | -1          | -1            | 0.2                    |
     9      And the fees configuration named "my-fees-config":
    10        | maker fee | infrastructure fee |
    11        | 0.004     | 0.001              |
    12      And the markets:
    13        | id        | quote name | asset | risk model           | margin calculator         | auction duration | fees           | price monitoring | data source config     | linear slippage factor | quadratic slippage factor | sla params      |
    14        | ETH/DEC20 | ETH        | ETH   | my-simple-risk-model | default-margin-calculator | 1                | my-fees-config | default-none     | default-eth-for-future | 0.25                   | 0                         | default-futures |
    15      And the following network parameters are set:
    16        | name                                    | value |
    17        | limits.markets.maxPeggedOrders          | 2     |
    18  
    19    Scenario: set up 2 parties with balance
    20      # setup accounts
    21      Given the parties deposit on asset's general account the following amount:
    22        | party  | asset | amount     |
    23        | party1 | ETH   | 1000000000 |
    24        | party2 | ETH   | 1000000000 |
    25        | party3 | ETH   | 1000000000 |
    26        | lpprov | ETH   | 1000000000 |
    27  
    28      When the parties submit the following liquidity provision:
    29        | id  | party  | market id | commitment amount | fee | lp type    |
    30        | lp1 | lpprov | ETH/DEC20 | 937000            | 0.1 | submission |
    31        | lp1 | lpprov | ETH/DEC20 | 937000            | 0.1 | submission |
    32      And the parties place the following pegged iceberg orders:
    33        | party  | market id | peak size | minimum visible size | side | pegged reference | volume     | offset |
    34        | lpprov | ETH/DEC20 | 2         | 1                    | buy  | MID              | 50         | 100    |
    35        | lpprov | ETH/DEC20 | 2         | 1                    | sell | MID              | 50         | 100    |
    36  
    37      # place orders and generate trades - slippage 100
    38      And the parties place the following orders:
    39        | party  | market id | side | volume | price   | resulting trades | type       | tif     | reference |
    40        | party2 | ETH/DEC20 | buy  | 1      | 950000  | 0                | TYPE_LIMIT | TIF_GTC | t2-b-1    |
    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 | 937000         | 937000       |
    46  
    47      When the opening auction period ends for market "ETH/DEC20"
    48  
    49      And the following trades should be executed:
    50        | buyer  | price   | size | seller |
    51        | party1 | 1000000 | 1    | party2 |
    52      And the mark price should be "1000000" for the market "ETH/DEC20"