code.vegaprotocol.io/vega@v0.79.0/core/integration/features/auctions/2952-opening-auction-uncrossing-decimals.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 remaining volume in the uncrossing range
     2  
     3  
     4    Background:
     5  
     6      Given the following assets are registered:
     7        | id  | decimal places |
     8        | ETH | 5              |
     9      And the simple risk model named "my-simple-risk-model":
    10        | long                   | short                  | max move up | min move down | probability of trading |
    11        | 0.08628781058136630000 | 0.09370922348428490000 | -1          | -1            | 0.2                    |
    12      And the fees configuration named "my-fees-config":
    13        | maker fee | infrastructure fee |
    14        | 0.004     | 0.001              |
    15      And the markets:
    16        | 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      |
    17        | 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 |
    18      And the following network parameters are set:
    19        | name                                    | value |
    20        | limits.markets.maxPeggedOrders          | 2     |
    21  
    22    Scenario: set up 2 parties with balance
    23      # setup accounts
    24      Given the parties deposit on asset's general account the following amount:
    25        | party  | asset | amount        |
    26        | party1 | ETH   | 1000000000000 |
    27        | party2 | ETH   | 1000000000000 |
    28        | party3 | ETH   | 1000000000000 |
    29        | lpprov | ETH   | 1000000000000 |
    30  
    31      # place orders and generate trades - slippage 100
    32      When the parties submit the following liquidity provision:
    33        | id  | party  | market id | commitment amount | fee | lp type    |
    34        | lp1 | lpprov | ETH/DEC20 | 937000000         | 0.1 | submission |
    35        | lp1 | lpprov | ETH/DEC20 | 937000000         | 0.1 | submission |
    36      And the parties place the following pegged iceberg orders:
    37        | party  | market id | peak size | minimum visible size | side | pegged reference | volume | offset | 
    38        | lpprov | ETH/DEC20 | 2         | 1                    | buy  | MID              | 50     | 100    | 
    39        | lpprov | ETH/DEC20 | 2         | 1                    | sell | MID              | 50     | 100    | 
    40  
    41      And the parties place the following orders:
    42        | party  | market id | side | volume | price   | resulting trades | type       | tif     | reference |
    43        | party2 | ETH/DEC20 | buy  | 1      | 950000  | 0                | TYPE_LIMIT | TIF_GTC | t2-b-1    |
    44        | party1 | ETH/DEC20 | buy  | 1      | 1000000 | 0                | TYPE_LIMIT | TIF_GFA | t1-b-1    |
    45        | party2 | ETH/DEC20 | sell | 2      | 1000000 | 0                | TYPE_LIMIT | TIF_GTC | t2-s-1    |
    46      Then the market data for the market "ETH/DEC20" should be:
    47        | trading mode                 | supplied stake | target stake |
    48        | TRADING_MODE_OPENING_AUCTION | 937000000      | 937000000    |
    49  
    50      When the opening auction period ends for market "ETH/DEC20"
    51      Then the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20"
    52  
    53      And the following trades should be executed:
    54        | buyer  | price   | size | seller |
    55        | party1 | 1000000 | 1    | party2 |
    56      And the mark price should be "1000000" for the market "ETH/DEC20"
    57