code.vegaprotocol.io/vega@v0.79.0/core/integration/features/spot/orders/0011-MARA-auction.feature (about) 1 Feature: Spot market 2 3 Background: 4 5 Given the following network parameters are set: 6 | name | value | 7 | network.markPriceUpdateMaximumFrequency | 0s | 8 | market.value.windowLength | 1h | 9 10 Given the following assets are registered: 11 | id | decimal places | 12 | ETH | 2 | 13 | BTC | 2 | 14 15 Given the fees configuration named "fees-config-1": 16 | maker fee | infrastructure fee | 17 | 0.01 | 0.03 | 18 19 Given the log normal risk model named "lognormal-risk-model-1": 20 | risk aversion | tau | mu | r | sigma | 21 | 0.001 | 0.01 | 0 | 0.0 | 1.2 | 22 And the price monitoring named "price-monitoring-1": 23 | horizon | probability | auction extension | 24 | 360000 | 0.999 | 1 | 25 And the spot markets: 26 | id | name | base asset | quote asset | risk model | auction duration | fees | price monitoring | decimal places | position decimal places | sla params | 27 | BTC/ETH | BTC/ETH | BTC | ETH | lognormal-risk-model-1 | 1 | fees-config-1 | price-monitoring-1 | 2 | 2 | default-basic | 28 29 # setup accounts 30 Given the parties deposit on asset's general account the following amount: 31 | party | asset | amount | 32 | party1 | ETH | 10000 | 33 | party2 | ETH | 10000 | 34 | party2 | BTC | 10 | 35 | party3 | ETH | 10000 | 36 | party5 | BTC | 100 | 37 And the average block duration is "1" 38 39 Scenario: In Spot market, holding in holding account s correctly calculated for all order types in auction mode limit GTT (0011-MARA-028) 40 When the parties place the following orders: 41 | party | market id | side | volume | price | resulting trades | type | tif | expires in | reference | 42 | party1 | BTC/ETH | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTT | 50 | buy1 | 43 | party5 | BTC/ETH | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTT | 50 | sell1 | 44 45 Then "party5" should have holding account balance of "1" for asset "BTC" 46 And "party1" should have holding account balance of "10" for asset "ETH" 47 48 Scenario: In Spot market, holding in holding account s correctly calculated for all order types in auction mode limit GTC (0011-MARA-029) 49 When the parties place the following orders: 50 | party | market id | side | volume | price | resulting trades | type | tif | reference | 51 | party1 | BTC/ETH | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | buy1 | 52 | party5 | BTC/ETH | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | sell1 | 53 54 Then "party5" should have holding account balance of "1" for asset "BTC" 55 And "party1" should have holding account balance of "10" for asset "ETH" 56 57 Scenario: In Spot market, holding in holding account s correctly calculated for all order types in auction mode limit GFA (0011-MARA-030) 58 When the parties place the following orders: 59 | party | market id | side | volume | price | resulting trades | type | tif | reference | 60 | party1 | BTC/ETH | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | buy1 | 61 | party5 | BTC/ETH | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GFA | sell1 | 62 63 Then "party5" should have holding account balance of "1" for asset "BTC" 64 And "party1" should have holding account balance of "10" for asset "ETH" 65 66 Scenario: In Spot market, holding in holding account s correctly calculated for all order types in auction mode pegged GTT (0011-MARA-031) 67 Given the following network parameters are set: 68 | name | value | 69 | limits.markets.maxPeggedOrders | 10 | 70 71 When the parties place the following orders: 72 | party | market id | side | volume | price | resulting trades | type | tif | expires in | reference | 73 | party1 | BTC/ETH | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTT | 50 | buy1 | 74 | party5 | BTC/ETH | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTT | 50 | sell1 | 75 76 When the parties place the following pegged orders: 77 | party | market id | side | volume | pegged reference | offset | reference | 78 | party2 | BTC/ETH | sell | 1 | ASK | 100 | pegged1 | 79 80 Then "party5" should have holding account balance of "1" for asset "BTC" 81 And "party1" should have holding account balance of "10" for asset "ETH" 82 83 And the orders should have the following status: 84 | party | reference | status | 85 | party2 | pegged1 | STATUS_PARKED | 86 87 Scenario: In Spot market, holding in holding account s correctly calculated for all order types in auction mode pegged GTC (0011-MARA-032) 88 Given the following network parameters are set: 89 | name | value | 90 | limits.markets.maxPeggedOrders | 10 | 91 92 When the parties place the following orders: 93 | party | market id | side | volume | price | resulting trades | type | tif | reference | 94 | party1 | BTC/ETH | buy | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | buy1 | 95 | party5 | BTC/ETH | sell | 1 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | sell1 | 96 97 Then "party5" should have holding account balance of "1" for asset "BTC" 98 And "party1" should have holding account balance of "10" for asset "ETH" 99 100 When the parties place the following pegged orders: 101 | party | market id | side | volume | pegged reference | offset | reference | 102 | party2 | BTC/ETH | sell | 1 | ASK | 100 | pegged1 | 103 104 And the orders should have the following status: 105 | party | reference | status | 106 | party2 | pegged1 | STATUS_PARKED |