VMP-11 - Create market DOGE/USDT Future - 2023/12/31

VMP-11 - Create market DOGE/USDT Future - 2023/12/31

Hey everyone, this proposal looks to create a futures market for DOGE with an expiry on the 31st of December 2023.

I found it rather difficult to follow the docs to create this market, so it would be great if the Vega team or community members could thoroughly check all parameters. Specifically, feedback on:

  • LP parameters
  • Oracle
  • decimals
  • Closing, termination, and enactment dates

Thanks a lot!

Market Summary:
Name:
DOGE/USDT Future expiry 2023/12/31

Settlement asset:
USDT

Rationale:
As many of you know memecoins despite being memes receive a lot of attention in the ecosystem and therefore, volume. DOGE is no exception to this with quite a large market cap and avg. daily trading volume.

I believe a DOGE/USDT market on Vega will be instrumental in driving new users to try and trade on the network.

Market/Update Details:
Instrument
DOGEUSDT-231231

Data source definition for the settlement data oracle
Coinbase Oracle

Risk model
Log-normal risk model

Liquidity monitoring parameters

"liquidityMonitoringParameters": {
          "targetStakeParameters": {
            "timeWindow": "3600",
            "scalingFactor": 1
          },
          "triggeringRatio": "0.7",
          "auctionExtension": "1"
        },

Price monitoring parameters

"priceMonitoringParameters": {
          "triggers": [
            {
              "horizon": "43200",
              "probability": "0.9999999",
              "auctionExtension": "600"
            }
          ]
        },

Full Proposal JSON:

{
  "rationale": {
    "title": "VMP-11 - Create market DOGE/USDT Future - 2023/12/31",
    "description": "As many of you know memecoins despite being memes receive a lot of attention in the ecosystem and therefore, volume. DOGE is no exception to this with quite a large market cap and avg. daily trading volume. I believe a DOGE/USDT market on Vega will be instrumental in driving new users to try and trade on the network. "
  },
  "terms": {
    "newMarket": {
      "changes": {
        "lpPriceRange": "0.8",
        "linearSlippageFactor": "0.001",
        "quadraticSlippageFactor": "0",
        "decimalPlaces": "6",
        "positionDecimalPlaces": "6",
        "instrument": {
          "name": "DOGE/USDT expiry 2023 Dec 31st",
          "code": "DOGE/USDT-231231",
          "future": {
            "settlementAsset": "bf1e88d19db4b3ca0d1d5bdb73718a01686b18cf731ca26adedf3c8b83802bba",
            "quoteName": "USDT",
            "dataSourceSpecForSettlementData": {
              "external": {
                "oracle": {
                  "signers": [
                    {
                      "DOGEAddress": {
                        "address": "0xfCEAdAFab14d46e20144F48824d0C09B1a03F2BC"
                      }
                    }
                  ],
                  "filters": [
                    {
                      "key": {
                        "name": "prices.DOGE.value",
                        "type": "TYPE_INTEGER",
                        "numberDecimalPlaces": "6"
                      },
                      "conditions": [
                        {
                          "operator": "OPERATOR_GREATER_THAN",
                          "value": "0"
                        }
                      ]
                    },
                    {
                      "key": {
                        "name": "prices.DOGE.timestamp",
                        "type": "TYPE_TIMESTAMP"
                      },
                      "conditions": [
                        {
                          "operator": "OPERATOR_GREATER_THAN",
                          "value": "1703941200"
                        }
                      ]
                    }
                  ]
                }
              }
            },
            "dataSourceSpecForTradingTermination": {
              "internal": {
                "time": {
                  "conditions": [
                    {
                      "operator": "OPERATOR_GREATER_THAN_OR_EQUAL",
                      "value": "1703941200"
                    }
                  ]
                }
              }
            },
            "dataSourceSpecBinding": {
              "settlementDataProperty": "prices.DOGE.value",
              "tradingTerminationProperty": "vegaprotocol.builtin.timestamp"
            }
          }
        },
        "metadata": [
          "enactment:2023-07-14T00:00:00Z",
          "settlement:2023-12-31T00:00:00Z",
          "source:docs.vega.xyz"
        ],
        "priceMonitoringParameters": {
          "triggers": [
            {
              "horizon": "43200",
              "probability": "0.9999999",
              "auctionExtension": "600"
            }
          ]
        },
        "liquidityMonitoringParameters": {
          "targetStakeParameters": {
            "timeWindow": "3600",
            "scalingFactor": 1
          },
          "triggeringRatio": "0.7",
          "auctionExtension": "1"
        },
        "logNormal": {
          "tau": 0.0001140771161,
          "riskAversionParameter": 0.000001,
          "params": {
            "mu": 0,
            "r": 0.016,
            "sigma": 1.5
          }
        }
      }
    },
    "closingTimestamp": 1689292800,
    "enactmentTimestamp": 1689296400
  }
}

