VBP2 - Post-Palazzo market updates - 21st Feb 2024

VBP2 - Post-Palazzo market updates - 21st Feb 2024

Batch Summary

This batch includes updates to all 5 active markets on the network (BTC/USDT, ETH/USDT, INJ/USDT, SNX/USDT, and LDO/USDT) so they can take advantage of the new features delivered in the Palazzo Mistero release.

The batch contains β€” at a high level β€” the following updates:

  • Addition of funding rate upper and lower clamps to limit the impact of adverse funding rates
  • Changes to utilise the new internalCompositePriceConfiguration to make use of multiple data sources including new ethereum L2s to set the mark price
  • Addition of new price monitoring bounds for better protection against manipulation
  • Addition of new config to support new liquidation method
  • Additional metadata cleanup

Note that this proposal does not include resuming the markets. This is proposed so that the markets can be observed while they are suspended so that the new oracle data sourcing can be verified to be working as expected. The markets should be resumed in another later proposal once the community is satisfied.

Rationale

The full rationale including supporting analysis can be found at the link below.

https://github.com/vegaprotocol/governance-templates/tree/main/mainnet/0.74-proposal-templates

It is important to note that the recommendations and rationale presented in the repo are recommendations based on testing conducted by the project team, but they are not the only approach. It is expected that the community will review and debate these changes and agree on an appropriate way forward in the forums before ratifying this via on-chain governance.

4 Likes

In full support, looking forward to seeing how the markets end up performing with the proposed updates!

Thanks for linking to the templates. I am reading through them and wrapping my head around all the new parameters. I will prepare some JSON for this batch proposal with some values that I personally think are appropriate then post them here for further discussion.

Below is the batch JSON for the BTC and ETH markets with my proposed values. The main changes I propose are as follows:

Funding rate bounds are proposed to be +/- 10 basis points as I believe 100 basis points is still way too high. It would result in large spreads around funding events as LPs try to avoid being exploited:

fundingRateLowerBound: β€œ-0.001”
fundingRateUpperBound: β€œ0.001”

I propose to loosen the risk model slightly to yield a max leverage of roughly 100x:

logNormal.params.sigma: 1.0

I propose to modify the SLA params such that the time commitment is more relaxed than the current settings on mainnet, the hysteresis epochs are set to 0, and the competition factor is increased. I believe these settings will provide a better experience for LPs while still maintaining adequate penalties for sub-optimal performance.

liquiditySlaParameters.commitmentMinTimeFraction: β€œ0.75”
liquiditySlaParameters.performanceHysteresisEpochs: β€œ0”
liquiditySlaParameters.slaCompetitionFactor: β€œ0.8”

I believe I have left all other values as the defaults that were defined in the template linked to by David.

Full JSON:

