code.vegaprotocol.io/vega@v0.79.0/core/integration/features/spot/accounts_and_fees/0013-ACCT-031.feature (about) 1 Feature: Spot market 2 3 Scenario: Each party should only have two holding accounts per market: 4 one for the the base_asset and one for the quote_asset. (0013-ACCT-031) 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 | party1 | BTC | 100 | 37 | party2 | ETH | 10000 | 38 | party2 | BTC | 100 | 39 And the average block duration is "1" 40 41 # No orders have been places so we shouldn't have any holding accounts 42 And "party1" should have only the following accounts: 43 | type | asset | amount | 44 | ACCOUNT_TYPE_GENERAL | ETH | 10000 | 45 | ACCOUNT_TYPE_GENERAL | BTC | 100 | 46 47 And "party2" should have only the following accounts: 48 | type | asset | amount | 49 | ACCOUNT_TYPE_GENERAL | ETH | 10000 | 50 | ACCOUNT_TYPE_GENERAL | BTC | 100 | 51 52 # Place some orders to create the holding accounts 53 And the parties place the following orders: 54 | party | market id | side | volume | price | resulting trades | type | tif | 55 | party1 | BTC/ETH | buy | 100 | 2000 | 0 | TYPE_LIMIT | TIF_GFA | 56 | party1 | BTC/ETH | sell | 100 | 3000 | 0 | TYPE_LIMIT | TIF_GFA | 57 | party2 | BTC/ETH | buy | 100 | 2000 | 0 | TYPE_LIMIT | TIF_GTC | 58 | party2 | BTC/ETH | sell | 100 | 3000 | 0 | TYPE_LIMIT | TIF_GTC | 59 60 And "party1" should have only the following accounts: 61 | type | asset | 62 | ACCOUNT_TYPE_GENERAL | ETH | 63 | ACCOUNT_TYPE_HOLDING | ETH | 64 | ACCOUNT_TYPE_GENERAL | BTC | 65 | ACCOUNT_TYPE_HOLDING | BTC | 66 67 And "party2" should have only the following accounts: 68 | type | asset | 69 | ACCOUNT_TYPE_GENERAL | BTC | 70 | ACCOUNT_TYPE_HOLDING | BTC | 71 | ACCOUNT_TYPE_GENERAL | ETH | 72 | ACCOUNT_TYPE_HOLDING | ETH | 73