code.vegaprotocol.io/vega@v0.79.0/core/integration/features/liquidity-provision/liquidity_provision_simple_pdp.feature (about)

     1  Feature: Test LP orders
     2  
     3    Background:
     4  
     5      Given the markets:
     6        | id        | quote name | asset | risk model                  | margin calculator         | auction duration | fees         | price monitoring | data source config     | position decimal places | linear slippage factor | quadratic slippage factor | sla params      |
     7        | ETH/DEC19 | ETH        | ETH   | default-simple-risk-model-3 | default-margin-calculator | 1                | default-none | default-none     | default-eth-for-future | 2                       | 0.25                   | 0                         | default-futures |
     8      And the following network parameters are set:
     9        | name                                    | value |
    10        | market.auction.minimumDuration          | 1     |
    11        | network.markPriceUpdateMaximumFrequency | 0s    |
    12        | validators.epoch.length                 | 1s    |
    13      And the average block duration is "1"
    14  
    15    Scenario: create liquidity provisions
    16      Given the parties deposit on asset's general account the following amount:
    17        | party            | asset | amount    |
    18        | party1           | ETH   | 100000000 |
    19        | sellSideProvider | ETH   | 100000000 |
    20        | buySideProvider  | ETH   | 100000000 |
    21        | auxiliary        | ETH   | 100000000 |
    22        | aux2             | ETH   | 100000000 |
    23        | lpprov           | ETH   | 100000000 |
    24  
    25      When the parties place the following orders:
    26        | party     | market id | side | volume | price | resulting trades | type       | tif     | reference |
    27        | auxiliary | ETH/DEC19 | buy  | 100    | 80    | 0                | TYPE_LIMIT | TIF_GTC | oa-b-1    |
    28        | auxiliary | ETH/DEC19 | sell | 100    | 120   | 0                | TYPE_LIMIT | TIF_GTC | oa-s-1    |
    29        | aux2      | ETH/DEC19 | buy  | 100    | 100   | 0                | TYPE_LIMIT | TIF_GTC | oa-b-2    |
    30        | auxiliary | ETH/DEC19 | sell | 100    | 100   | 0                | TYPE_LIMIT | TIF_GTC | oa-s-2    |
    31      And the parties submit the following liquidity provision:
    32        | id  | party  | market id | commitment amount | fee | lp type    |
    33        | lp1 | lpprov | ETH/DEC19 | 900000            | 0.1 | submission |
    34        | lp1 | lpprov | ETH/DEC19 | 900000            | 0.1 | submission |
    35      Then the opening auction period ends for market "ETH/DEC19"
    36      And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19"
    37  
    38      When the parties place the following orders with ticks:
    39        | party            | market id | side | volume | price | resulting trades | type       | tif     | reference       |
    40        | sellSideProvider | ETH/DEC19 | sell | 100000 | 120   | 0                | TYPE_LIMIT | TIF_GTC | sell-provider-1 |
    41        | buySideProvider  | ETH/DEC19 | buy  | 100000 | 80    | 0                | TYPE_LIMIT | TIF_GTC | buy-provider-1  |
    42        | party1           | ETH/DEC19 | buy  | 500    | 110   | 0                | TYPE_LIMIT | TIF_GTC | lp-ref-1        |
    43        | party1           | ETH/DEC19 | sell | 500    | 120   | 0                | TYPE_LIMIT | TIF_GTC | lp-ref-2        |
    44  
    45      Then the market data for the market "ETH/DEC19" should be:
    46        | static mid price | best static bid price | best static offer price |
    47        | 115              | 110                   | 120                     |
    48  
    49      Then the parties submit the following liquidity provision:
    50        | id  | party  | market id | commitment amount | fee | lp type    |
    51        | lp2 | party1 | ETH/DEC19 | 50000             | 0.1 | submission |
    52        | lp2 | party1 | ETH/DEC19 | 50000             | 0.1 | submission |
    53        
    54      Then the liquidity provisions should have the following states:
    55        | id  | party  | market    | commitment amount | status         |
    56        | lp2 | party1 | ETH/DEC19 | 50000             | STATUS_PENDING |
    57  
    58      # TODO (WG 31/07/23): why 3?
    59      When the network moves ahead "3" blocks
    60      Then the liquidity provisions should have the following states:
    61        | id  | party  | market    | commitment amount | status        |
    62        | lp2 | party1 | ETH/DEC19 | 50000             | STATUS_ACTIVE |