VMP-14 Create Market - LINK/USD(USDT)-Perpetual

VMP-14 Create Market - LINK/USD(USDT) Perpetual

This is a perpetual futures market for Chainlink (LINK) denominated in USD using the LINK/USD Chainlink price feed. This market will be settled in USDT.

Market Summary:
Name:
LINK/USD(USDT) PERPETUAL

Settlement asset:
USDT

Rationale:
LINK already exists as a Vega Futures market and is popular cryptocurrency based on marketcap and daily perpetual trading volume.

Market/Update Details:
Instrument:
LINK/USD(USDT)-PERP

Data source definition for the settlement data oracle:
Chainlink Oracle
0x2c1d072e956affc0d435cb7ac38ef18d24d9127c

Risk model:
Log-Normal

Liquidity monitoring parameters:

"liquidityMonitoringParameters": {
          "targetStakeParameters": {
            "timeWindow": "3600",
            "scalingFactor": 1
          },
          "triggeringRatio": "0.1",
          "auctionExtension": "1"
        },
        "logNormal": {
          "tau": 0.000009506426342,
          "riskAversionParameter": 0.000001,
          "params": {
            "mu": 0,
            "r": 0.016,
            "sigma": 1.5
          }
        },

Price monitoring parameters:

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

SLA monitoring parameters:

        "liquiditySlaParameters": {
          "priceRange": "0.03",
          "commitmentMinTimeFraction": "0.85",
          "performanceHysteresisEpochs": "1",
          "slaCompetitionFactor": "0.5"
        }
      }
    },

Full Proposal JSON:

{
  "rationale": {
    "title": "LINK/USD(USDT) Perpetual",
    "description": "This is a perpetual futures market for Chainlink (LINK) denominated in USD using the LINK/USD Chainlink price feed. This market will be settled in USDT."
  },
  "terms": {
    "newMarket": {
      "changes": {
        "linearSlippageFactor": "0.001",
        "quadraticSlippageFactor": "0",
        "decimalPlaces": "3",
        "positionDecimalPlaces": "1",
        "instrument": {
          "name": "LINK/USD(USDT)-PERP",
          "code": "LINK/USD-PERP",
          "perpetual": {
            "settlementAsset": "bf1e88d19db4b3ca0d1d5bdb73718a01686b18cf731ca26adedf3c8b83802bba",
            "quoteName": "USD",
            "marginFundingFactor": "0.95",
            "interestRate": "0",
            "clampLowerBound": "0",
            "clampUpperBound": "0",
            "dataSourceSpecForSettlementData": {
              "external": {
                "ethOracle": {
                  "address": "0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c",
                  "abi": "[{\"inputs\":[],\"name\":\"latestAnswer\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
                  "method": "latestAnswer",
                  "normalisers": [
                    {
                      "name": "link.price",
                      "expression": "$[0]"
                    }
                  ],
                  "requiredConfirmations": 3,
                  "trigger": {
                    "timeTrigger": {
                      "every": 30
                    }
                  },
                  "filters": [
                    {
                      "key": {
                        "name": "link.price",
                        "type": "TYPE_INTEGER",
                        "numberDecimalPlaces": 8
                      },
                      "conditions": [
                        {
                          "operator": "OPERATOR_GREATER_THAN_OR_EQUAL",
                          "value": "0"
                        }
                      ]
                    }
                  ]
                }
              }
            },
            "dataSourceSpecForSettlementSchedule": {
              "internal": {
                "timeTrigger": {
                  "conditions": [
                    {
                      "operator": "OPERATOR_GREATER_THAN_OR_EQUAL",
                      "value": "0"
                    }
                  ],
                  "triggers": [
                    {
                      "every": 1800
                    }
                  ]
                }
              }
            },
            "dataSourceSpecBinding": {
              "settlementDataProperty": "link.price",
              "settlementScheduleProperty": "vegaprotocol.builtin.timetrigger"
            }
          }
        },
        "metadata": [
          "enactment:TBD",
          "base:LINK",
          "quote:USD",
          "class:fx/crypto",
          "perpetual",
          "sector:defi"
        ],
        "priceMonitoringParameters": {
          "triggers": [
            {
              "horizon": "43200",
              "probability": "0.9999999",
              "auctionExtension": "300"
            }
          ]
        },
        "liquidityMonitoringParameters": {
          "targetStakeParameters": {
            "timeWindow": "3600",
            "scalingFactor": 1
          },
          "triggeringRatio": "0.1",
          "auctionExtension": "1"
        },
        "logNormal": {
          "tau": 0.000009506426342,
          "riskAversionParameter": 0.000001,
          "params": {
            "mu": 0,
            "r": 0.016,
            "sigma": 1.5
          }
        },
        "liquiditySlaParameters": {
          "priceRange": "0.03",
          "commitmentMinTimeFraction": "0.85",
          "performanceHysteresisEpochs": "1",
          "slaCompetitionFactor": "0.5"
        }
      }
    },
    "closingTimestamp": 0,
    "enactmentTimestamp": 0
  }
}

