Propose new perpetuals market
Requirements
You will need:
- A connected Vega wallet, with your wallet name and public key to hand
- A minimum of whichever is larger, associated with that public key, based on the network parameter values for governance.proposal.market.minProposerBalance or spam.protection.proposal.min.tokens
- Familiarity with governance on Vega
- Familiarity with using Ethereum to provide data
Anatomy of a proposal
The contents of a changes
object specifies what will be different after the proposal. In this case, these are the changes that will occur on the network, in the form of a new market.
Instrument, liquidity monitoring parameters, price monitoring parameters, and data sources are all described in more detail below.
Rationale requires a title and description, which is are free-text fields that describe the purpose of the proposal. Within the description, include links with more information about your proposal (such as to the IPFS content or forum post) that voters can reference to learn more about the market proposal. Formatting your rationale with markdown makes it easier to read when it's displayed.
Decimal places need to be defined for both order sizes and the market. A market cannot specify more decimal places than its settlement asset supports. The values for these fields cannot be changed, even through governance.
Field | Description | Example |
---|---|---|
decimalPlaces | Sets the smallest price increment on the book that can be stored by Vega. Use with tickSize to get bigger price increments that are currently financially meaningful. Though decimalPlaces can't be changed via governance, tickSize can. | 18 |
positionDecimalPlaces | Sets the size that the smallest order / position on the market can be. Set the position decimal places such that the margin on the smallest order ends up being about 1 USD. This ensures that the market will not accept orders with very small margin minimums, protecting the network from being spammed with lots of financially insignificant orders. To figure out the ideal decimal place: Calculate the risk factor. Find the current price the asset is trading for, such as from the oracle you're using. The smallest order margin is price x 10^{-pdp} x (risk factor) . Convert to USD. If this is less than 0.5, then decrease the position decimal places (pdp) accordingly. Position decimal places (pdp) can also be negative integers. | 3 |
Timestamps are required for ending the voting period, as well as enacting the market. The time between closing and enactment also defines how long an opening auction will be, which must be smaller than/equal to the difference between the values of the network parameters governance.proposal.market.maxClose and governance.proposal.market.maxEnact.
Field | Description | Example |
---|---|---|
closingTimestamp | Timestamp (Unix time in seconds) when voting closes for this proposal. If it passes the vote, liquidity can be committed from this time. The chosen time must be between governance.proposal.market.minClose and governance.proposal.market.maxClose after the proposal submission time. (int64 as string) | 1663517914 |
enactmentTimestamp | Timestamp (Unix time in seconds) when the market will be enacted, ready for trading. The chosen time must be between the values of the network parameters governance.proposal.market.minEnact and governance.proposal.market.maxEnact after closingTimestamp . (int64 as string) | 1663604314 |
Slippage factors are parameters that determine by how much the margin slippage is affected by the liquidity component of margin in a low-volume scenario. If there is enough volume on the book, the slippage comes directly from the book and the liquidity component is not used. The suggested values are in the example column below. Margin slippage in a low-volume scenario is calculated as slippageFromFactors = linear x position + quadratic x position^2) x price
.
Field | Description | Example |
---|---|---|
linearSlippageFactor | The linear slippage factor captures that for a bigger position there is proportionally bigger liquidity risk. | 0.001 |
Instrument
An instrument contains the following properties:
Field | Description | Sample value |
---|---|---|
name | A string for the market name. Best practice is to include a full and fairly descriptive name for the instrument. | Oranges DEC18. |
code (instrument) | This is a shortcode used to easily describe the instrument. The more information you add, the easier it is for people to know what the market offers. | FX:BTCUSD/DEC18 |
perpetual | An object that provides details about the perpetual market to be proposed. | |
settlementAsset | Settlement asset requires the ID of the asset that the market will be margined in and settle in. You can get a list of supported assets by querying REST, GraphQL, or gRPC, and then selecting the asset ID. | |
quoteName | The quote name is the human-readable name/abbreviation of the settlement asset. Example: In BTCUSD, USD is the quote. | tEuro |
marginFundingFactor | Determines how much a funding payment liability contributes to a trader's margin. Must be in the range [0, 1]. | 0.9 |
interestRate | Sets the continuously compounded interest rate used in funding rate calculation. Must be in the range [-1, 1]. | 0.1 |
clampLowerBound | Lower bound for the clamp function used as part of the funding rate calculation. Must be in the range [-1, 1]. | 0 |
clampUpperBound | Upper bound for the clamp function used as part of the funding rate calculation. Must be in the range [-1, 1]. | 0 |
fundingRateScalingFactor | Scaling factor to apply to the funding payments, optional. This scales the impact that spot price deviations have on funding payments. Can be any positive real number. Adding in a 2, for example, will double the funding payments. | 2 |
fundingRateLowerBound | Lower bound that will be applied to funding payments such that the resulting funding rate will never be lower than the specified value, optional. The number submitted is converted to a percentage. For example, -0.005 will be -0.5%. Can be any real number. | -0.005 |
fundingRateUpperBound | Upper bound that will be applied to the funding payments, such that the resulting funding rate will never be greater than than the specified value, optional. The number submitted is converted to a percentage. For example, 0.005 will be 0.5%. Can be any real number. | 0.005 |
dataSourceSpecForSettlementData | This defines the Ethereum data source, the method, normalisers, required confirmations, etc, that will be used to identify the settlement price when the market expires. | |
dataSourceSpecForSettlementSchedule | This defines how the market will source data for funding, and how often to source it. | |
dataSourceSpecBinding | The fields describe how specific information provided by the data source is used. For example, they are used to set the settlement data property and the settlement schedule property. | |
tickSize | Sets the smallest possible change in the price in the market. Tick size is in relation to the market decimalPlaces , as an integer. If a BTCUSDT market is configured with 5 mdp, tick size 1 would make the smallest tick size 0.00001. Tick size can help manage a market with 'too many' decimal places, or an asset's value dropping dramatically. A value of 2000 with 5 decimalPlaces is a scaled tick size of 0.02. A minimum of 10 is recommended. | 10 |
enableTransactionReordering | Sets whether or not aggressive orders sent to the market are delayed by the number of blocks configured by the network parameter market.aggressiveOrderBlockDelay | true / false |
Data source for settlement schedule
The periodic settlements scheduled with the fields below determine how often the market's funding payments occur. It's recommended that funding payments are be less frequent than auction extensions for price monitoring. Very frequent funding payments may lead to quick price changes in the market that participants may not have time to react to. Setting longer funding payment triggers allow for more time.
The settlement schedule property contains the following fields:
Field | Description | Sample value |
---|---|---|
internal: timeTrigger | Determines when the call should be repeated after the first call, in seconds. | 3300 |
conditions | A filter for the data. The conditions that should to be matched by the data to be considered. This is an optional set of fields. For example you could use an operator and a value to denote that a price should be greater than zero | |
operator | This adds a constraint to the value, such as LESS_THAN, GREATER_THAN. For example if you wanted to ensure that the price would always be above zero, you would set the operator to ‘GREATER_THAN’ and the Value to be ‘0’ | GREATER_THAN_OR_EQUAL |
value | A number that is constrained by the operator. If providing a timestamp, use the Unix time in seconds | 0 |
triggers: initial ; every | These fields set how often the call should be repeated after the initial call, in seconds. | 1699033027; 28800 |
Data source for settlement data
Data feeds from an oracle can be used to determine when to read price data from an Ethereum contract.
Data source specs include the following properties under ethOracle
:
Field | Description | Sample value |
---|---|---|
address | Ethereum address that can sign and submit values for this data source | Valid Ethereum address |
abi | The abi tells the settlement spec how to interact with the oracle. | |
method | Method is one field that describes what information to take from the oracle. | latestRoundData |
args | Any extra information that is required from the contract. Can be left as an empty array if there is none. | |
normalisers : name , expression | Normalisers are used to convert the data returned from the contract method into a standard format. The name identifies the specific piece of data. The value is where in the contract call result the required data is located. For example $[0] is the first result. | |
requiredConfirmations | Number of network confirmations before data can be considered verified | 3 |
timeTrigger : initial ; every | Determines the first call, and how often the call should be repeated, in seconds. | 1701193129, 3000 |
filters | Filters define what data is of importance for the purposes of this market | |
key | Defines the specific type of information the data source provides that is relevant to the proposed market. Example: If a data source provides a list of prices for various markets, focus only on the specific relevant price for the market, and specifics on the data format. | |
name | Specific name of the information that the filter provides. | btc.price |
type | Specifies the data type that is emitted. For example, for btc.price , the type is an integer, as it is output as a non-fractional number | TYPE_INTEGER |
numberDecimalPlaces | Number of decimal places specifies the precision in which numerical data is emitted. Use when data is numerical | 8 |
conditions | A filter for the data. The conditions that should to be matched by the data to be considered. This is an optional set of fields. For example you could use an operator and a value to denote that a price should be greater than zero | |
operator | This adds a constraint to the value, such as LESS_THAN, GREATER_THAN. For example if you wanted to ensure that the price would always be above zero, you would set the operator to ‘GREATER_THAN’ and the Value to be ‘0’ | GREATER_THAN |
value | A number that is constrained by the operator. If providing a timestamp, use the Unix time in seconds | 0 |
dataSourceSpecBinding | Describes which property of the data source data is to be used as settlement data and when. | |
settlementDataProperty | Name of the property in the source data to be used as settlement data. | btc.price |
settlementScheduleProperty | Describes what to use to determine when to run a settlement. | vegaprotocol.builtin.timetrigger |
sourceChainId | Describes the chain ID of the data source. This chain must already be enabled in network parameters and supported by validators. |
Learn how to find and submit data in the submitting data sources tutorial. This includes examples using Pyth and Ethereum data.
Liquidity monitoring
The liquidity monitoring settings detect when the market's liquidity drops below the ideal level. See below for more details on each field.
{
// Specifies parameters related to target stake calculation.
targetStakeParameters: {
timeWindow: "3600",
scalingFactor: "0.05"
},
}
Liquidity monitoring uses the following properties:
Field | Description | Sample value |
---|---|---|
targetStakeParameters | Target stake parameters are derived from open interest history over a time window to calculate the maximum open interest. | |
timeWindow | Defines the length of time (in seconds) over which open interest is measured. | 3600 |
scalingFactor | The target stake scaling factor scales the estimated required liquidity (based on the market's risk model and current market data) to yield the market's target stake. The scaling factor must be a number greater than zero and finite | 10 |
Mark price configuration
The mark price methodology can be fine-tuned per market. If left blank, the market will default to the last price method. You can read further details about the flexible mark price fields in concepts.
Field | Description | Examples |
---|---|---|
decayWeight | Controls to what extent observation time impacts the weight in the mark price calculation. 0 implies uniform weights. | 1 |
decayPower | Controls how quickly the weight assigned to older observations should drop. The higher the value, the more weight is assigned to recent observations. | 1 |
cashAmount | Used in calculating the mark price from the order book, in asset decimals. Use the margin amount of the expected typical trade size, at maximum leverage. | A well-known highly liquid exchange uses 200 USDT on their most popular market. If you expect your market will be equally liquid, use the equivalent amount in the market's settlement asset. If you think it's likely to be 10x less liquid, use 10x less. |
sourceWeights | Determines how much weight goes to each composite price component. The order of sources used is as follows: price by trades, price by book, oracle_1, ... oracle_n, median price. 0 means the input is always ignored. | 0.5, 0.5, 0 uses an average of trades as defined via the TWAP and decay, and book as defined by the cash amount. |
sourceStalenessTolerance | How long a price source is considered valid. This uses one entry for each data source, such that the first is for the trade-based mark price, the second is for the order book-based price, and the third is for the first oracle, followed by any other data source staleness tolerance. | 1m0s |
compositePriceType | Weighted, median or last trade. | Weighted: Composite price is calculated as a weighted average of the underlying mark prices. Median: Composite price is calculated as a median of the underlying mark prices. Last trade: Composite price is calculated as the last trade price. |
"markPriceConfiguration": {
"decayWeight": "1",
"decayPower": "1",
"cashAmount": "2000000",
"sourceWeights": [
"0.5",
"0.5",
"0"
],
"sourceStalenessTolerance": [
"1m0s",
"1m0s",
"1m0s"
],
"compositePriceType": "COMPOSITE_PRICE_TYPE_WEIGHTED",
Price monitoring
Price monitoring parameters are optional, and configure the acceptable price movement bounds for price monitoring. See below for more details on each field.
{
// PriceMonitoringTrigger holds together price projection horizon τ, probability level p, and auction extension duration
triggers: [
{
// Price monitoring projection horizon τ in seconds. (int64 as string)
horizon: "43200",
// Price monitoring probability level p. (string)
probability: "0.9999999",
/* Price monitoring auction extension duration in seconds should the price
* breach its theoretical level over the specified horizon at the specified
* probability level. (string) */
auctionExtension: "3600",
}
]
}
Price monitoring uses the following properties:
Field | Description | Sample value |
---|---|---|
horizon | Price monitoring projection horizon τ in seconds (set as >0) | 43200 |
probability | Price monitoring probability level p (set as >0 and <1) | 0.9999999 |
auctionExtension | Price monitoring auction extension duration (in seconds) should the price breach its theoretical level over the specified horizon at the specified probability level (set as >0) | 600 |
You can use a maximum of 5 sets of price monitoring parameters for a market.
Risk model
Choose the individual parameters for the log-normal risk model. You should ensure the risk model parameters represent the dynamics of the underlying instrument, and that the resulting margins strike the right balance between prudence and capital efficiency.
While you cannot define exactly how much margin (or leverage) is possible, you can influence the acceptable levels of market volatility.
Read about the risk models and parameters before choosing your values.
{
// Tau (number)
tau: 0.0001140771161,
// Risk Aversion Parameter (double as number)
riskAversionParameter: "0.001",
// Risk model parameters for log normal
params: {
// Mu param (double as number)
mu: 0,
// R param (double as number)
r: 0.016,
// Sigma param (double as number)
sigma: 0.8,
}
}
The risk model uses the following properties:
Field | Description | Sample value |
---|---|---|
tau | Projection horizon measured as a year fraction used in the expected shortfall calculation to obtain the maintenance margin. Accepted values: any strictly non-negative real number; suggested value: 0.000114077116130504 - corresponds to one hour expressed as year fraction | 0.000114077116130504 |
riskAversionParameter | Probability confidence level used in expected shortfall calculation when obtaining the maintenance margin level. First, the value at risk, defined by confidence lambda is calculated. This is the cash amount that one would need to add to the position to make the probability of the value of the position and cash going negative after time tau to be less than lambda. The margin is then the expected loss of the position given that it incurred a loss bigger than the value at risk. Accepted values: strictly greater than 0 and strictly smaller than 1 | 0.00001 |
param: mu | Annualised growth rate of the underlying asset. Accepted values: any real number | 0 |
param: r | Annualised growth rate of the risk-free asset, it's used for discounting of future cash flows. Use 0.0 unless otherwise required. Accepted values: any real number | 0.0 |
param: sigma | Annualised historic volatility of the underlying asset. Accepted values: any strictly non-negative real number; suggested value: asset dependent, should be derived from the historical time-series of prices. | 0.8 (converts to 80%) |
Liquidity SLA parameters
The liquidity parameters set the requirements that liquidity providers on the market must meet in order to avoid being penalised and to earn fee revenue.
Field | Description | Sample value |
---|---|---|
liquiditySlaParameters | Parameters for minimum requirements and measurements | |
priceRange | Sets the percentage move up and down from the mid price that LPs must be within to count towards their commitment | 0.1 |
commitmentMinTimeFraction | The minimum fraction of time that LPs must spend on the book and within the price range | 0.1 |
performanceHysteresisEpochs | Sets the number of epochs over which past performance will continue to affect rewards. | 10 |
slaCompetitionFactor | Sets the maximum fraction of their accrued fees an LP that meets the SLA will lose to liquidity providers that achieved a higher SLA performance than them. | 0.2 |
liquidityFeeSettings | Optional setting for how the liquidity fee factor is determined. See liquidity fees for more. | METHOD_MARGINAL_COST (default) METHOD_CONSTANT , METHOD_WEIGHTED_AVERAGE |
feeConstant | For the fee setting METHOD_CONSTANT , a constant fee factor needs to be provided. | 0.00005 |
Liquidation strategy
Set up the liquidation strategy to minimise the impact of distressed traders on the market. These parameters can balance between minimising the market impact of disposing of distressed positions and not holding a large open volume for a long time.
Field | Description | Suggested value |
---|---|---|
disposalTimeStep | Interval, in seconds, at which the network will attempt to close a position it's acquired from distressed traders. | 30 |
disposalFraction | Fraction of the open position the market will try to close in a single attempt. Range 0 through 1 | 0.1 |
fullDisposalSize | Size of the position that the network will try to close in a single attempt | 1 |
maxFractionConsumed | Maximum fraction of the order book's total volume, within the liquidity bounds, that the network can use to close its position. Range 0 through 1 | 0.05 |
disposalSlippageRange | Decimal number greater than 0 specifying the range above and below the mid price within which the network will trade to dispose of its position. | 0.1 |
Submitting proposals in a batch
If you want to submit this proposal as part of a larger batch of proposals, follow this sample structure:
{
"batchProposalSubmission": {
"rationale": {
"title": "High level title",
"description": "Description of all parts of this batch of proposals"
},
"terms": {
"closingTimestamp": "123",
"changes": [
{
"enactmentTimestamp": 123,
"cancelTransfer": {
"changes": {
"transferId": "345"
}
}
},
{
"enactmentTimestamp": 123,
"cancelTransfer": {
"changes": {
"transferId": "789"
}
}
}
]
}
}
}
Templates and submitting
In the tabs below you'll see:
- Annotated example describing what each field is for
- JSON example
- Command line examples for different operating systems
Replace the example data with the relevant details before submitting.
- Annotated example
- JSON
- Command line (Linux / OSX)
- Command line (Windows)
{
proposalSubmission: {
rationale: {
title: "Lorem Ipsum perpetual",
description: "An orange perpetual market"
},
terms: {
newMarket: {
changes: {
// Linear slippage factor is used to cap the slippage component of maintenance margin - it is applied to the slippage volume.
linearSlippageFactor: 0.001,
// Decimal places used for the new futures market, sets the smallest price increment on the book. (uint64 as string)
decimalPlaces: "5",
// Decimal places for order sizes, sets what size the smallest order / position on the futures market can be. (int64 as string)
positionDecimalPlaces: "5",
// Instrument configuration
instrument: {
// Instrument name.
name: "Oranges Perpetual",
// Instrument code, human-readable shortcode used to describe the instrument.
code: "ORANGES.PERP",
// Perpetual product configuration
perpetual: {
// Asset ID for the product's settlement asset.
settlementAsset: "c9fe6fc24fce121b2cc72680543a886055abb560043fda394ba5376203b7527d",
// Product quote name.
quoteName: "USD",
// Controls how much the upcoming funding payment liability contributes to party's margin, in the range [0, 1].
marginFundingFactor: "0.9",
// Continuously compounded interest rate used in funding rate calculation, in the range [-1, 1].
interestRate: "0",
// Factor applied to funding-rates. This scales the impact that spot price deviations have on funding payments.
fundingRateScalingFactor: "1",
// Lower bound for the funding-rate such that the funding-rate will never be lower than this value.
fundingRateLowerBound: "-0.001",
// Upper bound for the funding-rate such that the funding-rate will never be higher than this value.
fundingRateUpperBound: "0.001",
// Lower bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1].
clampLowerBound: "0",
// Upper bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1].
clampUpperBound: "0",
internalCompositePriceConfiguration: {
// Decay weight used for calculation of mark price.
decayWeight: "1",
// Decay power used for the calculation of mark price. (string)
decayPower: "1",
// Cash amount, in asset decimals, used for the calculation of the mark price from the order book. (string)
cashAmount: "5000000",
// Weights for each composite price data source. (array)
sourceWeights: [
"0",
"1",
"0",
"1"
],
// For how long a price source is considered valid. One entry for each data source
// such that the first is for the trade based mark price, the second is for the book based price
// the third is for the first oracle, followed by more oracle data source staleness tolerance. (array)
sourceStalenessTolerance: [
"1m0s",
"1m0s",
"1m0s",
"1m0s"
],
// Which method is used for the calculation of the composite price for the market. (string)
compositePriceType: "COMPOSITE_PRICE_TYPE_WEIGHTED",
// Additional price sources to be used for internal composite price calculation. (array)
dataSourcesSpec: [
{
external: {
ethOracle: {
address: "0x719abd606155442c21b7d561426d42bd0e40a776",
abi: "[{\"inputs\": [{\"internalType\": \"bytes32\", \"name\": \"id\", \"type\": \"bytes32\"}], \"name\": \"getPrice\", \"outputs\": [{\"internalType\": \"int256\", \"name\": \"\", \"type\": \"int256\" }], \"stateMutability\": \"view\", \"type\": \"function\"}]",
method: "getPrice",
args: [
"elvB0rVq0CkEjNY5ZLOtJ3bq34Eu3BpDoxQGy1S/9ZI="
],
trigger: {
timeTrigger: {
every: "60"
}
},
requiredConfirmations: "3",
filters: [
{
key: {
name: "inj.price",
type: "TYPE_INTEGER",
numberDecimalPlaces: "18"
},
conditions: [
{
operator: "OPERATOR_GREATER_THAN",
value: "0"
}
]
}
],
normalisers: [
{
name: "inj.price",
expression: "$[0]"
}
],
sourceChainId: "100"
}
}
}
],
// List of each price source and its corresponding binding (array)
dataSourcesSpecBinding: [
{
priceSourceProperty: "inj.price"
}
]
},
dataSourceSpecForSettlementData: {
// DataSourceDefinitionExternal is the top level object used for all external
// data sources. It contains one of any of the defined `SourceType` variants.
external: {
// Contains the data specification that is received from Ethereum sources.
ethOracle: {
// The ID of the EVM based chain which is to be used to source the oracle data. (uint64 as string)
// The ID of the EVM based chain which is to be used to source the oracle data.
sourceChainId: "1",
// Ethereum address of the contract to call.
address: "0x1b44F3514812d835EB1BDB0acB33d3fA3351Ee43",
// The ABI of that contract.
abi: "[{" inputs ":[]," name ":" latestRoundData "," outputs ":[{" internalType ":" int256 "," name ":" "," type ":" int256 "}]," stateMutability ":" view "," type ":" function "}]",
/* Name of the method on the contract to call. */
method: "latestRoundData",
/* Normalisers are used to convert the data returned from the contract method
* into a standard format. The key of the map is the name of the property,
* which identifies the specific piece of data to other parts of the data
* sourcing framework, for example filters. The value is a JSONPath expression
* for expressing where in the contract call result the required data is
* located, for example $[0] indicates the first result. $[1].price would look
* in the second result returned from the contract for a structure with a key
* called 'price' and use that if it exists. */
normalisers: [
{
name: "prices.ORANGES.value",
expression: "$[0]"
}
],
// Number of confirmations required before the query is considered verified
requiredConfirmations: 3,
// Conditions for determining when to call the contract method.
trigger: {
/* Trigger for an Ethereum call based on the Ethereum block timestamp. Can be
* one-off or repeating. */
timeTrigger: {
/* Repeat the call every n seconds after the initial call. If no time for
* initial call was specified, begin repeating immediately. */
every: 30
}
},
// Filters the data returned from the contract method
filters: [
{
key: {
name: "prices.ORANGES.value",
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
}
]
}
}
},
/* Binding between the data source spec and the settlement data. */
dataSourceSpecBinding: {
/* Name of the property in the source data that should be used for settlement data.
* If it is set to "prices.BTC.value" for example, then the perpetual market will use the value of
* this property to get settlement data. */
settlementDataProperty: "prices.ORANGES.value",
settlementScheduleProperty: "vegaprotocol.builtin.timetrigger"
}
},
// Optional new futures market metadata, tags.
metadata: [
"enactment:2024-08-26T17:21:26Z",
"settlement:2024-08-25T17:21:26Z",
"source:docs.vega.xyz"
],
// PriceMonitoringParameters contains a collection of triggers to be used for a given market
priceMonitoringParameters: {
// PriceMonitoringTrigger holds together price projection horizon τ, probability level p, and auction extension duration
triggers: [
{
// Price monitoring projection horizon τ in seconds. (int64 as string)
horizon: "43200",
// Price monitoring probability level p. (string)
probability: "0.9999999",
/* Price monitoring auction extension duration in seconds should the price
* breach its theoretical level over the specified horizon at the specified
* probability level. (string) */
auctionExtension: "3600",
}
]
},
// Risk model for log normal
logNormal: {
// Tau parameter of the risk model, projection horizon measured as a year fraction used in the expected shortfall
calculation to obtain the maintenance margin,
must be a strictly non - negative real number.(number) tau: 0.0001140771161,
// Risk Aversion Parameter. (double as number)
riskAversionParameter: "0.00001",
// Risk model parameters for log normal
params: {
// Mu parameter, annualised growth rate of the underlying asset. (double as number)
mu: 0,
// R parameter, annualised growth rate of the risk-free asset, used for discounting of future cash flows, can be any real number. (double as number)
r: 0.016,
// Sigma parameter, annualised volatility of the underlying asset, must be a strictly non-negative real number. (double as number)
sigma: 0.15,
}
},
// Liquidity SLA parameters
liquiditySlaParameters: {
// (string)
priceRange: 0.1,
// Specifies the minimum fraction of time LPs must spend "on the book" providing their committed liquidity. (string)
commitmentMinTimeFraction: "0.1",
// Specifies the number of liquidity epochs over which past performance will continue to affect rewards. (uint64 as string)
performanceHysteresisEpochs: "10",
// Specifies the maximum fraction of their accrued fees an LP that meets the SLA implied by market.liquidity.commitmentMinTimeFraction will lose to liquidity providers
// that achieved a higher SLA performance than them. (string)
slaCompetitionFactor: "0.2",
},
// Liquidation strategy for this market.
liquidationStrategy: {
// Interval, in seconds, at which the network will attempt to close its position. (int64 as string)
disposalTimeStep: 500,
// Fraction of the open position the market will try to close in a single attempt; range 0 through 1. (string)
disposalFraction: "1",
// Size of the position that the network will try to close in a single attempt. (uint64 as string)
fullDisposalSize: "18446744073709551615",
// Max fraction of the total volume of the orderbook, within liquidity bounds, that the network can use to close its position; range 0 through 1. (string)
maxFractionConsumed: "1",
/* Decimal > 0 specifying the range range above and below the mid price within which the network will trade to dispose of its position.
* The value can be > 1. For example, if set to 1.5, the minimum price will be 0, ie max(0, mid_price * (1 - 1.5)), and the maximum price will be mid_price * (1 + 1.5). (string) */
disposalSlippageRange: "0.1",
},
// Specifies how the liquidity fee for the market will be calculated.
liquidityFeeSettings: {
// Method used to calculate the market's liquidity fee.
method: "METHOD_CONSTANT",
// Constant liquidity fee used when using the constant fee method. (string)
feeConstant: "0.00005",
},
// Liquidity monitoring parameters.
liquidityMonitoringParameters: {
// Specifies parameters related to target stake calculation.
targetStakeParameters: {
timeWindow: "3600",
scalingFactor: "0.05"
},
},
/* Mark price configuration. */
markPriceConfiguration: {
// Decay weight used for calculation of mark price.
decayWeight: "1",
// Decay power used for the calculation of mark price. (string)
decayPower: "1",
// Cash amount, in asset decimals, used for the calculation of the mark price from the order book. (string)
cashAmount: "5000000",
// Weights for each composite price data source. (array)
sourceWeights: [
"0",
"1",
"0"
],
// For how long a price source is considered valid. One entry for each data source
// such that the first is for the trade based mark price, the second is for the book based price
// the third is for the first oracle, followed by more oracle data source staleness tolerance. (array)
sourceStalenessTolerance: [
"1m0s",
"1m0s",
"1m0s"
],
// Which method is used for the calculation of the composite price for the market. (string)
compositePriceType: "COMPOSITE_PRICE_TYPE_WEIGHTED",
// Additional price sources to be used for internal composite price calculation. (array)
dataSourcesSpec: [],
// List of each price source and its corresponding binding (array)
dataSourcesSpecBinding: []
},
// The market tick size defines the minimum change in quote price for the market
tickSize: "1",
/* If enabled aggressive orders sent to the market will be delayed by the configured number of blocks */
enableTransactionReordering: true
}
},
// Timestamp as Unix time in seconds when voting closes for this proposal,
// constrained by `minClose` and `maxClose` network parameters. (int64 as string)
closingTimestamp: 1724602886,
// Timestamp as Unix time in seconds when proposal gets enacted if passed,
// constrained by `minEnact` and `maxEnact` network parameters. (int64 as string)
enactmentTimestamp: 1724689286,
}
}
}
- Copy the JSON example below into a text editor.
- Replace the placeholder values with those you want for the market.
- Tip: Use markdown formatting in your proposal's rationale to make for easier community review.
{
"proposalSubmission": {
"rationale": {
"title": "Lorem Ipsum perpetual",
"description": "An orange perpetual market"
},
"terms": {
"newMarket": {
"changes": {
"linearSlippageFactor": "0.001",
"decimalPlaces": "5",
"positionDecimalPlaces": "5",
"instrument": {
"name": "Oranges Perpetual",
"code": "ORANGES.PERP",
"perpetual": {
"settlementAsset": "8b52d4a3a4b0ffe733cddbc2b67be273816cfeb6ca4c8b339bac03ffba08e4e4",
"quoteName": "tEuro",
"marginFundingFactor": "0.9",
"interestRate": "0",
"fundingRateScalingFactor": "1",
"fundingRateLowerBound": "-0.001",
"fundingRateUpperBound": "0.001",
"clampLowerBound": "0",
"clampUpperBound": "0",
"internalCompositePriceConfiguration": {
"decayWeight": "1",
"decayPower": "1",
"cashAmount": "5000000",
"sourceWeights": [
"0",
"1",
"0",
"1"
],
"sourceStalenessTolerance": [
"1m0s",
"1m0s",
"1m0s",
"1m0s"
],
"compositePriceType": "COMPOSITE_PRICE_TYPE_WEIGHTED",
"dataSourcesSpec": [
{
"external": {
"ethOracle": {
"address": "0x719abd606155442c21b7d561426d42bd0e40a776",
"abi": "[{\"inputs\": [{\"internalType\": \"bytes32\", \"name\": \"id\", \"type\": \"bytes32\"}], \"name\": \"getPrice\", \"outputs\": [{\"internalType\": \"int256\", \"name\": \"\", \"type\": \"int256\" }], \"stateMutability\": \"view\", \"type\": \"function\"}]",
"method": "getPrice",
"args": [
"elvB0rVq0CkEjNY5ZLOtJ3bq34Eu3BpDoxQGy1S/9ZI="
],
"trigger": {
"timeTrigger": {
"every": "60"
}
},
"requiredConfirmations": "3",
"filters": [
{
"key": {
"name": "inj.price",
"type": "TYPE_INTEGER",
"numberDecimalPlaces": "18"
},
"conditions": [
{
"operator": "OPERATOR_GREATER_THAN",
"value": "0"
}
]
}
],
"normalisers": [
{
"name": "inj.price",
"expression": "$[0]"
}
],
"sourceChainId": "100"
}
}
}
],
"dataSourcesSpecBinding": [
{
"priceSourceProperty": "inj.price"
}
]
},
"dataSourceSpecForSettlementData": {
"external": {
"ethOracle": {
"sourceChainId": "1",
"address": "0x1b44F3514812d835EB1BDB0acB33d3fA3351Ee43",
"abi": "[{\"inputs\":[],\"name\":\"latestRoundData\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
"method": "latestRoundData",
"normalisers": [
{
"name": "prices.ORANGES.value",
"expression": "$[0]"
}
],
"requiredConfirmations": 3,
"trigger": {
"timeTrigger": {
"every": 30
}
},
"filters": [
{
"key": {
"name": "prices.ORANGES.value",
"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": "prices.ORANGES.value",
"settlementScheduleProperty": "vegaprotocol.builtin.timetrigger"
}
}
},
"metadata": [
"enactment:2024-08-26T17:21:26Z",
"settlement:2024-08-25T17:21:26Z",
"source:docs.vega.xyz"
],
"priceMonitoringParameters": {
"triggers": [
{
"horizon": "43200",
"probability": "0.9999999",
"auctionExtension": "3600"
}
]
},
"logNormal": {
"tau": 0.0001140771161,
"riskAversionParameter": 0.00001,
"params": {
"mu": 0,
"r": 0.016,
"sigma": 0.15
}
},
"liquiditySlaParameters": {
"priceRange": "0.1",
"commitmentMinTimeFraction": "0.1",
"performanceHysteresisEpochs": "10",
"slaCompetitionFactor": "0.2"
},
"liquidationStrategy": {
"disposalTimeStep": "500",
"disposalFraction": "1",
"fullDisposalSize": "18446744073709551615",
"maxFractionConsumed": "1",
"disposalSlippageRange": "0.1"
},
"liquidityFeeSettings": {
"method": "METHOD_CONSTANT",
"feeConstant": "0.00005"
},
"liquidityMonitoringParameters": {
"targetStakeParameters": {
"timeWindow": "3600",
"scalingFactor": "0.05"
}
},
"markPriceConfiguration": {
"decayWeight": "1",
"decayPower": "1",
"cashAmount": "5000000",
"sourceWeights": [
"0",
"1",
"0"
],
"sourceStalenessTolerance": [
"1m0s",
"1m0s",
"1m0s"
],
"compositePriceType": "COMPOSITE_PRICE_TYPE_WEIGHTED",
"dataSourcesSpec": [],
"dataSourcesSpecBinding": []
},
"tickSize": "1",
"enableTransactionReordering": true
}
},
"closingTimestamp": 1724602886,
"enactmentTimestamp": 1724689286
}
}
}
- Copy the command line example below into a text editor.
- Replace the placeholder values with those you want in the proposal.
- Tip: Use markdown formatting in your proposal's rationale to make for easier community review.
- Connect to your Vega wallet and use the command line to submit your proposal.
./vegawallet transaction send --wallet YOUR_WALLETNAME --pubkey YOUR_PUBLIC_KEY --network NETWORK_NAME '{
"proposalSubmission": {
"rationale": {
"title": "Lorem Ipsum perpetual",
"description": "An orange perpetual market"
},
"terms": {
"newMarket": {
"changes": {
"linearSlippageFactor": "0.001",
"decimalPlaces": "5",
"positionDecimalPlaces": "5",
"instrument": {
"name": "Oranges Perpetual",
"code": "ORANGES.PERP",
"perpetual": {
"settlementAsset": "8b52d4a3a4b0ffe733cddbc2b67be273816cfeb6ca4c8b339bac03ffba08e4e4",
"quoteName": "tEuro",
"marginFundingFactor": "0.9",
"interestRate": "0",
"fundingRateScalingFactor": "1",
"fundingRateLowerBound": "-0.001",
"fundingRateUpperBound": "0.001",
"clampLowerBound": "0",
"clampUpperBound": "0",
"internalCompositePriceConfiguration": {
"decayWeight": "1",
"decayPower": "1",
"cashAmount": "5000000",
"sourceWeights": [
"0",
"1",
"0",
"1"
],
"sourceStalenessTolerance": [
"1m0s",
"1m0s",
"1m0s",
"1m0s"
],
"compositePriceType": "COMPOSITE_PRICE_TYPE_WEIGHTED",
"dataSourcesSpec": [
{
"external": {
"ethOracle": {
"address": "0x719abd606155442c21b7d561426d42bd0e40a776",
"abi": "[{\"inputs\": [{\"internalType\": \"bytes32\", \"name\": \"id\", \"type\": \"bytes32\"}], \"name\": \"getPrice\", \"outputs\": [{\"internalType\": \"int256\", \"name\": \"\", \"type\": \"int256\" }], \"stateMutability\": \"view\", \"type\": \"function\"}]",
"method": "getPrice",
"args": [
"elvB0rVq0CkEjNY5ZLOtJ3bq34Eu3BpDoxQGy1S/9ZI="
],
"trigger": {
"timeTrigger": {
"every": "60"
}
},
"requiredConfirmations": "3",
"filters": [
{
"key": {
"name": "inj.price",
"type": "TYPE_INTEGER",
"numberDecimalPlaces": "18"
},
"conditions": [
{
"operator": "OPERATOR_GREATER_THAN",
"value": "0"
}
]
}
],
"normalisers": [
{
"name": "inj.price",
"expression": "$[0]"
}
],
"sourceChainId": "100"
}
}
}
],
"dataSourcesSpecBinding": [
{
"priceSourceProperty": "inj.price"
}
]
},
"dataSourceSpecForSettlementData": {
"external": {
"ethOracle": {
"sourceChainId": "1",
"address": "0x1b44F3514812d835EB1BDB0acB33d3fA3351Ee43",
"abi": "[{\"inputs\":[],\"name\":\"latestRoundData\",\"outputs\":[{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]",
"method": "latestRoundData",
"normalisers": [
{
"name": "prices.ORANGES.value",
"expression": "$[0]"
}
],
"requiredConfirmations": 3,
"trigger": {
"timeTrigger": {
"every": 30
}
},
"filters": [
{
"key": {
"name": "prices.ORANGES.value",
"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": "prices.ORANGES.value",
"settlementScheduleProperty": "vegaprotocol.builtin.timetrigger"
}
}
},
"metadata": [
"enactment:2024-08-26T17:21:26Z",
"settlement:2024-08-25T17:21:26Z",
"source:docs.vega.xyz"
],
"priceMonitoringParameters": {
"triggers": [
{
"horizon": "43200",
"probability": "0.9999999",
"auctionExtension": "3600"
}
]
},
"logNormal": {
"tau": 0.0001140771161,
"riskAversionParameter": 0.00001,
"params": {
"mu": 0,
"r": 0.016,
"sigma": 0.15
}
},
"liquiditySlaParameters": {
"priceRange": "0.1",
"commitmentMinTimeFraction": "0.1",
"performanceHysteresisEpochs": "10",
"slaCompetitionFactor": "0.2"
},
"liquidationStrategy": {
"disposalTimeStep": "500",
"disposalFraction": "1",
"fullDisposalSize": "18446744073709551615",
"maxFractionConsumed": "1",
"disposalSlippageRange": "0.1"
},
"liquidityFeeSettings": {
"method": "METHOD_CONSTANT",
"feeConstant": "0.00005"
},
"liquidityMonitoringParameters": {
"targetStakeParameters": {
"timeWindow": "3600",
"scalingFactor": "0.05"
}
},
"markPriceConfiguration": {
"decayWeight": "1",
"decayPower": "1",
"cashAmount": "5000000",
"sourceWeights": [
"0",
"1",
"0"
],
"sourceStalenessTolerance": [
"1m0s",
"1m0s",
"1m0s"
],
"compositePriceType": "COMPOSITE_PRICE_TYPE_WEIGHTED",
"dataSourcesSpec": [],
"dataSourcesSpecBinding": []
},
"tickSize": "1",
"enableTransactionReordering": true
}
},
"closingTimestamp": 1724602886,
"enactmentTimestamp": 1724689286
}
}
}'
- Copy the command line example below into a text editor.
- Replace the placeholder values with those you want in the proposal.
- Tip: Use markdown formatting in your proposal's rationale to make for easier community review.
- Connect to your Vega wallet and use the command line to submit your proposal.
vegawallet.exe transaction send --wallet YOUR_WALLETNAME --pubkey YOUR_PUBLIC_KEY --network NETWORK_NAME ^
"{^
\"proposalSubmission\": {^
\"rationale\": {^
\"title\": \"Lorem Ipsum perpetual\",^
\"description\": \"An orange perpetual market\"^
},^
\"terms\": {^
\"newMarket\": {^
\"changes\": {^
\"linearSlippageFactor\": \"0.001\",^
\"decimalPlaces\": \"5\",^
\"positionDecimalPlaces\": \"5\",^
\"instrument\": {^
\"name\": \"Oranges Perpetual\",^
\"code\": \"ORANGES.PERP\",^
\"perpetual\": {^
\"settlementAsset\": \"8b52d4a3a4b0ffe733cddbc2b67be273816cfeb6ca4c8b339bac03ffba08e4e4\",^
\"quoteName\": \"tEuro\",^
\"marginFundingFactor\": \"0.9\",^
\"interestRate\": \"0\",^
\"fundingRateScalingFactor\": \"1\",^
\"fundingRateLowerBound\": \"-0.001\",^
\"fundingRateUpperBound\": \"0.001\",^
\"clampLowerBound\": \"0\",^
\"clampUpperBound\": \"0\",^
\"internalCompositePriceConfiguration\": {^
\"decayWeight\": \"1\",^
\"decayPower\": \"1\",^
\"cashAmount\": \"5000000\",^
\"sourceWeights\": [^
\"0\",^
\"1\",^
\"0\",^
\"1\"^
],^
\"sourceStalenessTolerance\": [^
\"1m0s\",^
\"1m0s\",^
\"1m0s\",^
\"1m0s\"^
],^
\"compositePriceType\": \"COMPOSITE_PRICE_TYPE_WEIGHTED\",^
\"dataSourcesSpec\": [^
{^
\"external\": {^
\"ethOracle\": {^
\"address\": \"0x719abd606155442c21b7d561426d42bd0e40a776\",^
\"abi\": \"[{\\"inputs\\": [{\\"internalType\\": \\"bytes32\\", \\"name\\": \\"id\\", \\"type\\": \\"bytes32\\"}], \\"name\\": \\"getPrice\\", \\"outputs\\": [{\\"internalType\\": \\"int256\\", \\"name\\": \\"\\", \\"type\\": \\"int256\\" }], \\"stateMutability\\": \\"view\\", \\"type\\": \\"function\\"}]\",^
\"method\": \"getPrice\",^
\"args\": [^
\"elvB0rVq0CkEjNY5ZLOtJ3bq34Eu3BpDoxQGy1S/9ZI=\"^
],^
\"trigger\": {^
\"timeTrigger\": {^
\"every\": \"60\"^
}^
},^
\"requiredConfirmations\": \"3\",^
\"filters\": [^
{^
\"key\": {^
\"name\": \"inj.price\",^
\"type\": \"TYPE_INTEGER\",^
\"numberDecimalPlaces\": \"18\"^
},^
\"conditions\": [^
{^
\"operator\": \"OPERATOR_GREATER_THAN\",^
\"value\": \"0\"^
}^
]^
}^
],^
\"normalisers\": [^
{^
\"name\": \"inj.price\",^
\"expression\": \"$[0]\"^
}^
],^
\"sourceChainId\": \"100\"^
}^
}^
}^
],^
\"dataSourcesSpecBinding\": [^
{^
\"priceSourceProperty\": \"inj.price\"^
}^
]^
},^
\"dataSourceSpecForSettlementData\": {^
\"external\": {^
\"ethOracle\": {^
\"sourceChainId\": \"1\",^
\"address\": \"0x1b44F3514812d835EB1BDB0acB33d3fA3351Ee43\",^
\"abi\": \"[{\\"inputs\\":[],\\"name\\":\\"latestRoundData\\",\\"outputs\\":[{\\"internalType\\":\\"int256\\",\\"name\\":\\"\\",\\"type\\":\\"int256\\"}],\\"stateMutability\\":\\"view\\",\\"type\\":\\"function\\"}]\",^
\"method\": \"latestRoundData\",^
\"normalisers\": [^
{^
\"name\": \"prices.ORANGES.value\",^
\"expression\": \"$[0]\"^
}^
],^
\"requiredConfirmations\": 3,^
\"trigger\": {^
\"timeTrigger\": {^
\"every\": 30^
}^
},^
\"filters\": [^
{^
\"key\": {^
\"name\": \"prices.ORANGES.value\",^
\"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\": \"prices.ORANGES.value\",^
\"settlementScheduleProperty\": \"vegaprotocol.builtin.timetrigger\"^
}^
}^
},^
\"metadata\": [^
\"enactment:2024-08-26T17:21:26Z\",^
\"settlement:2024-08-25T17:21:26Z\",^
\"source:docs.vega.xyz\"^
],^
\"priceMonitoringParameters\": {^
\"triggers\": [^
{^
\"horizon\": \"43200\",^
\"probability\": \"0.9999999\",^
\"auctionExtension\": \"3600\"^
}^
]^
},^
\"logNormal\": {^
\"tau\": 0.0001140771161,^
\"riskAversionParameter\": 0.00001,^
\"params\": {^
\"mu\": 0,^
\"r\": 0.016,^
\"sigma\": 0.15^
}^
},^
\"liquiditySlaParameters\": {^
\"priceRange\": \"0.1\",^
\"commitmentMinTimeFraction\": \"0.1\",^
\"performanceHysteresisEpochs\": \"10\",^
\"slaCompetitionFactor\": \"0.2\"^
},^
\"liquidationStrategy\": {^
\"disposalTimeStep\": \"500\",^
\"disposalFraction\": \"1\",^
\"fullDisposalSize\": \"18446744073709551615\",^
\"maxFractionConsumed\": \"1\",^
\"disposalSlippageRange\": \"0.1\"^
},^
\"liquidityFeeSettings\": {^
\"method\": \"METHOD_CONSTANT\",^
\"feeConstant\": \"0.00005\"^
},^
\"liquidityMonitoringParameters\": {^
\"targetStakeParameters\": {^
\"timeWindow\": \"3600\",^
\"scalingFactor\": \"0.05\"^
}^
},^
\"markPriceConfiguration\": {^
\"decayWeight\": \"1\",^
\"decayPower\": \"1\",^
\"cashAmount\": \"5000000\",^
\"sourceWeights\": [^
\"0\",^
\"1\",^
\"0\"^
],^
\"sourceStalenessTolerance\": [^
\"1m0s\",^
\"1m0s\",^
\"1m0s\"^
],^
\"compositePriceType\": \"COMPOSITE_PRICE_TYPE_WEIGHTED\",^
\"dataSourcesSpec\": [],^
\"dataSourcesSpecBinding\": []^
},^
\"tickSize\": \"1\",^
\"enableTransactionReordering\": true^
}^
},^
\"closingTimestamp\": 1724602886,^
\"enactmentTimestamp\": 1724689286^
}^
}^
}"
Voting
All proposals are voted on by the community.
To vote, community members need, at a minimum, the larger of the values of the following network parameters governance.proposal.market.minVoterBalance or spam.protection.voting.min.tokens associated to their Vega key.
Enactment
If successful, the proposal will be enacted at the time you specify in the enactmentTimestamp
field.