Hi Jubi
Thanks for proposal. I’m not sure Coinbase oracle is supporting Doge assets or can be added. Coinbase API in the sample file currently has only 13 assets available: BTC, ETH, XTZ, DAI, REP, ZRX, BAT, KNC, LINK, COMP, UNI, GRT, SNX

1 Like

This is correct, I would disregard BAT as an option as well since that is not updated anymore by Coinbase price oracle.

Great that you tried by following the docs, regarding the issues you had, were they related to these parameters, or are there other things that should be clarified/improved?

    1. LP parameters
    1. Oracle
    1. decimals
    1. Closing, termination, and enactment dates
2 Likes

To be clear, just because it is not in Coinbase oracle doesnt mean you cant go ahead with looking to progress this.

It is possible to use other JSON oracle sources, or if no suitable reputable source can be found there is an option to use a community vote to set the final price at which settlement occurs.

If the market is not due to settle until later in the year then it is also possibel ethereum oracles will be available by then, in which case a price from Uniswap could be used for instance.

1 Like

This is a good point thanks @Jon_Vega

I’m assuming if we use a community vote, the settlement would have to be delayed until the vote has passed and set the settlement price right?

For example, setting the settlement price by taking the price of DOGE at termination datetime from Coingecko and then voting on this.

If this is correct, does it also mean that collateral used in the DOGE market is somewhat stuck until settlement occurs?

–
Edit:
I’d love to actually progress with using a community vote so that we can launch the market. I’m just not sure how to implement this in the code above.

At first glance, it seems we can launch the market (unsure on what to set the settlement oracle as) and then create a proposal to update the market after termination occurs with the price of DOGE. Alternatively, if ethereum based oracles are live the proposal to update the market can come sooner

I’m assuming if we use a community vote, the settlement would have to be delayed until the vote has passed and set the settlement price right?

This is correct indeed.

For example, setting the settlement price by taking the price of DOGE at termination datetime from Coingecko and then voting on this.

If this is correct, does it also mean that collateral used in the DOGE market is somewhat stuck until settlement occurs?

That is also correct.

1 Like

Thanks, what would i set as the settlement oracle in this case?

Hi @Jubi, sorry for the delayed reply, we have updated the docs on how this can be done.

So as an example, if this was the settings for the market, you can see there is no way to settle the market since the price is required to be above and below 0.

