governance.proto
path vega/governance.proto
package vega
Messages
FutureProduct
Future product configuration
Name | Type | Description |
---|---|---|
settlement_asset | string | Asset ID for the product's settlement asset. |
quote_name | string | Product quote name. |
data_source_spec_for_settlement_data | DataSourceDefinition | Data source spec describing the data source for settlement. |
data_source_spec_for_trading_termination | DataSourceDefinition | The external data source spec describing the data source of trading termination. |
data_source_spec_binding | DataSourceSpecToFutureBinding | Binding between the data source spec and the settlement data. |
GovernanceData
Governance data
Name | Type | Description |
---|---|---|
proposal | Proposal | Governance proposal that is being voted on. |
yes | Vote | All YES votes in favour of the proposal above. |
no | Vote | All NO votes against the proposal above. |
yes_party | GovernanceData.YesPartyEntry | All latest YES votes by party which is guaranteed to be unique, where key (string) is the party ID i.e. public key and value (Vote) is the vote cast by the given party. |
no_party | GovernanceData.NoPartyEntry | All latest NO votes by party which is guaranteed to be unique, where key (string) is the party ID i.e. public key and value (Vote) is the vote cast by the given party. |
GovernanceData.NoPartyEntry
Name | Type | Description |
---|---|---|
key | string | |
value | Vote |
GovernanceData.YesPartyEntry
Name | Type | Description |
---|---|---|
key | string | |
value | Vote |
InstrumentConfiguration
Instrument configuration
Name | Type | Description |
---|---|---|
name | string | Instrument name. |
code | string | Instrument code, human-readable shortcode used to describe the instrument. |
future | FutureProduct | Future. |
NewAsset
New asset on Vega
Name | Type | Description |
---|---|---|
changes | AssetDetails | Configuration of the new asset. |
NewFreeform
Freeform proposal This message is just used as a placeholder to sort out the nature of the proposal once parsed.
Name | Type | Description |
---|
NewMarket
New market on Vega
Name | Type | Description |
---|---|---|
changes | NewMarketConfiguration | Configuration of the new market. |
NewMarketConfiguration
Configuration for a new market on Vega
Name | Type | Description |
---|---|---|
instrument | InstrumentConfiguration | New market instrument configuration. |
decimal_places | uint64 | Decimal places used for the new market, sets the smallest price increment on the book. |
metadata | string | Optional new market metadata, tags. |
price_monitoring_parameters | PriceMonitoringParameters | Price monitoring parameters. |
liquidity_monitoring_parameters | LiquidityMonitoringParameters | Liquidity monitoring parameters. |
simple | SimpleModelParams | Simple risk model parameters, valid only if MODEL_SIMPLE is selected. |
log_normal | LogNormalRiskModel | Log normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected. |
position_decimal_places | int64 | Decimal places for order sizes, sets what size the smallest order / position on the market can be. |
lp_price_range | string | Percentage move up and down from the mid price which specifies the range of price levels over which automated liquidity provision orders will be deployed. |
linear_slippage_factor | string | Linear slippage factor is used to cap the slippage component of maintenance margin - it is applied to the slippage volume. |
quadratic_slippage_factor | string | Quadratic slippage factor is used to cap the slippage component of maintenance margin - it is applied to the square of the slippage volume. |
Proposal
Governance proposal
Name | Type | Description |
---|---|---|
id | string | Unique proposal ID. |
reference | string | Proposal reference. |
party_id | string | Party ID i.e. public key of the party submitting the proposal. |
state | Proposal.State | Current state of the proposal, i.e. open, passed, failed etc. |
timestamp | int64 | Proposal timestamp for date and time as Unix time in nanoseconds when proposal was submitted to the network. |
terms | ProposalTerms | Proposal configuration and the actual change that is meant to be executed when proposal is enacted. |
reason | ProposalError | Reason for the current state of the proposal, this may be set in case of REJECTED and FAILED statuses. |
error_details | string | Detailed error associated to the reason. |
rationale | ProposalRationale | Rationale behind a proposal. |
required_participation | string | Required vote participation for this proposal. |
required_majority | string | Required majority for this proposal. |
required_liquidity_provider_participation | string | Required participation from liquidity providers, optional but is required for market update proposal. |
required_liquidity_provider_majority | string | Required majority from liquidity providers, optional but is required for market update proposal. |
ProposalRationale
Rationale behind a proposal.
Name | Type | Description |
---|---|---|
description | string | Description to show a short title / something in case the link goes offline. This is to be between 0 and 20k unicode characters. This is mandatory for all proposals. |
title | string | Title to be used to give a short description of the proposal in lists. This is to be between 0 and 100 unicode characters. This is mandatory for all proposals. |
ProposalTerms
Terms for a governance proposal on Vega
Name | Type | Description |
---|---|---|
closing_timestamp | int64 | Timestamp as Unix time in seconds when voting closes for this proposal, constrained by `minClose` and `maxClose` network parameters. |
enactment_timestamp | int64 | Timestamp as Unix time in seconds when proposal gets enacted if passed, constrained by `minEnact` and `maxEnact` network parameters. |
validation_timestamp | int64 | Validation timestamp as Unix time in seconds. |
update_market | UpdateMarket | Proposal change for modifying an existing market on Vega. |
new_market | NewMarket | Proposal change for creating new market on Vega. |
update_network_parameter | UpdateNetworkParameter | Proposal change for updating Vega network parameters. |
new_asset | NewAsset | Proposal change for creating new assets on Vega. |
new_freeform | NewFreeform | Proposal change for a freeform request, which can be voted on but does not change the behaviour of the system, and can be used to gauge community sentiment. |
update_asset | UpdateAsset | Proposal change for updating an asset. |
UpdateAsset
Update an existing asset on Vega
Name | Type | Description |
---|---|---|
asset_id | string | Asset ID the update is for. |
changes | AssetDetailsUpdate | Changes to apply on an existing asset. |
UpdateFutureProduct
Future product configuration
Name | Type | Description |
---|---|---|
quote_name | string | Human-readable name/abbreviation of the quote name. |
data_source_spec_for_settlement_data | DataSourceDefinition | The data source spec describing the data of settlement data. |
data_source_spec_for_trading_termination | DataSourceDefinition | The data source spec describing the data source for trading termination. |
data_source_spec_binding | DataSourceSpecToFutureBinding | The binding between the data source spec and the settlement data. |
UpdateInstrumentConfiguration
Instrument configuration
Name | Type | Description |
---|---|---|
code | string | Instrument code, human-readable shortcode used to describe the instrument. |
future | UpdateFutureProduct | Future. |
UpdateMarket
Update an existing market on Vega
Name | Type | Description |
---|---|---|
market_id | string | Market ID the update is for. |
changes | UpdateMarketConfiguration | Updated configuration of the market. |
UpdateMarketConfiguration
Configuration to update a market on Vega
Name | Type | Description |
---|---|---|
instrument | UpdateInstrumentConfiguration | Updated market instrument configuration. |
metadata | string | Optional market metadata, tags. |
price_monitoring_parameters | PriceMonitoringParameters | Price monitoring parameters. |
liquidity_monitoring_parameters | LiquidityMonitoringParameters | Liquidity monitoring parameters. |
simple | SimpleModelParams | Simple risk model parameters, valid only if MODEL_SIMPLE is selected. |
log_normal | LogNormalRiskModel | Log normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected. |
lp_price_range | string | Percentage move up and down from the mid price which specifies the range of price levels over which automated liquidity provision orders will be deployed. |
linear_slippage_factor | string | Linear slippage factor is used to cap the slippage component of maintenance margin - it is applied to the slippage volume. |
quadratic_slippage_factor | string | Quadratic slippage factor is used to cap the slippage component of maintenance margin - it is applied to the square of the slippage volume. |
UpdateNetworkParameter
Update network configuration on Vega
Name | Type | Description |
---|---|---|
changes | NetworkParameter | The network parameter to update. |
Vote
Governance vote
Name | Type | Description |
---|---|---|
party_id | string | Voter's party ID. |
value | Vote.Value | Actual vote. |
proposal_id | string | Proposal ID being voted on. |
timestamp | int64 | Vote timestamp for date and time as Unix time in nanoseconds when vote was submitted to the network. |
total_governance_token_balance | string | Total number of governance token for the party that cast the vote. |
total_governance_token_weight | string | The weight of this vote based on the total number of governance tokens. |
total_equity_like_share_weight | string | The weight of the vote compared to the total amount of equity-like share on the market. |
Enums
Proposal.State
Proposal state transition: Open -> - Passed -> Enacted. - Passed -> Failed. - Declined Rejected Proposal can enter Failed state from any other state
Name | Number | Description |
---|---|---|
STATE_UNSPECIFIED | 0 | Default value, always invalid |
STATE_FAILED | 1 | Proposal enactment has failed - even though proposal has passed, its execution could not be performed |
STATE_OPEN | 2 | Proposal is open for voting |
STATE_PASSED | 3 | Proposal has gained enough support to be executed |
STATE_REJECTED | 4 | Proposal wasn't accepted i.e. proposal terms failed validation due to wrong configuration or failed to meet network requirements. |
STATE_DECLINED | 5 | Proposal didn't get enough votes, e.g. either failed to gain required participation or majority level. |
STATE_ENACTED | 6 | Proposal enacted |
STATE_WAITING_FOR_NODE_VOTE | 7 | Waiting for node validation of the proposal |
ProposalError
List of possible errors that can cause a proposal to be in state rejected or failed
Name | Number | Description |
---|---|---|
PROPOSAL_ERROR_UNSPECIFIED | 0 | Default value |
PROPOSAL_ERROR_CLOSE_TIME_TOO_SOON | 1 | Specified close time is too early based on network parameters |
PROPOSAL_ERROR_CLOSE_TIME_TOO_LATE | 2 | Specified close time is too late based on network parameters |
PROPOSAL_ERROR_ENACT_TIME_TOO_SOON | 3 | Specified enactment time is too early based on network parameters |
PROPOSAL_ERROR_ENACT_TIME_TOO_LATE | 4 | Specified enactment time is too late based on network parameters |
PROPOSAL_ERROR_INSUFFICIENT_TOKENS | 5 | Proposer for this proposal has insufficient tokens |
PROPOSAL_ERROR_INVALID_INSTRUMENT_SECURITY | 6 | Instrument quote name and base name were the same |
PROPOSAL_ERROR_NO_PRODUCT | 7 | Proposal has no product |
PROPOSAL_ERROR_UNSUPPORTED_PRODUCT | 8 | Specified product is not supported |
PROPOSAL_ERROR_NO_TRADING_MODE | 11 | Proposal has no trading mode |
PROPOSAL_ERROR_UNSUPPORTED_TRADING_MODE | 12 | Proposal has an unsupported trading mode |
PROPOSAL_ERROR_NODE_VALIDATION_FAILED | 13 | Proposal failed node validation |
PROPOSAL_ERROR_MISSING_BUILTIN_ASSET_FIELD | 14 | Field is missing in a builtin asset source |
PROPOSAL_ERROR_MISSING_ERC20_CONTRACT_ADDRESS | 15 | Contract address is missing in the ERC20 asset source |
PROPOSAL_ERROR_INVALID_ASSET | 16 | Asset ID is invalid or does not exist on the Vega network |
PROPOSAL_ERROR_INCOMPATIBLE_TIMESTAMPS | 17 | Proposal terms timestamps are not compatible (Validation < Closing < Enactment) |
PROPOSAL_ERROR_NO_RISK_PARAMETERS | 18 | No risk parameters were specified |
PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_KEY | 19 | Invalid key in update network parameter proposal |
PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_VALUE | 20 | Invalid value in update network parameter proposal |
PROPOSAL_ERROR_NETWORK_PARAMETER_VALIDATION_FAILED | 21 | Validation failed for network parameter proposal |
PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_SMALL | 22 | Opening auction duration is less than the network minimum opening auction time |
PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_LARGE | 23 | Opening auction duration is more than the network minimum opening auction time |
PROPOSAL_ERROR_COULD_NOT_INSTANTIATE_MARKET | 25 | Market proposal market could not be instantiated in execution |
PROPOSAL_ERROR_INVALID_FUTURE_PRODUCT | 26 | Market proposal market contained invalid product definition |
PROPOSAL_ERROR_INVALID_RISK_PARAMETER | 30 | Market proposal has invalid risk parameter |
PROPOSAL_ERROR_MAJORITY_THRESHOLD_NOT_REACHED | 31 | Proposal was declined because vote didn't reach the majority threshold required |
PROPOSAL_ERROR_PARTICIPATION_THRESHOLD_NOT_REACHED | 32 | Proposal declined because the participation threshold was not reached |
PROPOSAL_ERROR_INVALID_ASSET_DETAILS | 33 | Asset proposal has invalid asset details |
PROPOSAL_ERROR_UNKNOWN_TYPE | 34 | Proposal is an unknown type |
PROPOSAL_ERROR_UNKNOWN_RISK_PARAMETER_TYPE | 35 | Proposal has an unknown risk parameter type |
PROPOSAL_ERROR_INVALID_FREEFORM | 36 | Validation failed for freeform proposal |
PROPOSAL_ERROR_INSUFFICIENT_EQUITY_LIKE_SHARE | 37 | Party doesn't have enough equity-like share to propose an update on the market targeted by the proposal |
PROPOSAL_ERROR_INVALID_MARKET | 38 | Market targeted by the proposal does not exist or is not eligible for modification |
PROPOSAL_ERROR_TOO_MANY_MARKET_DECIMAL_PLACES | 39 | Market proposal decimal place is higher than the market settlement asset decimal places |
PROPOSAL_ERROR_TOO_MANY_PRICE_MONITORING_TRIGGERS | 40 | Market proposal contains too many price monitoring triggers |
PROPOSAL_ERROR_ERC20_ADDRESS_ALREADY_IN_USE | 41 | Market proposal contains too many price monitoring triggers |
PROPOSAL_ERROR_LP_PRICE_RANGE_NONPOSITIVE | 42 | LP price range must be larger than 0 |
PROPOSAL_ERROR_LP_PRICE_RANGE_TOO_LARGE | 43 | LP price range must not be larger than 100 |
PROPOSAL_ERROR_LINEAR_SLIPPAGE_FACTOR_OUT_OF_RANGE | 44 | Linear slippage factor is out of range, either negative or too large |
PROPOSAL_ERROR_QUADRATIC_SLIPPAGE_FACTOR_OUT_OF_RANGE | 45 | Quadratic slippage factor is out of range, either negative or too large |
Vote.Value
Vote value
Name | Number | Description |
---|---|---|
VALUE_UNSPECIFIED | 0 | Default value, always invalid |
VALUE_NO | 1 | Vote against the proposal |
VALUE_YES | 2 | Vote in favour of the proposal |