Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Governance tutorials to include perpetuals #718

Closed
neildawson opened this issue Jul 25, 2023 · 0 comments · Fixed by #767
Closed

Governance tutorials to include perpetuals #718

neildawson opened this issue Jul 25, 2023 · 0 comments · Fixed by #767
Labels
documentation Improvements or additions to documentation

Comments

@neildawson
Copy link
Contributor

neildawson commented Jul 25, 2023

The Chore

Create a new perpetual futures market proposal tutorial and an update perpetual futures market proposal.

Sample:

'{
    "proposalSubmission": {
        "reference": "BTC/USD-PERPS Incentive",
        "terms": {
            "closingTimestamp": "1695222823",
            "enactmentTimestamp": "1695222883",
            "newMarket": {
                "changes": {
                    "instrument": {
                        "name": "BTC/USD Perpetual Incentive",
                        "code": "BTC/USD-PERP Inc",

                            "perpetual": {
                                "clampLowerBound": "0",
                                "clampUpperBound": "0",
                                "interestRate": "0",
                                "marginFundingFactor": "0.1",
                                "settlementAsset": "8a246b15bf185065d3f41a710f3eea0fbbe8754a8464501cf4a6d253d69c6423",
                                "quoteName": "USD-P",
                                "dataSourceSpecForSettlementData": {
                                    "external": {
                                        "ethOracle": {
                                            "address": "0x1b44F3514812d835EB1BDB0acB33d3fA3351Ee43",
                                            "abi": "[{\"inputs\":[],\"name\":\"latestAnswer\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
                                            "method": "latestAnswer",
                                            "normalisers": [
                                                {
                                                    "name": "btc.price",
                                                    "expression": "$[0]"
                                                }
                                            ],
                                            "requiredConfirmations": 3,
                                            "trigger": {
                                                "timeTrigger": {
                                                    "every": 30
                                                }
                                            },
                                            "filters": [
                                                {
                                                    "key": {
                                                        "name": "btc.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": "btc.price",
                                    "settlementScheduleProperty": "vegaprotocol.builtin.timetrigger"
                                }
                            }

                    },
                    "metadata": [
                        "base:BTC",
                        "quote:USD-P",
                        "class:fx/crypto",
                        "quarterly",
                        "sector:defi",
                        "enactment:2023-06-15T14:00:00Z",
                        "settlement:2023-09-30T08:00:00Z"
                    ],
                    "priceMonitoringParameters": {
                        "triggers": [
                            {
                                "horizon": "3600",
                                "probability": "0.9999",
                                "auctionExtension": "120"
                            },
                            {
                                "horizon": "14400",
                                "probability": "0.9999",
                                "auctionExtension": "180"
                            },
                            {
                                "horizon": "43200",
                                "probability": "0.9999",
                                "auctionExtension": "300"
                            }
                        ]
                    },
                    "liquidityMonitoringParameters": {
                        "targetStakeParameters": {
                            "timeWindow": "3600",
                            "scalingFactor": 1
                        },
                        "triggeringRatio": "0.7",
                        "auctionExtension": "1"
                    },

                    "liquiditySlaParameters": {
                        "priceRange": "0.05",
                            "commitmentMinTimeFraction": "0.95",
                            "performanceHysteresisEpochs": 1,
                        "slaCompetitionFactor": "0.95"
                    },

                    "logNormal": {
                        "riskAversionParameter": 0.000001,
                        "tau": 0.0001140771161,
                        "params": {
                            "sigma": 1.5
                        }
                    },
                    "decimalPlaces": "1",
                    "positionDecimalPlaces": "4",
                    "linearSlippageFactor": "0.001",
                    "quadraticSlippageFactor": "0.0"
                }
            }
        },
        "rationale": {
            "description": "## Summary\n\nThis proposal requests to list BTC PERPS Incentive as a market with USD-P as a settlement asset on the Vega Network as discussed in: https://community.vega.xyz/.\n\n## Rationale\n\n- BTC is the largest Crypto asset with the highest volume and Marketcap.\n- Given the price, 1 decimal places will be used for price due to the number of valid digits in asset price. \n- Position decimal places will be set to 4 considering the value per contract\n- USDT is chosen as settlement asset due to its stability.",
            "title": "BTC USD PERPS Incentive"
        }
    }
}'

Additional details / background info

Sketch

Settlement schedules
image

@vega-issues vega-issues added the documentation Improvements or additions to documentation label Jul 25, 2023
@candida-d candida-d changed the title Update governance tutorials to include perpetuals Governance tutorials to include perpetuals Aug 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Done
2 participants