Hey, pls see new JSON to match BTC market:

{
  "rationale": {
    "title": "LINK/USD(USDT) Perpetual",
    "description": "This is a perpetual futures market for Chainlink (LINK) denominated in USD using the LINK/USD Chainlink price feed. This market will be settled in USDT. Forum discussion can be found [here](https://community.vega.xyz/t/vmp-14-create-market-link-usd-usdt-perpetual/4372)"
  },
  "terms": {
    "newMarket": {
      "changes": {
        "linearSlippageFactor": "0.001",
        "quadraticSlippageFactor": "0",
        "decimalPlaces": "3",
        "positionDecimalPlaces": "1",
        "instrument": {
          "name": "LINK/USD(USDT)-PERP",
          "code": "LINK/USD-PERP",
          "perpetual": {
            "settlementAsset": "bf1e88d19db4b3ca0d1d5bdb73718a01686b18cf731ca26adedf3c8b83802bba",
            "quoteName": "USD",
            "marginFundingFactor": "0.9",
            "interestRate": "0.1095",
            "clampLowerBound": "-0.0005",
            "clampUpperBound": "0.0005",
            "dataSourceSpecForSettlementData": {
              "external": {
                "ethOracle": {
                  "address": "0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c",
                  "abi": "[{\"inputs\":[],\"name\":\"latestAnswer\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
                  "method": "latestAnswer",
                  "normalisers": [
                    {
                      "name": "link.price",
                      "expression": "$[0]"
                    }
                  ],
                  "requiredConfirmations": 3,
                  "trigger": {
                    "timeTrigger": {
                      "every": 300
                    }
                  },
                  "filters": [
                    {
                      "key": {
                        "name": "link.price",
                        "type": "TYPE_INTEGER",
                        "numberDecimalPlaces": 8
                      },
                      "conditions": [
                        {
                          "operator": "OPERATOR_GREATER_THAN_OR_EQUAL",
                          "value": "0"
                        }
                      ]
                    }
                  ]
                }
              }
            },
            "dataSourceSpecForSettlementSchedule": {
              "internal": {
                "timeTrigger": {
                  "conditions": [
                    {
                      "operator": "OPERATOR_GREATER_THAN_OR_EQUAL",
                      "value": "0"
                    }
                  ],
                  "triggers": [
                    {
                      "every": 28800
                    }
                  ]
                }
              }
            },
            "dataSourceSpecBinding": {
              "settlementDataProperty": "link.price",
              "settlementScheduleProperty": "vegaprotocol.builtin.timetrigger"
            }
          }
        },
        "metadata": [
          "enactment:TBD",
          "base:LINK",
          "quote:USD",
          "class:fx/crypto",
          "perpetual",
          "sector:defi"
        ],
        "priceMonitoringParameters": {
          "triggers": [
            {
              "horizon": "43200",
              "probability": "0.9999999",
              "auctionExtension": "300"
            }
          ]
        },
        "liquidityMonitoringParameters": {
          "targetStakeParameters": {
            "timeWindow": "3600",
            "scalingFactor": 0.05
          },
          "triggeringRatio": "0.1",
          "auctionExtension": "1"
        },
        "logNormal": {
          "tau": 0.000009506426342,
          "riskAversionParameter": 0.000001,
          "params": {
            "mu": 0,
            "r": 0.016,
            "sigma": 1.5
          }
        },
        "liquiditySlaParameters": {
          "priceRange": "0.03",
          "commitmentMinTimeFraction": "0.85",
          "performanceHysteresisEpochs": "1",
          "slaCompetitionFactor": "0.5"
        }
      }
    },
    "closingTimestamp": 1701820800,
    "enactmentTimestamp": 1701821400
  }
}
1 Like

Hey,