"dataSourceSpecForSettlementData": {
                                "external": {
                                    "oracle": {
                                        "signers": [
                                            {
                                                "pubKey": {
                                                    "key": "{YOUR_PUBLIC_KEY}"
                                                }
                                            }
                                        ],
                                        "filters": [
                                            {
                                                "key": {
                                                    "name": "prices.{whatever value makes sense to you e.g. BTC}.value",
                                                    "type": "TYPE_INTEGER",
                                                    "numberDecimalPlaces": "2"
                                                },
                                                "conditions": [
                                                    {
                                                        "operator": "OPERATOR_GREATER_THAN",
                                                        "value": "0"
                                                    },
                                                    {
                                                        "operator": "OPERATOR_LESS_THAN",
                                                        "value": "0"
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                }
                            },



After the market has been terminated an updateMarket proposal should be made and it should be changed to the following as an example if the agreed upon price at termination was 29000,50.

As you can see it is very important to keep track of “numberDecimalPlaces”: “2”, so in the example you would only allow for the market to accept a settlement price of 2900050 which using "numberDecimalPlaces": "2" would mean 29000,50:

"dataSourceSpecForSettlementData": {
                                "external": {
                                    "oracle": {
                                        "signers": [
                                            {
                                                "pubKey": {
                                                    "key": "{YOUR_PUBLIC_KEY}"
                                                }
                                            }
                                        ],
                                        "filters": [
                                            {
                                                "key": {
                                                    "name": "prices.{whatever value makes sense to you e.g. BTC}.value",
                                                    "type": "TYPE_INTEGER",
                                                    "numberDecimalPlaces": "2"
                                                },
                                                "conditions": [
                                                    {
                                                        "operator": "OPERATOR_EQUALS",
                                                        "value": "2900050"
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                }
                            },
1 Like

The market would then be able to be settled by the specified key at the agreed upon price.

You can see the instructions in the doc’s

Hey, thanks a lot for these please see the updated JSON that I plan to use:

{
  "rationale": {
    "title": "VMP-11 - Create market DOGE/USDT Future - 2023/12/31",
    "description": "As many of you know memecoins despite being memes receive a lot of attention in the ecosystem and therefore, volume. DOGE is no exception to this with quite a large market cap and avg. daily trading volume. I believe a DOGE/USDT market on Vega will be instrumental in driving new users to try and trade on the network. "
  },
  "terms": {
    "newMarket": {
      "changes": {
        "lpPriceRange": "0.8",
        "linearSlippageFactor": "0.001",
        "quadraticSlippageFactor": "0",
        "decimalPlaces": "5",
        "positionDecimalPlaces": "-3",
        "instrument": {
          "name": "DOGE/USDT expiry 2023 Dec 31st",
          "code": "DOGE/USDT-231231",
          "future": {
            "settlementAsset": "bf1e88d19db4b3ca0d1d5bdb73718a01686b18cf731ca26adedf3c8b83802bba",
            "quoteName": "USDT",
            "dataSourceSpecForSettlementData": {
                                "external": {
                                    "oracle": {
                                        "signers": [
                                            {
                                                "pubKey": {
                                                    "key": "f0ce41f07f47d9afe5a8e25ea43aeac8489100499862be337371f1eb6585a7c9"
                                                }
                                            }
                                        ],
                                        "filters": [
                                            {
                                                "key": {
                                                    "name": "prices.DOGE.value",
                                                    "type": "TYPE_INTEGER",
                                                    "numberDecimalPlaces": "6"
                                                },
                                                "conditions": [
                                                    {
                                                        "operator": "OPERATOR_GREATER_THAN",
                                                        "value": "0"
                                                    },
                                                    {
                                                        "operator": "OPERATOR_LESS_THAN",
                                                        "value": "0"
                                                    }
                                                ]
                                            }
                                        ]
                                    }
                                }
                            },
            "dataSourceSpecForTradingTermination": {
              "internal": {
                "time": {
                  "conditions": [
                    {
                      "operator": "OPERATOR_GREATER_THAN_OR_EQUAL",
                      "value": "1703980800"
                    }
                  ]
                }
              }
            },
            "dataSourceSpecBinding": {
              "settlementDataProperty": "prices.DOGE.value",
              "tradingTerminationProperty": "vegaprotocol.builtin.timestamp"
            }
          }
        },
        "metadata": [
          "enactment:2023-08-11T00:00:00Z",
          "settlement:2023-12-31T00:00:00Z",
        ],
        "priceMonitoringParameters": {
          "triggers": [
            {
              "horizon": "43200",
              "probability": "0.9999999",
              "auctionExtension": "600"
            }
          ]
        },
        "liquidityMonitoringParameters": {
          "targetStakeParameters": {
            "timeWindow": "3600",
            "scalingFactor": 1
          },
          "triggeringRatio": "0.7",
          "auctionExtension": "1"
        },
        "logNormal": {
          "tau": 0.0001140771161,
          "riskAversionParameter": 0.000001,
          "params": {
            "mu": 0,
            "r": 0.016,
            "sigma": 1.5
          }
        }
      }
    },
    "closingTimestamp": 1691622000,
    "enactmentTimestamp": 1691708400
  }
}

Have asked the team to give this a final review, someone should be in touch soon!

1 Like

Hey @Jubi, it looks like the “source” field that you’ve added to the metadata is copied straight from the template in the documentation site. If you don’t have a specific reason for it, I wouldn’t include it in there. You can put anything you think would be useful in the metadata fields, by the way, such as the sector or source for settlement data, or leave them out entirely if you choose.

Basically, let’s just remove this line

Thanks,

I have removed this, good catch!

1 Like

I am thinking about the decimals a bit.

Looking at decimalPlaces=6 first and that seems appropriate. At the moment I see e.g. 5 price decimals at coinmarketcap giving us 0.07433. Maybe it will be a little too precise if Doge goes up but appropriate if it tanks.

But position decimals of "positionDecimalPlaces": "6", seem off. That would mean that the value of the smallest position, at current price, would be 10^-6 x 0.07433 which means that people could trade tiny, tiny amounts and thus spam the network with very little cost to themselves. I would suggest positionDecimalPlaces=-2 which would make the smallest trade notional 10^2 x 0.07433 USD = 7.433 USD which is still pretty tiny (at ~ 10x leverage) but probably ok. We could consider positionDecimalPlaces=-3 for smallest position notional 74.33 USD which at 10x leverage still means tiny margin amount to place a trade. What do you think?

1 Like

Thanks David, I think positionDecimalPlaces=-3 makes the most sense. I’ll also adjust decimalplaces = 5.

If that works?

1 Like

The proposal was submitted to the Governance dapp for voting

2 Likes