{
    "batchProposalSubmission": {
      "rationale": {
        "description": "Update market BTC/USD and ETH/USD",
        "title": "Update Markets to support new v0.74.x features"
      },
      "reference": "***********TO_UPDATE_OR_REMOVE********",
      "terms": {
        "closingTimestamp": "*******TO_UPDATE*******",
        "changes": [
          {
            "enactmentTimestamp": "*******TO_UPDATE*******",
            "updateMarket": {
              "marketId": "4e9081e20e9e81f3e747d42cb0c9b8826454df01899e6027a22e771e19cc79fc",
              "changes": {
                "instrument": {
                  "code": "BTCUSDT.PERP",
                  "name": "Bitcoin / Tether USD (Perpetual)",
                  "perpetual": {
                    "quoteName": "USDT",
                    "marginFundingFactor": "0.9",
                    "interestRate": "0.1095",
                    "clampLowerBound": "-0.0005",
                    "clampUpperBound": "0.0005",
                    "fundingRateLowerBound": "-0.001",
                    "fundingRateUpperBound": "0.001",
                    "dataSourceSpecForSettlementSchedule": {
                      "internal": {
                        "timeTrigger": {
                          "conditions": [
                            {
                              "operator": "OPERATOR_GREATER_THAN",
                              "value": "0"
                            }
                          ],
                          "triggers": [
                            {
                              "every": "28800"
                            }
                          ]
                        }
                      }
                    },
                    "dataSourceSpecForSettlementData": {
                      "external": {
                        "ethOracle": {
                          "address": "0x719abd606155442c21b7d561426d42bd0e40a776",
                          "abi": "[{\n    \"inputs\": [\n      {\n        \"internalType\": \"bytes32\",\n        \"name\": \"id\",\n        \"type\": \"bytes32\"\n      }\n    ],\n    \"name\": \"getPrice\",\n    \"outputs\": [\n      {\n        \"internalType\": \"int256\",\n        \"name\": \"\",\n        \"type\": \"int256\"\n      }\n    ],\n    \"stateMutability\": \"view\",\n    \"type\": \"function\"\n    }]",
                          "method": "getPrice",
                          "args": [
                            "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"
                          ],
                          "trigger": {
                            "timeTrigger": {
                              "every": "60"
                            }
                          },
                          "requiredConfirmations": "3",
                          "filters": [
                            {
                              "key": {
                                "name": "btc.price",
                                "type": "TYPE_INTEGER",
                                "numberDecimalPlaces": "18"
                              },
                              "conditions": [
                                {
                                  "operator": "OPERATOR_GREATER_THAN",
                                  "value": "0"
                                }
                              ]
                            }
                          ],
                          "normalisers": [
                            {
                              "name": "btc.price",
                              "expression": "$[0]"
                            }
                          ],
                          "sourceChainId": "100"
                        }
                      }
                    },
                    "dataSourceSpecBinding": {
                      "settlementDataProperty": "btc.price",
                      "settlementScheduleProperty": "vegaprotocol.builtin.timetrigger"
                    },
                    "fundingRateScalingFactor": "1.0",
                    "internalCompositePriceConfiguration": {
                      "decayWeight": "1.0",
                      "decayPower": "1",
                      "cashAmount": "50000000",
                      "sourceWeights": [
                        "0.0",
                        "0.999",
                        "0.001",
                        "0.0"
                      ],
                      "sourceStalenessTolerance": [
                        "1m",
                        "1m",
                        "10m",
                        "10m"
                      ],
                      "compositePriceType": "COMPOSITE_PRICE_TYPE_WEIGHTED",
                      "dataSourcesSpec": [
                        {
                          "external": {
                            "ethOracle": {
                              "address": "0x719abd606155442c21b7d561426d42bd0e40a776",
                              "abi": "[{\n    \"inputs\": [\n      {\n        \"internalType\": \"bytes32\",\n        \"name\": \"id\",\n        \"type\": \"bytes32\"\n      }\n    ],\n    \"name\": \"getPrice\",\n    \"outputs\": [\n      {\n        \"internalType\": \"int256\",\n        \"name\": \"\",\n        \"type\": \"int256\"\n      }\n    ],\n    \"stateMutability\": \"view\",\n    \"type\": \"function\"\n    }]",
                              "method": "getPrice",
                              "args": [
                                "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"
                              ],
                              "trigger": {
                                "timeTrigger": {
                                  "every": "60"
                                }
                              },
                              "requiredConfirmations": "3",
                              "filters": [
                                {
                                  "key": {
                                    "name": "btc.price",
                                    "type": "TYPE_INTEGER",
                                    "numberDecimalPlaces": "18"
                                  },
                                  "conditions": [
                                    {
                                      "operator": "OPERATOR_GREATER_THAN",
                                      "value": "0"
                                    }
                                  ]
                                }
                              ],
                              "normalisers": [
                                {
                                  "name": "btc.price",
                                  "expression": "$[0]"
                                }
                              ],
                              "sourceChainId": "100"
                            }
                          }
                        }
                      ],
                      "dataSourcesSpecBinding": [
                        {
                          "priceSourceProperty": "btc.price"
                        }
                      ]
                    }
                  }
                },
                "metadata": [
                  "base:BTC",
                  "quote:USD",
                  "oracle:pyth",
                  "chain:gnosis",
                  "class:fx/crypto",
                  "perpetual",
                  "sector:defi"
                ],
                "priceMonitoringParameters": {
                  "triggers": [
                    {
                      "horizon": "4320",
                      "probability": "0.99",
                      "auctionExtension": "300"
                    },
                    {
                      "horizon": "1440",
                      "probability": "0.99",
                      "auctionExtension": "180"
                    },
                    {
                      "horizon": "360",
                      "probability": "0.99",
                      "auctionExtension": "120"
                    }
                  ]
                },
                "liquidityMonitoringParameters": {
                  "targetStakeParameters": {
                    "timeWindow": "3600",
                    "scalingFactor": 0.05
                  },
                  "triggeringRatio": "0.9",
                  "auctionExtension": "1"
                },
                "logNormal": {
                  "riskAversionParameter": 1e-06,
                  "tau": 3.80258e-06,
                  "params": {
                    "mu": 0,
                    "r": 0,
                    "sigma": 1.0
                  }
                },
                "linearSlippageFactor": "0.001",
                "quadraticSlippageFactor": "0",
                "liquiditySlaParameters": {
                  "priceRange": "0.03",
                  "commitmentMinTimeFraction": "0.75",
                  "performanceHysteresisEpochs": "0",
                  "slaCompetitionFactor": "0.8"
                },
                "liquidityFeeSettings": null,
                "liquidationStrategy": {
                  "disposalTimeStep": "30",
                  "disposalFraction": "0.1",
                  "fullDisposalSize": "0",
                  "maxFractionConsumed": "0.1"
                },
                "markPriceConfiguration": {
                  "decayWeight": "1.0",
                  "decayPower": "1",
                  "cashAmount": "5000000",
                  "sourceWeights": [
                    "0.0",
                    "0.0",
                    "0.0",
                    "1.0"
                  ],
                  "sourceStalenessTolerance": [
                    "1m",
                    "1m",
                    "1m",
                    "1m"
                  ],
                  "compositePriceType": "COMPOSITE_PRICE_TYPE_WEIGHTED",
                  "dataSourcesSpec": [
                    {
                      "external": {
                        "ethOracle": {
                          "address": "0x719abd606155442c21b7d561426d42bd0e40a776",
                          "abi": "[{\n    \"inputs\": [\n      {\n        \"internalType\": \"bytes32\",\n        \"name\": \"id\",\n        \"type\": \"bytes32\"\n      }\n    ],\n    \"name\": \"getPrice\",\n    \"outputs\": [\n      {\n        \"internalType\": \"int256\",\n        \"name\": \"\",\n        \"type\": \"int256\"\n      }\n    ],\n    \"stateMutability\": \"view\",\n    \"type\": \"function\"\n    }]",
                          "method": "getPrice",
                          "args": [
                            "0xe62df6c8b4a85fe1a67db44dc12de5db330f7ac66b72dc658afedf0f4a415b43"
                          ],
                          "trigger": {
                            "timeTrigger": {
                              "every": "60"
                            }
                          },
                          "requiredConfirmations": "3",
                          "filters": [
                            {
                              "key": {
                                "name": "btc.price",
                                "type": "TYPE_INTEGER",
                                "numberDecimalPlaces": "18"
                              },
                              "conditions": [
                                {
                                  "operator": "OPERATOR_GREATER_THAN",
                                  "value": "0"
                                }
                              ]
                            }
                          ],
                          "normalisers": [
                            {
                              "name": "btc.price",
                              "expression": "$[0]"
                            }
                          ],
                          "sourceChainId": "100"
                        }
                      }
                    }
                  ],
                  "dataSourcesSpecBinding": [
                    {
                      "priceSourceProperty": "btc.price"
                    }
                  ]
                }
              }
            }
          },
          {
            "enactmentTimestamp": "*********TO_UPDATE*********",
            "updateMarket": {
              "marketId": "e63a37edae8b74599d976f5dedbf3316af82579447f7a08ae0495a021fd44d13",
              "changes": {
                "instrument": {
                  "code": "ETHUSDT.PERP",
                  "name": "Ether / Tether USD (Perpetual)",
                  "perpetual": {
                    "quoteName": "USDT",
                    "marginFundingFactor": "0.9",
                    "interestRate": "0.1095",
                    "clampLowerBound": "-0.0005",
                    "clampUpperBound": "0.0005",
                    "fundingRateLowerBound": "-0.001",
                    "fundingRateUpperBound": "0.001",
                    "dataSourceSpecForSettlementSchedule": {
                      "internal": {
                        "timeTrigger": {
                          "conditions": [
                            {
                              "operator": "OPERATOR_GREATER_THAN",
                              "value": "0"
                            }
                          ],
                          "triggers": [
                            {
                              "every": "28800"
                            }
                          ]
                        }
                      }
                    },
                    "dataSourceSpecForSettlementData": {
                      "external": {
                        "ethOracle": {
                          "address": "0x719abd606155442c21b7d561426d42bd0e40a776",
                          "abi": "[{\n    \"inputs\": [\n      {\n        \"internalType\": \"bytes32\",\n        \"name\": \"id\",\n        \"type\": \"bytes32\"\n      }\n    ],\n    \"name\": \"getPrice\",\n    \"outputs\": [\n      {\n        \"internalType\": \"int256\",\n        \"name\": \"\",\n        \"type\": \"int256\"\n      }\n    ],\n    \"stateMutability\": \"view\",\n    \"type\": \"function\"\n    }]",
                          "method": "getPrice",
                          "args": [
                            "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace"
                          ],
                          "trigger": {
                            "timeTrigger": {
                              "every": "60"
                            }
                          },
                          "requiredConfirmations": "3",
                          "filters": [
                            {
                              "key": {
                                "name": "eth.price",
                                "type": "TYPE_INTEGER",
                                "numberDecimalPlaces": "18"
                              },
                              "conditions": [
                                {
                                  "operator": "OPERATOR_GREATER_THAN",
                                  "value": "0"
                                }
                              ]
                            }
                          ],
                          "normalisers": [
                            {
                              "name": "eth.price",
                              "expression": "$[0]"
                            }
                          ],
                          "sourceChainId": "100"
                        }
                      }
                    },
                    "dataSourceSpecBinding": {
                      "settlementDataProperty": "eth.price",
                      "settlementScheduleProperty": "vegaprotocol.builtin.timetrigger"
                    },
                    "fundingRateScalingFactor": "1.0",
                    "internalCompositePriceConfiguration": {
                      "decayWeight": "1.0",
                      "decayPower": "1",
                      "cashAmount": "50000000",
                      "sourceWeights": [
                        "0.0",
                        "0.999",
                        "0.001",
                        "0.0"
                      ],
                      "sourceStalenessTolerance": [
                        "1m",
                        "1m",
                        "10m",
                        "10m"
                      ],
                      "compositePriceType": "COMPOSITE_PRICE_TYPE_WEIGHTED",
                      "dataSourcesSpec": [
                        {
                          "external": {
                            "ethOracle": {
                              "address": "0x719abd606155442c21b7d561426d42bd0e40a776",
                              "abi": "[{\n    \"inputs\": [\n      {\n        \"internalType\": \"bytes32\",\n        \"name\": \"id\",\n        \"type\": \"bytes32\"\n      }\n    ],\n    \"name\": \"getPrice\",\n    \"outputs\": [\n      {\n        \"internalType\": \"int256\",\n        \"name\": \"\",\n        \"type\": \"int256\"\n      }\n    ],\n    \"stateMutability\": \"view\",\n    \"type\": \"function\"\n    }]",
                              "method": "getPrice",
                              "args": [
                                "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace"
                              ],
                              "trigger": {
                                "timeTrigger": {
                                  "every": "60"
                                }
                              },
                              "requiredConfirmations": "3",
                              "filters": [
                                {
                                  "key": {
                                    "name": "eth.price",
                                    "type": "TYPE_INTEGER",
                                    "numberDecimalPlaces": "18"
                                  },
                                  "conditions": [
                                    {
                                      "operator": "OPERATOR_GREATER_THAN",
                                      "value": "0"
                                    }
                                  ]
                                }
                              ],
                              "normalisers": [
                                {
                                  "name": "eth.price",
                                  "expression": "$[0]"
                                }
                              ],
                              "sourceChainId": "100"
                            }
                          }
                        }
                      ],
                      "dataSourcesSpecBinding": [
                        {
                          "priceSourceProperty": "eth.price"
                        }
                      ]
                    }
                  }
                },
                "metadata": [
                  "base:ETH",
                  "quote:USD",
                  "oracle:pyth",
                  "chain:gnosis",
                  "class:fx/crypto",
                  "perpetual",
                  "sector:defi"
                ],
                "priceMonitoringParameters": {
                  "triggers": [
                    {
                      "horizon": "4320",
                      "probability": "0.99",
                      "auctionExtension": "300"
                    },
                    {
                      "horizon": "1440",
                      "probability": "0.99",
                      "auctionExtension": "180"
                    },
                    {
                      "horizon": "360",
                      "probability": "0.99",
                      "auctionExtension": "120"
                    }
                  ]
                },
                "liquidityMonitoringParameters": {
                  "targetStakeParameters": {
                    "timeWindow": "3600",
                    "scalingFactor": 0.05
                  },
                  "triggeringRatio": "0.9",
                  "auctionExtension": "1"
                },
                "logNormal": {
                  "riskAversionParameter": 1e-06,
                  "tau": 3.80258e-06,
                  "params": {
                    "mu": 0,
                    "r": 0,
                    "sigma": 1.0
                  }
                },
                "linearSlippageFactor": "0.001",
                "quadraticSlippageFactor": "0",
                "liquiditySlaParameters": {
                  "priceRange": "0.03",
                  "commitmentMinTimeFraction": "0.75",
                  "performanceHysteresisEpochs": "0",
                  "slaCompetitionFactor": "0.8"
                },
                "liquidityFeeSettings": null,
                "liquidationStrategy": {
                  "disposalTimeStep": "30",
                  "disposalFraction": "0.1",
                  "fullDisposalSize": "0",
                  "maxFractionConsumed": "0.1"
                },
                "markPriceConfiguration": {
                  "decayWeight": "1.0",
                  "decayPower": "1",
                  "cashAmount": "5000000",
                  "sourceWeights": [],
                  "sourceStalenessTolerance": [
                    "1m",
                    "1m",
                    "1m",
                    "1m"
                  ],
                  "compositePriceType": "COMPOSITE_PRICE_TYPE_MEDIAN",
                  "dataSourcesSpec": [
                    {
                      "external": {
                        "ethOracle": {
                          "address": "0x719abd606155442c21b7d561426d42bd0e40a776",
                          "abi": "[{\n    \"inputs\": [\n      {\n        \"internalType\": \"bytes32\",\n        \"name\": \"id\",\n        \"type\": \"bytes32\"\n      }\n    ],\n    \"name\": \"getPrice\",\n    \"outputs\": [\n      {\n        \"internalType\": \"int256\",\n        \"name\": \"\",\n        \"type\": \"int256\"\n      }\n    ],\n    \"stateMutability\": \"view\",\n    \"type\": \"function\"\n    }]",
                          "method": "getPrice",
                          "args": [
                            "0xff61491a931112ddf1bd8147cd1b641375f79f5825126d665480874634fd0ace"
                          ],
                          "trigger": {
                            "timeTrigger": {
                              "every": "60"
                            }
                          },
                          "requiredConfirmations": "3",
                          "filters": [
                            {
                              "key": {
                                "name": "eth.price",
                                "type": "TYPE_INTEGER",
                                "numberDecimalPlaces": "18"
                              },
                              "conditions": [
                                {
                                  "operator": "OPERATOR_GREATER_THAN",
                                  "value": "0"
                                }
                              ]
                            }
                          ],
                          "normalisers": [
                            {
                              "name": "eth.price",
                              "expression": "$[0]"
                            }
                          ],
                          "sourceChainId": "100"
                        }
                      }
                    }
                  ],
                  "dataSourcesSpecBinding": [
                    {
                      "priceSourceProperty": "eth.price"
                    }
                  ]
                }
              }
            }
          }
        ]
      }
    }
  }
2 Likes

Let’s vote! I like to get back to trading on Vega.