VMP-24 - Update DOGE/USDT-231231 Future Market Settlement Oracle

VMP-24 - Update DOGE/USDT-231231 Future Market Settlement Oracle

This proposal requests to change the DOGE/USDT-231231 Future Market’s Settlement Oracle. When the market was created it was set up to have a community member submit the settlement price via a governance proposal. However, now that Vega can source price data from Chainlink I propose to update the market that it automatically settles using data from Chainlink’s DOGE/USD Price Feed.

Technically speaking, sourcing from DOGE/USD Chainlink price feed means the future market is technically not DOGE/USDT but DOGE/USD. I’m happy to create and deploy a smart contract to make the conversion but given the lack of trading volume not sure if it’s worth it?

Changes:

  1. Updated dataSourceSpecForSettlementData to ethOracle and added the DOGE/USD Chainlink address: 0x2465cefd3b488be410b941b1d4b2767088e2a028
  2. I’ve updated the settlement time to be Dec 31 2023 00:01:00 UTC, this is to allow for the network to source the price of DOGE/USD at Dec 31 2023 00:00:00 UTC + allow for 3 confirmations ~36 seconds.

I hope I’ve correctly implemented the swap to an ethOracle and would love the Vega team to check over closely!

Full Proposal JSON:

{
  "rationale": {
    "title": "VMP-24 - Update DOGE/USDT-231231 Future Market Settlement Oracle",
    "description": "This proposal requests to change the DOGE/USDT-231231 Future Market's Settlement Oracle. When the market was created it was set up to have a community member submit the settlement price via a governance proposal. However, now that Vega can source price data from Chainlink I propose to update the market that it automatically settles using data from Chainlink's DOGE/USD Price Feed. Forum discussion can be found [here]()"
  },
  "terms": {
    "updateMarket": {
      "marketId": "d957e1d0ce9dcc08bdbb5bfe637f1a601050d67f81fa6cdaeef64801166f6a28",
      "changes": {
        "linearSlippageFactor": "0.001",
        "quadraticSlippageFactor": "0",
        "instrument": {
          "code": "DOGE/USDT-231231",
          "future": {
            "quoteName": "USDT",
            "dataSourceSpecForSettlementData": {
              "external": {
                "ethOracle": {
                  "address": "0x2465cefd3b488be410b941b1d4b2767088e2a028",
                  "abi": "[{\"inputs\":[],\"name\":\"latestAnswer\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
                  "method": "latestAnswer",
                  "normalisers": [
                    {
                      "name": "prices.DOGE.value",
                      "expression": "$[0]"
                    }
                  ],
                  "requiredConfirmations": 3,
                  "trigger": {
                    "timeTrigger": {
                      "initial": "1703980800"
                    }
                  },
                  "filters": [
                    {
                      "key": {
                        "name": "prices.DOGE.value",
                        "type": "TYPE_INTEGER",
                        "numberDecimalPlaces": "8"
                      },
                      "conditions": [
                        {
                          "operator": "OPERATOR_GREATER_THAN",
                          "value": "0"
                        }
                      ]
                    },
                    {
                      "key": {
                        "name": "prices.DOGE.timestamp",
                        "type": "TYPE_INTEGER"
                      },
                      "conditions": [
                        {
                          "operator": "OPERATOR_GREATER_THAN",
                          "value": "1703980860"
                        }
                      ]
                    }
                  ]
                }
              }
            },
            "dataSourceSpecForTradingTermination": {
              "internal": {
                "time": {
                  "conditions": [
                    {
                      "operator": "OPERATOR_GREATER_THAN_OR_EQUAL",
                      "value": "1703980860"
                    }
                  ]
                }
              }
            },
            "dataSourceSpecBinding": {
              "settlementDataProperty": "prices.DOGE.value",
              "tradingTerminationProperty": "vegaprotocol.builtin.timestamp"
            }
          }
        },
        "metadata": [
          "enactment:2023-07-14T00:00:00Z",
          "settlement:2023-12-31T00:01:00Z"
        ],
        "priceMonitoringParameters": {
          "triggers": [
            {
              "horizon": "43200",
              "probability": "0.9999999",
              "auctionExtension": "600"
            }
          ]
        },
        "logNormal": {
          "tau": 0.0001140771161,
          "riskAversionParameter": 0.000001,
          "params": {
            "mu": 0,
            "r": 0.016,
            "sigma": 1.5
          }
        }
      }
    },
    "closingTimestamp": 0,
    "enactmentTimestamp": 0
  }
}
1 Like

Someone from the team will have a go at trying this on testnet and will report the outcome here - let’s see how the software copes.

1 Like

A few issues, mostly small ones:

  • VMP-24 already taken so should probably be VMP-25.
  • Any reason to move the termination date? It’s just a minute, but still.
  • It worked for me on fairground, but without the second filter for the settlement price (currently there’s no way to filter on metadata).
  • The liquidity monitoring and SLA settings seem to be missing.

I think that was a network proposal not a market proposal, ie: VNP-24.

You’re right, my bad.

This is on-chain now VEGA Governance