vegaprotocol / protos

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Market proposal must contain a positive liquidity commitment amount

gordsport opened this issue · comments

New market proposals must contain a Liquidity Commitment (0028-GOVE-011)

Submitted a market proposal as follows:-

{
  "proposalSubmission": {
    "reference": "07C06AF4B4",
    "terms": {
      "closingtimestamp": "1649015605",
      "enactmenttimestamp": "1649015607",
      "validationtimestamp": "1649015597",
      "newMarket": {
        "changes": {
          "instrument": {
            "name": "Futures System-tests Market",
            "code": "CRYPtO:VEGA CORE SYS tESt",
            "future": {
              "settlementAsset": "351c0f39c1bff5ebb5728fb780dd01c04db85860999c9454ae104b5b92a5993b",
              "quoteName": "USD",
              "oracleSpecForSettlementPrice": {
                "pubKeys": [
                  "d309b2809981b5bec4dbe9336773890e928b55efb5a28052f2b7b6022253a46f"
                ],
                "filters": [
                  {
                    "key": {
                      "name": "oracle.test.settlement99088",
                      "type": "tYPE_INtEGER"
                    },
                    "conditions": [
                      {
                        "operator": "OPERAtOR_GREAtER_tHAN_OR_EQUAL",
                        "value": "0"
                      }
                    ]
                  }
                ]
              },
              "oracleSpecFortradingtermination": {
                "pubKeys": [
                  "d309b2809981b5bec4dbe9336773890e928b55efb5a28052f2b7b6022253a46f"
                ],
                "filters": [
                  {
                    "key": {
                      "name": "oracle.test.terminationD9F00",
                      "type": "tYPE_BOOLEAN"
                    },
                    "conditions": [
                      {
                        "operator": "OPERAtOR_EQUALS",
                        "value": "true"
                      }
                    ]
                  }
                ]
              },
              "oracleSpecBinding": {
                "settlementPriceProperty": "oracle.test.settlement99088",
                "tradingterminationProperty": "oracle.test.terminationD9F00"
              }
            }
          },
          "decimalPlaces": "5",
          "metadata": [
            "asset_class:fx/crypto",
            "product:futures"
          ],
          "positionDecimalPlaces": "5",
          "logNormal": {
            "riskAversionParameter": 0.001,
            "tau": 0.00011407711613050422,
            "params": {
              "r": 0.016,
              "sigma": 1.5,
              "mu": 0
            }
          }
        },
        "liquidityCommitment": {
          "commitmentAmount": "3905000000000000000000000",
          "fee": "0.3",
          "sells": [
            {
              "reference": "PEGGED_REFERENCE_BESt_ASK",
              "proportion": 13,
              "offset": "100000"
            }
          ],
          "buys": [
            {
              "reference": "PEGGED_REFERENCE_BESt_BID",
              "proportion": 2,
              "offset": "100000"
            }
          ],
          "reference": "D0AC67B5CE"
        }
      }
    }
  },
  "propagate": true,
  "pubKey": "d309b2809981b5bec4dbe9336773890e928b55efb5a28052f2b7b6022253a46f"
}

Wallet returned a tx hash
Was expecting an error

proposal_submission.terms.change.new_market.liquidity_commitment.commitment_amount":["must be positive"]

As far as I see, 3905000000000000000000000 is positive. Nonetheless, I will dig into it.