code.vegaprotocol.io/vega@v0.79.0/core/integration/features/accounts/building_trader_accounts.feature (about)

     1  Feature: Test party accounts
     2  
     3    Background:
     4      Given the markets:
     5        | id           | quote name | asset | risk model                  | margin calculator         | auction duration | fees         | price monitoring | data source config     | linear slippage factor | quadratic slippage factor | sla params      |
     6        | ETH/DEC19    | ETH        | ETH   | default-simple-risk-model-3 | default-margin-calculator | 0                | default-none | default-none     | default-eth-for-future | 0.25                   | 0                         | default-futures |
     7        | GBPUSD/DEC19 | USD        | VUSD  | default-simple-risk-model-3 | default-margin-calculator | 0                | default-none | default-none     | default-usd-for-future | 0.25                   | 0                         | default-futures |
     8  
     9    Scenario: a party is added to the system. A general account is created for each asset
    10      Given the parties deposit on asset's general account the following amount:
    11        | party  | asset | amount |
    12        | party1 | ETH   | 100    |
    13        | party1 | VUSD  | 100    |
    14      Then "party1" should have one account per asset
    15      And "party1" should have one margin account per market
    16  
    17    Scenario: a party deposit collateral onto Vega. The general account for this asset increase
    18      Given the parties deposit on asset's general account the following amount:
    19        | party  | asset | amount |
    20        | party1 | ETH   | 100    |
    21        | party1 | VUSD  | 100    |
    22      Then "party1" should have one account per asset
    23      When the parties deposit on asset's general account the following amount:
    24        | party  | asset | amount |
    25        | party1 | VUSD  | 200    |
    26      Then "party1" should have general account balance of "300" for asset "VUSD"
    27  
    28    Scenario: a party withdraw collateral onto Vega. The general account for this asset decrease
    29      Given the parties deposit on asset's general account the following amount:
    30        | party  | asset | amount |
    31        | party1 | ETH   | 100    |
    32        | party1 | VUSD  | 100    |
    33      Then "party1" should have one account per asset
    34      When the parties withdraw the following assets:
    35        | party  | asset | amount |
    36        | party1 | VUSD  | 70     |
    37      Then "party1" should have general account balance of "30" for asset "VUSD"