Skip to main content
Version: testnet (v0.71)

governance.proto

path vega/governance.proto

package vega


Messages

FutureProduct

Future product configuration

NameTypeDescription
settlement_assetstringAsset ID for the product's settlement asset.
quote_namestringProduct quote name.
data_source_spec_for_settlement_dataDataSourceDefinitionData source spec describing the data source for settlement.
data_source_spec_for_trading_terminationDataSourceDefinitionThe external data source spec describing the data source of trading termination.
data_source_spec_bindingDataSourceSpecToFutureBindingBinding between the data source spec and the settlement data.

GovernanceData

Governance data

NameTypeDescription
proposalProposalGovernance proposal that is being voted on.
yesVoteAll YES votes in favour of the proposal above.
noVoteAll NO votes against the proposal above.
yes_partyGovernanceData.YesPartyEntryAll 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_partyGovernanceData.NoPartyEntryAll 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

NameTypeDescription
keystring
valueVote

GovernanceData.YesPartyEntry

NameTypeDescription
keystring
valueVote

InstrumentConfiguration

Instrument configuration

NameTypeDescription
namestringInstrument name.
codestringInstrument code, human-readable shortcode used to describe the instrument.
futureFutureProductFuture.

NewAsset

New asset on Vega

NameTypeDescription
changesAssetDetailsConfiguration 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.

NameTypeDescription

NewMarket

New market on Vega

NameTypeDescription
changesNewMarketConfigurationConfiguration of the new market.

NewMarketConfiguration

Configuration for a new market on Vega

NameTypeDescription
instrumentInstrumentConfigurationNew market instrument configuration.
decimal_placesuint64Decimal places used for the new market, sets the smallest price increment on the book.
metadatastringOptional new market metadata, tags.
price_monitoring_parametersPriceMonitoringParametersPrice monitoring parameters.
liquidity_monitoring_parametersLiquidityMonitoringParametersLiquidity monitoring parameters.
simpleSimpleModelParamsSimple risk model parameters, valid only if MODEL_SIMPLE is selected.
log_normalLogNormalRiskModelLog normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected.
position_decimal_placesint64Decimal places for order sizes, sets what size the smallest order / position on the market can be.
lp_price_rangestringPercentage 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_factorstringLinear slippage factor is used to cap the slippage component of maintenance margin - it is applied to the slippage volume.
quadratic_slippage_factorstringQuadratic 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

NameTypeDescription
idstringUnique proposal ID.
referencestringProposal reference.
party_idstringParty ID i.e. public key of the party submitting the proposal.
stateProposal.StateCurrent state of the proposal, i.e. open, passed, failed etc.
timestampint64Proposal timestamp for date and time as Unix time in nanoseconds when proposal was submitted to the network.
termsProposalTermsProposal configuration and the actual change that is meant to be executed when proposal is enacted.
reasonProposalErrorReason for the current state of the proposal, this may be set in case of REJECTED and FAILED statuses.
error_detailsstringDetailed error associated to the reason.
rationaleProposalRationaleRationale behind a proposal.
required_participationstringRequired vote participation for this proposal.
required_majoritystringRequired majority for this proposal.
required_liquidity_provider_participationstringRequired participation from liquidity providers, optional but is required for market update proposal.
required_liquidity_provider_majoritystringRequired majority from liquidity providers, optional but is required for market update proposal.

ProposalRationale

Rationale behind a proposal.

NameTypeDescription
descriptionstringDescription 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.
titlestringTitle 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

NameTypeDescription
closing_timestampint64Timestamp as Unix time in seconds when voting closes for this proposal, constrained by `minClose` and `maxClose` network parameters.
enactment_timestampint64Timestamp as Unix time in seconds when proposal gets enacted if passed, constrained by `minEnact` and `maxEnact` network parameters.
validation_timestampint64Validation timestamp as Unix time in seconds.
update_marketUpdateMarketProposal change for modifying an existing market on Vega.
new_marketNewMarketProposal change for creating new market on Vega.
update_network_parameterUpdateNetworkParameterProposal change for updating Vega network parameters.
new_assetNewAssetProposal change for creating new assets on Vega.
new_freeformNewFreeformProposal 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_assetUpdateAssetProposal change for updating an asset.

