VMP-20: Update targetStakeParameters.scalingFactor on pending ETH perp market

Update targetStakeParameters.scalingFactor on pending ETH perp market

We need to change the liquidityMonitoringParameters.targetStakeParameters.scalingFactor on the pending ETH perp market to be 0.05 instead of 1, following the enactment of VEGA Governance.

The target stake measurement is far too strict now, and it is costly to keep the markets out of liquidity monitoring auctions. Changing this parameter by a factor of 1/20 returns the market to the same configuration as before the enactment of VNP-016.

Full Proposal JSON:

{
    "rationale": {
        "title": "VMP-20: Change targetStakeParameters.scalingFactor from 1 to 0.05 on ETH/USD-PERP",
        "description": "Change targetStakeParameters.scalingFactor from 1 to 0.05 on ETH/USD-PERP as set out in https://community.vega.xyz/t/vmp-20-update-targetstakeparameters-scalingfactor-on-pending-eth-perp-market/4387"
    },
    "terms": {
        "updateMarket": {
            "marketId": "e63a37edae8b74599d976f5dedbf3316af82579447f7a08ae0495a021fd44d13",
            "changes": {
                "linearSlippageFactor": "0.001",
                "quadraticSlippageFactor": "0",
                "decimalPlaces": "2",
                "positionDecimalPlaces": "3",
                "instrument": {
                    "name": "ETH/USD(USDT)-PERP",
                    "code": "ETH/USD-PERP",
                    "perpetual": {
                        "settlementAsset": "bf1e88d19db4b3ca0d1d5bdb73718a01686b18cf731ca26adedf3c8b83802bba",
                        "quoteName": "USD",
                        "marginFundingFactor": "0.95",
                        "interestRate": "0",
                        "clampLowerBound": "0",
                        "clampUpperBound": "0",
                        "dataSourceSpecForSettlementData": {
                            "external": {
                                "ethOracle": {
                                    "address": "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419",
                                    "abi": "[{\"inputs\":[],\"name\":\"latestAnswer\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
                                    "method": "latestAnswer",
                                    "normalisers": [
                                        {
                                            "name": "eth.price",
                                            "expression": "$[0]"
                                        }
                                    ],
                                    "requiredConfirmations": 3,
                                    "trigger": {
                                        "timeTrigger": {
                                            "every": 30,
                                            "initial": 1700359200
                                        }
                                    },
                                    "filters": [
                                        {
                                            "key": {
                                                "name": "eth.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,
                                            "initial": 1700359200
                                        }
                                    ]
                                }
                            }
                        },
                        "dataSourceSpecBinding": {
                            "settlementDataProperty": "eth.price",
                            "settlementScheduleProperty": "vegaprotocol.builtin.timetrigger"
                        }
                    }
                },
                "metadata": [
                    "enactment:2023-11-19T02:00:00Z",
                    "base:ETH",
                    "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": 0,
        "enactmentTimestamp": 0
    }
}
1 Like

Yes we definitely need to do this. I wonder if we can submit this on chain prior to the enactment of the market creation proposal so it can be enacted asap?

Hi @davidbrent101,

Are these intentional:

  1. In metadata change of enactment field from: 2023-11-19T02:00:00Z to:2023-11-18T14:00:00Z,
  2. In dataSourceSpecForSettlementSchedule/internal/timeTrigger/triggers: omission of initial: 1700359200 field & value within the specified trigger,
  3. In dataSourceSpecForSettlementData/external/ethOracle/trigger/timeTrigger" omission of initial: 1700359200 field & value?

Other than that it looks fine to me.

@Ed-Commodum submitting prior to the enactment of market creation proposal should fine as long as enactment of the update happens after the market creation gets enacted.

1 Like

Hi @Witold, thanks for the feedback, that was a mistake. I have updated the proposed JSON in the original post.

Let’s see it on-chain then!

Hey guys,

I’ve submitted this proposal. I had to delete a bunch of immutable params and it is showing up on the UI just fine, but when you try to click into the proposal it says not found.

I don’t know what changed, but today you can vote on this proposal.