This looks mostly fine, any particular reason for an interest rate (within the risk model) of 0.016 and only one price monitoring trigger?

I belive the convention so far has been to populate the enactment date in the metadata (I refer to the proposal that has already been submitted on chain with the actual anticpiated enactment date and not “TBD”).

Hey @Witold,

Thanks for the reply. The interest rate is set to 0.016 after the discussion in the BTC perp market thread. I thought I’d just replicate the same structure.

Regarding enactment, oversight on my part apologies. I also missed correctly formatting the title. Would you like me to resubmit the proposals?

Hi Jubi,

Thanks for these. One more comment regarding position decimals. With 1 position decimal the margin for the smallest order will be price x 1e-1 x RF = 11 x 0.1 x 0.02264 = 0.029304.

This is probably too low in the sense that someone could spam / ddos the network by placing many “cheap” orders on the book.

I would suggest position decimals of 0.

Also we could consider whether we really need 3 decimals on price so trade with 11.123 or with 11.12. I think in this case 3 is ok but 2 may be better.

By the way the decimals is the one thing we can’t update later with market update. We can update with governance but the process is more painful: one needs to submit a proposal to “close” the current perp market and submit a fresh new one with the right decimals. So all parties will need to “move” their positions.

1 Like

hey Jubi, quick suggestion from my end :slight_smile:

When you re-submit the proposal could you please stick to the naming convention used in the forum i.e. “title”: “[VMP-14 Create Market - LINK/USD(USDT) Perpetual]". That would be helpful when sharing on different channels with the community and keeping the consistency between forum /governance proposals. Thanks

That probably just made it’s way into the ETH perp by accident because it appears to be a default in the docs, and since we were using the ETH perp as the basis for further proposals that mistake seems to have been inherited by all subsequent market proposals.

hey edo, yep this was a silly error on my part apologies

Hey @david @Witold @Edo,

Please see the new updated JSON that I plan to resubmit

Edits:

  • Changes to risk params (pls can I have some feedback for this)
  • Fixed decimals places according to David’s feedback
  • Added 2 new price monitoring triggers (modelled off the BTC futures market) please let me know if these are fine.
  • reset interest rate back to 0% with +/-0.5% clamps
  • Fixed title

Before submitting I’ll:

  • fix enactment time in metadata
{
  "rationale": {
    "title": "VMP-14 - Create Market - LINK/USD(USDT) Perpetual",
    "description": "This is a perpetual futures market for Chainlink (LINK) denominated in USD using the LINK/USD Chainlink price feed. This market will be settled in USDT. Forum discussion can be found [here](https://community.vega.xyz/t/vmp-14-create-market-link-usd-usdt-perpetual/4372)"
  },
  "terms": {
    "newMarket": {
      "changes": {
        "linearSlippageFactor": "0.001",
        "quadraticSlippageFactor": "0",
        "decimalPlaces": "2",
        "positionDecimalPlaces": "0",
        "instrument": {
          "name": "LINK/USD(USDT)-PERP",
          "code": "LINK/USD-PERP",
          "perpetual": {
            "settlementAsset": "bf1e88d19db4b3ca0d1d5bdb73718a01686b18cf731ca26adedf3c8b83802bba",
            "quoteName": "USD",
            "marginFundingFactor": "0.9",
            "interestRate": "0.1095 ",
            "clampLowerBound": "-0.0005",
            "clampUpperBound": "0.0005",
            "dataSourceSpecForSettlementData": {
              "external": {
                "ethOracle": {
                  "address": "0x2c1d072e956AFFC0D435Cb7AC38EF18d24d9127c",
                  "abi": "[{\"inputs\":[],\"name\":\"latestAnswer\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
                  "method": "latestAnswer",
                  "normalisers": [
                    {
                      "name": "link.price",
                      "expression": "$[0]"
                    }
                  ],
                  "requiredConfirmations": 3,
                  "trigger": {
                    "timeTrigger": {
                      "every": 300
                    }
                  },
                  "filters": [
                    {
                      "key": {
                        "name": "link.price",
                        "type": "TYPE_INTEGER",
                        "numberDecimalPlaces": 8
                      },
                      "conditions": [
                        {
                          "operator": "OPERATOR_GREATER_THAN_OR_EQUAL",
                          "value": "0"
                        }
                      ]
                    }
                  ]
                }
              }
            },
            "dataSourceSpecForSettlementSchedule": {
              "internal": {
                "timeTrigger": {
                  "conditions": [
                    {
                      "operator": "OPERATOR_GREATER_THAN_OR_EQUAL",
                      "value": "0"
                    }
                  ],
                  "triggers": [
                    {
                      "every": 28800
                    }
                  ]
                }
              }
            },
            "dataSourceSpecBinding": {
              "settlementDataProperty": "link.price",
              "settlementScheduleProperty": "vegaprotocol.builtin.timetrigger"
            }
          }
        },
        "metadata": [
          "enactment:TBD",
          "base:LINK",
          "quote:USD",
          "class:fx/crypto",
          "perpetual",
          "sector:defi"
        ],
        "priceMonitoringParameters": {
          "triggers": [
            {
              "horizon": "3600",
              "probability": "0.9999999",
              "auctionExtension": "120"
            },
            {
              "horizon": "14400",
              "probability": "0.9999999",
              "auctionExtension": "180" 
            },
            {
            "horizon": "43200",
            "probability": "0.9999999",
            "auctionExtension": "300" 
            }
          ]
        },
        "liquidityMonitoringParameters": {
          "targetStakeParameters": {
            "timeWindow": "3600",
            "scalingFactor": 0.05
          },
          "triggeringRatio": "0.1",
          "auctionExtension": "1"
        },
        "logNormal": {
          "tau": 0.0001140771161,
          "riskAversionParameter": 0.000001,
          "params": {
            "mu": 0,
            "r": 0.0,
            "sigma": 1.0
          }
        },
        "liquiditySlaParameters": {
          "priceRange": "0.03",
          "commitmentMinTimeFraction": "0.85",
          "performanceHysteresisEpochs": "1",
          "slaCompetitionFactor": "0.5"
        }
      }
    },
    "closingTimestamp": 0,
    "enactmentTimestamp": 0
  }
}