UpdateAsset

Update an existing asset on Vega

NameTypeDescription
asset_idstringAsset ID the update is for.
changesAssetDetailsUpdateChanges to apply on an existing asset.

UpdateFutureProduct

Future product configuration

NameTypeDescription
quote_namestringHuman-readable name/abbreviation of the quote name.
data_source_spec_for_settlement_dataDataSourceDefinitionThe data source spec describing the data of settlement data.
data_source_spec_for_trading_terminationDataSourceDefinitionThe data source spec describing the data source for trading termination.
data_source_spec_bindingDataSourceSpecToFutureBindingThe binding between the data source spec and the settlement data.

UpdateInstrumentConfiguration

Instrument configuration

NameTypeDescription
codestringInstrument code, human-readable shortcode used to describe the instrument.
futureUpdateFutureProductFuture.

UpdateMarket

Update an existing market on Vega

NameTypeDescription
market_idstringMarket ID the update is for.
changesUpdateMarketConfigurationUpdated configuration of the market.

UpdateMarketConfiguration

Configuration to update a market on Vega

NameTypeDescription
instrumentUpdateInstrumentConfigurationUpdated market instrument configuration.
metadatastringOptional market metadata, tags.
price_monitoring_parametersPriceMonitoringParametersPrice monitoring parameters.
liquidity_monitoring_parametersLiquidityMonitoringParametersLiquidity monitoring parameters.
simpleSimpleModelParamsSimple risk model parameters, valid only if MODEL_SIMPLE is selected.
log_normalLogNormalRiskModelLog normal risk model parameters, valid only if MODEL_LOG_NORMAL is selected.
lp_price_rangestringPercentage 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_factorstringLinear slippage factor is used to cap the slippage component of maintenance margin - it is applied to the slippage volume.
quadratic_slippage_factorstringQuadratic 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

NameTypeDescription
changesNetworkParameterThe network parameter to update.

Vote

Governance vote

NameTypeDescription
party_idstringVoter's party ID.
valueVote.ValueActual vote.
proposal_idstringProposal ID being voted on.
timestampint64Vote timestamp for date and time as Unix time in nanoseconds when vote was submitted to the network.
total_governance_token_balancestringTotal number of governance token for the party that cast the vote.
total_governance_token_weightstringThe weight of this vote based on the total number of governance tokens.
total_equity_like_share_weightstringThe 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

NameNumberDescription
STATE_UNSPECIFIED0Default value, always invalid
STATE_FAILED1Proposal enactment has failed - even though proposal has passed, its execution could not be performed
STATE_OPEN2Proposal is open for voting
STATE_PASSED3Proposal has gained enough support to be executed
STATE_REJECTED4Proposal wasn't accepted i.e. proposal terms failed validation due to wrong configuration or failed to meet network requirements.
STATE_DECLINED5Proposal didn't get enough votes, e.g. either failed to gain required participation or majority level.
STATE_ENACTED6Proposal enacted
STATE_WAITING_FOR_NODE_VOTE7Waiting for node validation of the proposal

ProposalError

List of possible errors that can cause a proposal to be in state rejected or failed

