code.vegaprotocol.io/vega@v0.79.0/core/integration/features/orders/0037-OPEG-022.feature (about) 1 2 Feature: 0001 tick size should be using market decimal, A pegged order specifying an offset which is not an integer multiple of the markets tick size should be rejected. 3 4 Background: 5 Given the following network parameters are set: 6 | name | value | 7 | market.liquidity.bondPenaltyParameter | 1 | 8 | network.markPriceUpdateMaximumFrequency | 0s | 9 | limits.markets.maxPeggedOrders | 6 | 10 | validators.epoch.length | 5s | 11 | market.liquidity.earlyExitPenalty | 0.25 | 12 | market.liquidity.stakeToCcyVolume | 1.0 | 13 | market.liquidity.sla.nonPerformanceBondPenaltySlope | 0.19 | 14 | market.liquidity.sla.nonPerformanceBondPenaltyMax | 1 | 15 16 And the liquidity monitoring parameters: 17 | name | triggering ratio | time window | scaling factor | 18 | lqm-params | 0.1 | 24h | 1 | 19 20 And the following assets are registered: 21 | id | decimal places | 22 | ETH | 1 | 23 24 And the average block duration is "1" 25 And the simple risk model named "simple-risk-model-1": 26 | long | short | max move up | min move down | probability of trading | 27 | 0.1 | 0.1 | 60 | 50 | 0.2 | 28 And the fees configuration named "fees-config-1": 29 | maker fee | infrastructure fee | 30 | 0.004 | 0.001 | 31 And the price monitoring named "price-monitoring-1": 32 | horizon | probability | auction extension | 33 | 1 | 0.99 | 5 | 34 And the liquidity sla params named "SLA": 35 | price range | commitment min time fraction | performance hysteresis epochs | sla competition factor | 36 | 0.01 | 0.5 | 1 | 1.0 | 37 38 Scenario: 39 #0037-OPEG-022:Given a market with non-zero market and asset decimals where the asset decimals are strictly less than the market decimals (yielding a negative price factor). A pegged order specifying an offset which is not an integer multiple of the markets tick size should be rejected. 40 #0037-OPEG-025:Given a market with non-zero market and asset decimals where the asset decimals are equal to the market decimals (yielding a negative price factor). A pegged order specifying an offset which is not an integer multiple of the markets tick size should be rejected. 41 #0037-OPEG-026:Given a market with non-zero market and asset decimals where the asset decimals are strictly more than the market decimals (yielding a negative price factor). A pegged order specifying an offset which is not an integer multiple of the markets tick size should be rejected. 42 And the markets: 43 | id | quote name | asset | liquidity monitoring | risk model | margin calculator | auction duration | fees | price monitoring | data source config | linear slippage factor | quadratic slippage factor | sla params | decimal places | tick size | 44 | ETH/DEC21 | ETH | ETH | lqm-params | simple-risk-model-1 | default-margin-calculator | 1 | fees-config-1 | price-monitoring-1 | default-eth-for-future | 0.5 | 0 | SLA | 2 | 10 | 45 | ETH/DEC22 | ETH | ETH | lqm-params | simple-risk-model-1 | default-margin-calculator | 1 | fees-config-1 | price-monitoring-1 | default-eth-for-future | 0.5 | 0 | SLA | 2 | 5 | 46 | ETH/DEC23 | ETH | ETH | lqm-params | simple-risk-model-1 | default-margin-calculator | 1 | fees-config-1 | price-monitoring-1 | default-eth-for-future | 0.5 | 0 | SLA | 1 | 5 | 47 | ETH/DEC24 | ETH | ETH | lqm-params | simple-risk-model-1 | default-margin-calculator | 1 | fees-config-1 | price-monitoring-1 | default-eth-for-future | 0.5 | 0 | SLA | 0 | 10 | 48 And the parties deposit on asset's general account the following amount: 49 | party | asset | amount | 50 | party1 | ETH | 100000 | 51 | party3 | ETH | 1000000 | 52 | party4 | ETH | 1000000 | 53 And the average block duration is "1" 54 55 And the parties place the following orders: 56 | party | market id | side | volume | price | resulting trades | type | tif | reference | error | 57 | party3 | ETH/DEC21 | buy | 100 | 101 | 0 | TYPE_LIMIT | TIF_GTC | p3b1-1 | OrderError: price not in tick size | 58 | party3 | ETH/DEC21 | buy | 10 | 111 | 0 | TYPE_LIMIT | TIF_GTC | p3b2-1 | OrderError: price not in tick size | 59 | party4 | ETH/DEC21 | sell | 10 | 111 | 0 | TYPE_LIMIT | TIF_GTC | p4s2-1 | OrderError: price not in tick size | 60 | party4 | ETH/DEC21 | sell | 1000 | 191 | 0 | TYPE_LIMIT | TIF_GTC | p4s1-1 | OrderError: price not in tick size | 61 | party3 | ETH/DEC22 | buy | 100 | 101 | 0 | TYPE_LIMIT | TIF_GTC | p3b1-2 | OrderError: price not in tick size | 62 | party3 | ETH/DEC22 | buy | 10 | 111 | 0 | TYPE_LIMIT | TIF_GTC | p3b2-2 | OrderError: price not in tick size | 63 | party4 | ETH/DEC22 | sell | 10 | 111 | 0 | TYPE_LIMIT | TIF_GTC | p4s2-2 | OrderError: price not in tick size | 64 | party4 | ETH/DEC22 | sell | 1000 | 191 | 0 | TYPE_LIMIT | TIF_GTC | p4s1-2 | OrderError: price not in tick size | 65 | party3 | ETH/DEC23 | buy | 100 | 101 | 0 | TYPE_LIMIT | TIF_GTC | p3b1-3 | OrderError: price not in tick size | 66 | party3 | ETH/DEC23 | buy | 10 | 111 | 0 | TYPE_LIMIT | TIF_GTC | p3b2-3 | OrderError: price not in tick size | 67 | party4 | ETH/DEC23 | sell | 10 | 111 | 0 | TYPE_LIMIT | TIF_GTC | p4s2-3 | OrderError: price not in tick size | 68 | party4 | ETH/DEC23 | sell | 1000 | 191 | 0 | TYPE_LIMIT | TIF_GTC | p4s1-3 | OrderError: price not in tick size | 69 | party3 | ETH/DEC24 | buy | 100 | 101 | 0 | TYPE_LIMIT | TIF_GTC | p3b1-4 | OrderError: price not in tick size | 70 | party3 | ETH/DEC24 | buy | 10 | 111 | 0 | TYPE_LIMIT | TIF_GTC | p3b2-4 | OrderError: price not in tick size | 71 | party4 | ETH/DEC24 | sell | 10 | 111 | 0 | TYPE_LIMIT | TIF_GTC | p4s2-4 | OrderError: price not in tick size | 72 | party4 | ETH/DEC24 | sell | 1000 | 191 | 0 | TYPE_LIMIT | TIF_GTC | p4s1-4 | OrderError: price not in tick size | 73 74 Then the network moves ahead "2" blocks 75 And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC21" 76 And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC22" 77 And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC23" 78 And the trading mode should be "TRADING_MODE_OPENING_AUCTION" for the market "ETH/DEC24" 79 80 And the parties place the following pegged iceberg orders: 81 | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | reference | error | 82 | party1 | ETH/DEC21 | 10 | 5 | buy | MID | 10 | 10 | peg-buy-1 | | 83 | party1 | ETH/DEC21 | 10 | 5 | sell | MID | 20 | 20 | peg-buy-2 | | 84 | party1 | ETH/DEC21 | 10 | 5 | buy | MID | 20 | 100 | peg-buy-3 | | 85 | party1 | ETH/DEC21 | 10 | 5 | sell | MID | 20 | 2 | peg-buy-4 | OrderError: price not in tick size | 86 | party1 | ETH/DEC21 | 10 | 5 | buy | MID | 20 | 5 | peg-buy-5 | OrderError: price not in tick size | 87 | party1 | ETH/DEC22 | 10 | 5 | buy | MID | 20 | 15 | peg-buy-6 | | 88 | party1 | ETH/DEC23 | 10 | 5 | sell | MID | 20 | 6 | peg-buy-7 | OrderError: price not in tick size | 89 | party1 | ETH/DEC24 | 10 | 5 | buy | MID | 20 | 17 | peg-buy-8 | OrderError: price not in tick size |