code.vegaprotocol.io/vega@v0.79.0/core/integration/features/price_monitoring/LDO_USDT-perp-bounds.feature (about)

     1  Feature: Reproduce LDO/USDT-PERP market configuration as voted in on mainnet on February 4th 2024
     2  
     3    Background:
     4      Given time is updated to "2024-02-04T16:00:00Z"
     5      And the following assets are registered:
     6        | id    | decimal places |
     7        | TUSDT | 6              |
     8      And the log normal risk model named "log-normal-risk-model":
     9        | risk aversion | tau       | mu | r | sigma |
    10        | 0.000001      | 0.0000071 | 0  | 0 | 1.5   |
    11      And the margin calculator named "margin-calculator":
    12        | search factor | initial factor | release factor |
    13        | 1.1           | 1.5            | 1.7            |
    14      And the fees configuration named "fees":
    15        | maker fee | infrastructure fee |
    16        | 0.0001    | 0.0003             |
    17      And the price monitoring named "price-monitoring":
    18        | horizon | probability | auction extension |
    19        | 360     | 0.9999999   | 120               |
    20        | 1440    | 0.9999999   | 180               |
    21        | 4320    | 0.9999999   | 300               |
    22        | 21600   | 0.9999999   | 86400             |
    23      And the liquidity monitoring parameters:
    24        | name       | triggering ratio | time window | scaling factor | auction extension |
    25        | lqm-params | 0.9              | 3600s       | 0.05           | 1                 |
    26      And the liquidity sla params named "sla":
    27        | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor |
    28        | 0.03        | 0.85                         | 1                             | 0.5                    |
    29      And the perpetual oracles from "0xCAFECAFE1":
    30        | name        | asset | settlement property | settlement type | schedule property | schedule type  | margin funding factor | interest rate | clamp lower bound | clamp upper bound | quote name | settlement decimals |
    31        | perp-oracle | TUSDT | ldo.price           | TYPE_INTEGER    | perp.funding.cue  | TYPE_TIMESTAMP | 0.9                   | 0.1095        | -0.0005           | 0.0005            | USDT       | 18                  |
    32      And the markets:
    33        | id            | quote name | asset | risk model            | margin calculator | auction duration | fees | price monitoring | data source config | decimal places | position decimal places | linear slippage factor | quadratic slippage factor | sla params | market type |
    34        | LDO/USDT-PERP | USDT       | TUSDT | log-normal-risk-model | margin-calculator | 3600             | fees | price-monitoring | perp-oracle        | 4              | 1                       | 0.001                  | 0                         | sla        | perp        |
    35      And the following network parameters are set:
    36        | name                           | value |
    37        | market.auction.minimumDuration | 30    |
    38        | limits.markets.maxPeggedOrders | 20    |
    39  
    40    Scenario: Check the resulting bounds
    41      
    42      Given the parties deposit on asset's general account the following amount:
    43        | party  | asset | amount          |
    44        | party1 | TUSDT | 10000000000000  |
    45        | party2 | TUSDT | 10000000000000  |
    46        | aux    | TUSDT | 100000000000000 |
    47        | aux2   | TUSDT | 100000000000000 |
    48        | lp     | TUSDT | 100000000000000 |
    49  
    50      When the parties submit the following liquidity provision:
    51        | id  | party | market id     | commitment amount | fee | lp type    |
    52        | lp1 | lp    | LDO/USDT-PERP | 90000000          | 0.1 | submission |
    53        | lp1 | lp    | LDO/USDT-PERP | 90000000          | 0.1 | submission |
    54      And the parties place the following pegged iceberg orders:
    55        | party | market id     | peak size | minimum visible size | side | pegged reference | volume     | offset |
    56        | lp    | LDO/USDT-PERP | 2         | 1                    | buy  | BID              | 50         | 100    |
    57        | lp    | LDO/USDT-PERP | 2         | 1                    | sell | ASK              | 50         | 100    |
    58      # place auxiliary orders so we always have best bid and best offer as to not trigger the liquidity auction
    59      And the parties place the following orders:
    60        | party | market id     | side | volume | price  | resulting trades | type       | tif     |
    61        | aux   | LDO/USDT-PERP | buy  | 1      | 1      | 0                | TYPE_LIMIT | TIF_GTC |
    62        | aux   | LDO/USDT-PERP | sell | 1      | 200000 | 0                | TYPE_LIMIT | TIF_GTC |
    63        | aux2  | LDO/USDT-PERP | buy  | 1      | 32000  | 0                | TYPE_LIMIT | TIF_GTC |
    64        | aux   | LDO/USDT-PERP | sell | 1      | 32000  | 0                | TYPE_LIMIT | TIF_GTC |
    65      
    66      When the opening auction period ends for market "LDO/USDT-PERP"
    67      Then the market data for the market "LDO/USDT-PERP" should be:
    68        | horizon | ref price | min bound | max bound |
    69        | 360     | 32000     | 31148     | 32874     |  
    70        | 1440    | 32000     | 30318     | 33772     |
    71        | 4320    | 32000     | 29140     | 35130     |
    72        | 21600   | 32000     | 25944     | 39409     |