NameNumberDescription
PROPOSAL_ERROR_UNSPECIFIED0Default value
PROPOSAL_ERROR_CLOSE_TIME_TOO_SOON1Specified close time is too early based on network parameters
PROPOSAL_ERROR_CLOSE_TIME_TOO_LATE2Specified close time is too late based on network parameters
PROPOSAL_ERROR_ENACT_TIME_TOO_SOON3Specified enactment time is too early based on network parameters
PROPOSAL_ERROR_ENACT_TIME_TOO_LATE4Specified enactment time is too late based on network parameters
PROPOSAL_ERROR_INSUFFICIENT_TOKENS5Proposer for this proposal has insufficient tokens
PROPOSAL_ERROR_INVALID_INSTRUMENT_SECURITY6Instrument quote name and base name were the same
PROPOSAL_ERROR_NO_PRODUCT7Proposal has no product
PROPOSAL_ERROR_UNSUPPORTED_PRODUCT8Specified product is not supported
PROPOSAL_ERROR_NO_TRADING_MODE11Proposal has no trading mode
PROPOSAL_ERROR_UNSUPPORTED_TRADING_MODE12Proposal has an unsupported trading mode
PROPOSAL_ERROR_NODE_VALIDATION_FAILED13Proposal failed node validation
PROPOSAL_ERROR_MISSING_BUILTIN_ASSET_FIELD14Field is missing in a builtin asset source
PROPOSAL_ERROR_MISSING_ERC20_CONTRACT_ADDRESS15Contract address is missing in the ERC20 asset source
PROPOSAL_ERROR_INVALID_ASSET16Asset ID is invalid or does not exist on the Vega network
PROPOSAL_ERROR_INCOMPATIBLE_TIMESTAMPS17Proposal terms timestamps are not compatible (Validation < Closing < Enactment)
PROPOSAL_ERROR_NO_RISK_PARAMETERS18No risk parameters were specified
PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_KEY19Invalid key in update network parameter proposal
PROPOSAL_ERROR_NETWORK_PARAMETER_INVALID_VALUE20Invalid value in update network parameter proposal
PROPOSAL_ERROR_NETWORK_PARAMETER_VALIDATION_FAILED21Validation failed for network parameter proposal
PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_SMALL22Opening auction duration is less than the network minimum opening auction time
PROPOSAL_ERROR_OPENING_AUCTION_DURATION_TOO_LARGE23Opening auction duration is more than the network minimum opening auction time
PROPOSAL_ERROR_COULD_NOT_INSTANTIATE_MARKET25Market proposal market could not be instantiated in execution
PROPOSAL_ERROR_INVALID_FUTURE_PRODUCT26Market proposal market contained invalid product definition
PROPOSAL_ERROR_INVALID_RISK_PARAMETER30Market proposal has invalid risk parameter
PROPOSAL_ERROR_MAJORITY_THRESHOLD_NOT_REACHED31Proposal was declined because vote didn't reach the majority threshold required
PROPOSAL_ERROR_PARTICIPATION_THRESHOLD_NOT_REACHED32Proposal declined because the participation threshold was not reached
PROPOSAL_ERROR_INVALID_ASSET_DETAILS33Asset proposal has invalid asset details
PROPOSAL_ERROR_UNKNOWN_TYPE34Proposal is an unknown type
PROPOSAL_ERROR_UNKNOWN_RISK_PARAMETER_TYPE35Proposal has an unknown risk parameter type
PROPOSAL_ERROR_INVALID_FREEFORM36Validation failed for freeform proposal
PROPOSAL_ERROR_INSUFFICIENT_EQUITY_LIKE_SHARE37Party doesn't have enough equity-like share to propose an update on the market targeted by the proposal
PROPOSAL_ERROR_INVALID_MARKET38Market targeted by the proposal does not exist or is not eligible for modification
PROPOSAL_ERROR_TOO_MANY_MARKET_DECIMAL_PLACES39Market proposal decimal place is higher than the market settlement asset decimal places
PROPOSAL_ERROR_TOO_MANY_PRICE_MONITORING_TRIGGERS40Market proposal contains too many price monitoring triggers
PROPOSAL_ERROR_ERC20_ADDRESS_ALREADY_IN_USE41Market proposal contains too many price monitoring triggers
PROPOSAL_ERROR_LP_PRICE_RANGE_NONPOSITIVE42LP price range must be larger than 0
PROPOSAL_ERROR_LP_PRICE_RANGE_TOO_LARGE43LP price range must not be larger than 100
PROPOSAL_ERROR_LINEAR_SLIPPAGE_FACTOR_OUT_OF_RANGE44Linear slippage factor is out of range, either negative or too large
PROPOSAL_ERROR_QUADRATIC_SLIPPAGE_FACTOR_OUT_OF_RANGE45Quadratic slippage factor is out of range, either negative or too large

Vote.Value

Vote value

NameNumberDescription
VALUE_UNSPECIFIED0Default value, always invalid
VALUE_NO1Vote against the proposal
VALUE_YES2Vote in favour of the proposal