Hi Jubi,

The risk stuff looks good, same as the SOL one, where I commented. The decimals look good.

Cheers!!!

1 Like

Jubi,

I don’t think Witold was referring to the interest rate for the funding params, I think he was referring to r in the risk model. I would recommend you re-instate the previous interestRate value for the funding params.

Yes, the two are independent and I was refering to the one from the risk model. Probably makes sense for clamp/IR settings across perps markets to be consistent to avoid confusion (unless there’s a good reason to change it for a particular market).

Other than that it looks good to me.

The proposal that was put forward via governance has got different risk model parameters which results in increadibly high leverage of around 170x.

Is that intentional?

looking here and here at some of the parameters in the propeosal to learn every time I vote on it. My knowledge is limited but trying. Some parameters look strange like

  • why is annualized growth rate of the risk-free asset, r=0? No discounting future cash flow?
  • why is TAU 365×24×60×60× 0,00000065 20,4984 seconds? as opposed to a suggested value of 1 hour
  • 0.1 is 10% compounded interest rate for funding rate calculation seems high?
    Also it would be educational if you could elaborate on how you ended up with that 170x estimation for someone like me
    Cheers!

Hello,

Before I answer your questions I think I should outline why I think such an aggressive value of tau was selected. I believe this to be a mistake, when I was discussing the risk model with Jubi we selected parameters that would result in a maximum leverage of ~50x on this market, it seems that he has accidentally used 6.5e-7 instead of 6.5e-6 in the proposal.

With respect to your third question, the 10.95% annual interest rate for funding rate calculation is in line with other venues in the crypto space, it works out around 0.01% every 8h. In theory you could calculate a rate that is the difference between the interest rate of the underlying and the interest rate of the quote asset, but for the sake of simplicity we proposed to set it at 10.95% for now.

With respect to tau, this is the value we vary when we want to select a set of risk model parameters that provide a particular leverage. We fix sigma to the peak annualised historical volatility of the asset, we set lambda (risk aversion parameter) to 0.000001 to provide a very high degree of confidence in the Expected Shortfall calculation result. Then we vary tau until we find a value that provides the desired level for maximum leverage. As I mentioned before we were aiming for 50x on the LINK perpetual but we have erroneously ended up with 170x. If the proposal passes then I will submit another proposal to update the risk model of this market immediately after it has enacted.

1 Like

Hey everyone, as @Ed-Commodum mentioned we derived risk params to achieve a certain leverage and during this process i accidently added an extra 0 causing higher than expected leverage. If the proposal passes we will rectify this ASAP.