code.vegaprotocol.io/vega@v0.79.0/core/integration/features/verified/0038-OLIQ-liquidity_provision_creation.feature (about) 1 Feature: Test LP orders 2 3 Scenario: 001, create liquidity provisions (0038-OLIQ-additional-tests) 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 | 1 | default-none | default-none | default-eth-for-future | 0.25 | 0 | default-futures | 7 And the following network parameters are set: 8 | name | value | 9 | market.auction.minimumDuration | 1 | 10 | network.markPriceUpdateMaximumFrequency | 0s | 11 | limits.markets.maxPeggedOrders | 2 | 12 13 Given the parties deposit on asset's general account the following amount: 14 | party | asset | amount | 15 | party1 | ETH | 100000000 | 16 | sellSideProvider | ETH | 100000000 | 17 | buySideProvider | ETH | 100000000 | 18 | auxiliary | ETH | 100000000 | 19 | aux2 | ETH | 100000000 | 20 21 When the parties submit the following liquidity provision: 22 | id | party | market id | commitment amount | fee | lp type | 23 | lp1 | party1 | ETH/DEC19 | 50000 | 0.1 | submission | 24 | lp1 | party1 | ETH/DEC19 | 50000 | 0.1 | submission | 25 And the parties place the following pegged iceberg orders: 26 | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | 27 | party1 | ETH/DEC19 | 2 | 1 | buy | BID | 500 | 10 | 28 | party1 | ETH/DEC19 | 2 | 1 | sell | ASK | 500 | 10 | 29 And the parties place the following orders: 30 | party | market id | side | volume | price | resulting trades | type | tif | reference | 31 | auxiliary | ETH/DEC19 | buy | 1 | 80 | 0 | TYPE_LIMIT | TIF_GTC | oa-b-1 | 32 | auxiliary | ETH/DEC19 | sell | 1 | 120 | 0 | TYPE_LIMIT | TIF_GTC | oa-s-1 | 33 | aux2 | ETH/DEC19 | buy | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | oa-b-2 | 34 | auxiliary | ETH/DEC19 | sell | 1 | 100 | 0 | TYPE_LIMIT | TIF_GTC | oa-s-2 | 35 36 Then the order book should have the following volumes for market "ETH/DEC19": 37 | side | price | volume | 38 | sell | 120 | 1 | 39 | buy | 80 | 1 | 40 | buy | 100 | 1 | 41 | sell | 100 | 1 | 42 43 Then the opening auction period ends for market "ETH/DEC19" 44 45 And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" 46 47 Then the following trades should be executed: 48 | buyer | price | size | seller | 49 | aux2 | 100 | 1 | auxiliary | 50 And the mark price should be "100" for the market "ETH/DEC19" 51 52 Then the orders should have the following states: 53 | party | market id | side | volume | remaining | price | status | 54 | auxiliary | ETH/DEC19 | buy | 1 | 1 | 80 | STATUS_ACTIVE | 55 | auxiliary | ETH/DEC19 | sell | 1 | 1 | 120 | STATUS_ACTIVE | 56 | aux2 | ETH/DEC19 | buy | 1 | 1 | 100 | STATUS_ACTIVE | 57 | auxiliary | ETH/DEC19 | sell | 1 | 1 | 100 | STATUS_ACTIVE | 58 59 When the parties place the following orders: 60 | party | market id | side | volume | price | resulting trades | type | tif | reference | 61 | sellSideProvider | ETH/DEC19 | sell | 1000 | 120 | 0 | TYPE_LIMIT | TIF_GTC | sell-provider-1 | 62 | buySideProvider | ETH/DEC19 | buy | 1000 | 80 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-1 | 63 | party1 | ETH/DEC19 | buy | 1 | 110 | 0 | TYPE_LIMIT | TIF_GTC | lp-ref-1 | 64 | party1 | ETH/DEC19 | sell | 1 | 120 | 0 | TYPE_LIMIT | TIF_GTC | lp-ref-2 | 65 Then the orders should have the following states: 66 | party | market id | side | volume | remaining | price | status | 67 | sellSideProvider | ETH/DEC19 | sell | 1000 | 1000 | 120 | STATUS_ACTIVE | 68 | buySideProvider | ETH/DEC19 | buy | 1000 | 1000 | 80 | STATUS_ACTIVE | 69 Then the liquidity provisions should have the following states: 70 | id | party | market | commitment amount | status | 71 | lp1 | party1 | ETH/DEC19 | 50000 | STATUS_ACTIVE | 72 73 Then the orders should have the following states: 74 | party | market id | side | volume | remaining | price | status | 75 | party1 | ETH/DEC19 | buy | 500 | 2 | 100 | STATUS_ACTIVE | 76 | party1 | ETH/DEC19 | sell | 500 | 2 | 130 | STATUS_ACTIVE | 77 78 Scenario: 002, create liquidity provisions (0038-OLIQ-additional-tests); test decimal; asset 3; market 1; position:2 AC: 0070-MKTD-004;0070-MKTD-005; 0070-MKTD-006; 0070-MKTD-007;0070-MKTD-008 79 Given the following assets are registered: 80 | id | decimal places | 81 | ETH | 3 | 82 And the markets: 83 | id | quote name | asset | risk model | margin calculator | auction duration | fees | price monitoring | data source config | decimal places | position decimal places | linear slippage factor | quadratic slippage factor | sla params | 84 | ETH/DEC19 | ETH | ETH | default-simple-risk-model-3 | default-margin-calculator | 1 | default-none | default-none | default-eth-for-future | 1 | 2 | 0.25 | 0 | default-futures | 85 And the following network parameters are set: 86 | name | value | 87 | market.auction.minimumDuration | 1 | 88 | network.markPriceUpdateMaximumFrequency | 0s | 89 | limits.markets.maxPeggedOrders | 2 | 90 Given the parties deposit on asset's general account the following amount: 91 | party | asset | amount | 92 | party1 | ETH | 100000000000 | 93 | sellSideProvider | ETH | 100000000000 | 94 | buySideProvider | ETH | 100000000000 | 95 | auxiliary | ETH | 100000000000000 | 96 | aux2 | ETH | 100000000000000 | 97 When the parties place the following orders: 98 | party | market id | side | volume | price | resulting trades | type | tif | reference | 99 | auxiliary | ETH/DEC19 | buy | 100 | 800 | 0 | TYPE_LIMIT | TIF_GTC | oa-b-1 | 100 | auxiliary | ETH/DEC19 | sell | 100 | 1200 | 0 | TYPE_LIMIT | TIF_GTC | oa-s-1 | 101 | aux2 | ETH/DEC19 | buy | 100 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | oa-b-2 | 102 | auxiliary | ETH/DEC19 | sell | 100 | 1000 | 0 | TYPE_LIMIT | TIF_GTC | oa-s-2 | 103 And the parties submit the following liquidity provision: 104 | id | party | market id | commitment amount | fee | lp type | 105 | lp1 | party1 | ETH/DEC19 | 50000000 | 0.1 | submission | 106 | lp1 | party1 | ETH/DEC19 | 50000000 | 0.1 | submission | 107 And the parties place the following pegged iceberg orders: 108 | party | market id | peak size | minimum visible size | side | pegged reference | volume | offset | 109 | party1 | ETH/DEC19 | 2 | 1 | buy | BID | 500 | 100 | 110 | party1 | ETH/DEC19 | 2 | 1 | sell | ASK | 500 | 100 | 111 112 Then the order book should have the following volumes for market "ETH/DEC19": 113 | side | price | volume | 114 | sell | 1200 | 100 | 115 | buy | 800 | 100 | 116 | buy | 1000 | 100 | 117 | sell | 1000 | 100 | 118 119 Then the opening auction period ends for market "ETH/DEC19" 120 121 Then the following trades should be executed: 122 | buyer | price | size | seller | 123 | aux2 | 1000 | 100 | auxiliary | 124 And the mark price should be "1000" for the market "ETH/DEC19" 125 Then the orders should have the following states: 126 | party | market id | side | volume | remaining | price | status | 127 | auxiliary | ETH/DEC19 | buy | 100 | 100 | 800 | STATUS_ACTIVE | 128 | auxiliary | ETH/DEC19 | sell | 100 | 100 | 1200 | STATUS_ACTIVE | 129 | aux2 | ETH/DEC19 | buy | 100 | 100 | 1000 | STATUS_ACTIVE | 130 And the trading mode should be "TRADING_MODE_CONTINUOUS" for the market "ETH/DEC19" 131 When the parties place the following orders: 132 | party | market id | side | volume | price | resulting trades | type | tif | reference | 133 | sellSideProvider | ETH/DEC19 | sell | 100000 | 1200 | 0 | TYPE_LIMIT | TIF_GTC | sell-provider-1 | 134 | buySideProvider | ETH/DEC19 | buy | 100000 | 800 | 0 | TYPE_LIMIT | TIF_GTC | buy-provider-1 | 135 | party1 | ETH/DEC19 | buy | 5000 | 1100 | 0 | TYPE_LIMIT | TIF_GTC | lp-ref-1 | 136 | party1 | ETH/DEC19 | sell | 5000 | 1200 | 0 | TYPE_LIMIT | TIF_GTC | lp-ref-2 | 137 Then the orders should have the following states: 138 | party | market id | side | volume | remaining | price | status | 139 | sellSideProvider | ETH/DEC19 | sell | 100000 | 100000 | 1200 | STATUS_ACTIVE | 140 | buySideProvider | ETH/DEC19 | buy | 100000 | 100000 | 800 | STATUS_ACTIVE | 141 Then the liquidity provisions should have the following states: 142 | id | party | market | commitment amount | status | 143 | lp1 | party1 | ETH/DEC19 | 50000000 | STATUS_ACTIVE | 144 145 Then the orders should have the following states: 146 | party | market id | side | volume | remaining | price | status | 147 | party1 | ETH/DEC19 | buy | 500 | 2 | 1000 | STATUS_ACTIVE | 148 | party1 | ETH/DEC19 | sell | 500 | 2 | 1300 | STATUS_ACTIVE | 149