code.vegaprotocol.io/vega@v0.79.0/core/integration/features/price_monitoring/3291-amend-trigger-price-auction.feature (about)

     1  Feature: Amend order to trigger price monitoring auction
     2  
     3    Background:
     4      Given time is updated to "2020-10-16T00:00:00Z"
     5      And the price monitoring named "my-price-monitoring":
     6        | horizon | probability | auction extension |
     7        | 5       | 0.95        | 6                 |
     8        | 10      | 0.99        | 8                 |
     9      And the markets:
    10        | id        | quote name | asset | risk model             | margin calculator         | auction duration | fees         | price monitoring    | data source config     | linear slippage factor | quadratic slippage factor | sla params      |
    11        | ETH/DEC20 | ETH        | ETH   | system-test-risk-model | default-margin-calculator | 1                | default-none | my-price-monitoring | default-eth-for-future | 0.25                   | 0                         | default-futures |
    12      And the following network parameters are set:
    13        | name                                    | value |
    14        | market.auction.minimumDuration          | 6     |
    15        | network.markPriceUpdateMaximumFrequency | 0s    |
    16        | limits.markets.maxPeggedOrders          | 2     |
    17  
    18    Scenario: Upper bound breached
    19      Given the parties deposit on asset's general account the following amount:
    20        | party     | asset | amount       |
    21        | party1    | ETH   | 100000000000 |
    22        | party2    | ETH   | 100000000000 |
    23        | auxiliary | ETH   | 100000000000 |
    24        | aux2      | ETH   | 100000000000 |
    25        | lpprov    | ETH   | 100000000000 |
    26  
    27      When the parties submit the following liquidity provision:
    28        | id  | party  | market id | commitment amount | fee | lp type    |
    29        | lp1 | lpprov | ETH/DEC20 | 90000000          | 0.1 | submission |
    30        | lp1 | lpprov | ETH/DEC20 | 90000000          | 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      # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction
    36      Then the parties place the following orders:
    37        | party     | market id | side | volume | price    | resulting trades | type       | tif     |
    38        | auxiliary | ETH/DEC20 | buy  | 1      | 1        | 0                | TYPE_LIMIT | TIF_GTC |
    39        | auxiliary | ETH/DEC20 | sell | 1      | 10000000 | 0                | TYPE_LIMIT | TIF_GTC |
    40        | auxiliary | ETH/DEC20 | sell | 1      | 5670000  | 0                | TYPE_LIMIT | TIF_GTC |
    41        | aux2      | ETH/DEC20 | buy  | 1      | 5670000  | 0                | TYPE_LIMIT | TIF_GTC |
    42      Then the opening auction period ends for market "ETH/DEC20"
    43      And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20"
    44  
    45      When the parties place the following orders with ticks:
    46        | party  | market id | side | volume | price   | resulting trades | type       | tif     | reference |
    47        | party1 | ETH/DEC20 | sell | 1      | 5670000 | 0                | TYPE_LIMIT | TIF_GTC | ref-1     |
    48        | party2 | ETH/DEC20 | buy  | 10     | 5670010 | 1                | TYPE_LIMIT | TIF_GTC | ref-2     |
    49  
    50      Then the mark price should be "5670000" for the market "ETH/DEC20"
    51      And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20"
    52  
    53      When the parties amend the following orders:
    54        | party  | reference | price   | size delta | tif     |
    55        | party2 | ref-2     | 5670005 | 0          | TIF_GTC |
    56      Then the mark price should be "5670000" for the market "ETH/DEC20"
    57      And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC20"