code.vegaprotocol.io/vega@v0.79.0/core/integration/features/spot/accounts_and_fees/0013-ACCT-030.feature (about)

     1  Feature: Spot market
     2  
     3    Scenario: Every party that submits an order on a Spot market will have a holding account
     4              created for the relevant market asset pair. (0013-ACCT-030)
     5  
     6    Background:
     7  
     8      Given the following network parameters are set:
     9        | name                                                | value |
    10        | network.markPriceUpdateMaximumFrequency             | 0s    |
    11        | market.value.windowLength                           | 1h    |
    12      
    13      Given the following assets are registered:
    14        | id  | decimal places |
    15        | ETH | 2              |
    16        | BTC | 2              |
    17  
    18      Given the fees configuration named "fees-config-1":
    19        | maker fee | infrastructure fee |
    20        | 0.01      | 0.03               |
    21      Given the log normal risk model named "lognormal-risk-model-1":
    22        | risk aversion | tau  | mu | r   | sigma |
    23        | 0.001         | 0.01 | 0  | 0.0 | 1.2   |
    24      And the price monitoring named "price-monitoring-1":
    25        | horizon | probability | auction extension |
    26        | 360000  | 0.999       | 1                 |
    27  
    28      And the spot markets:
    29        | id      | name    | base asset | quote asset | risk model             | auction duration | fees          | price monitoring   | decimal places | position decimal places | sla params    |
    30        | BTC/ETH | BTC/ETH | BTC        | ETH         | lognormal-risk-model-1 | 1                | fees-config-1 | price-monitoring-1 | 2              | 2                       | default-basic |
    31  
    32      # setup accounts
    33      Given the parties deposit on asset's general account the following amount:
    34        | party  | asset | amount |
    35        | party1 | ETH   | 10000  |
    36        | party2 | BTC   | 100    |
    37      And the average block duration is "1"
    38  
    39      # No orders have been places so we shouldn't have any holding accounts
    40      And "party1" should have only the following accounts:
    41        | type                 | asset   | amount |
    42        | ACCOUNT_TYPE_GENERAL | ETH     | 10000  |
    43  
    44      And "party2" should have only the following accounts:
    45        | type                 | asset   | amount |
    46        | ACCOUNT_TYPE_GENERAL | BTC     | 100    |
    47  
    48      # Place some orders to create the holding accounts
    49      And the parties place the following orders:
    50        | party  | market id | side | volume | price | resulting trades | type       | tif     | reference       |
    51        | party1 | BTC/ETH   | buy  | 100    | 2000  | 0                | TYPE_LIMIT | TIF_GFA | party-order1111 |
    52        | party2 | BTC/ETH   | sell | 100    | 3000  | 0                | TYPE_LIMIT | TIF_GTC | party-order2    |
    53  
    54      And "party1" should have only the following accounts:
    55        | type                 | asset   | 
    56        | ACCOUNT_TYPE_GENERAL | ETH     | 
    57        | ACCOUNT_TYPE_HOLDING | ETH     | 
    58  
    59      And "party2" should have only the following accounts:
    60        | type                 | asset   | 
    61        | ACCOUNT_TYPE_GENERAL | BTC     | 
    62        | ACCOUNT_TYPE_HOLDING | BTC     | 
    63