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

governance.proto

path vega/governance.proto

package vega


Messages

CancelTransfer

NameTypeDescription
changesCancelTransferConfigurationConfiguration for cancellation of a governance-initiated transfer

CancelTransferConfiguration

NameTypeDescription
transfer_idstringID of the governance transfer proposal.

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.
yesrepeated VoteAll YES votes in favour of the proposal above.
norepeated VoteAll NO votes against the proposal above.
yes_partyrepeated GovernanceData.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_partyrepeated GovernanceData.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.
spotSpotProductSpot.
perpetualPerpetualProductPerpetual.

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 futures market on Vega

NameTypeDescription
instrumentInstrumentConfigurationNew futures market instrument configuration.
decimal_placesuint64Decimal places used for the new futures market, sets the smallest price increment on the book.
metadatarepeated stringOptional new futures 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 futures market can be.
lp_price_rangeoptional stringDEPRECATED: Use liquidity SLA parameters instead. Percentage move up and down from the mid price which specifies the range of price levels over which automated liquidity provisions 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.
successoroptional SuccessorConfigurationSuccessor configuration. If this proposal is meant to succeed a given market, then this should be set.
liquidity_sla_parametersLiquiditySLAParametersLiquidity SLA parameters

NewSpotMarket

New spot market on Vega

NameTypeDescription
changesNewSpotMarketConfigurationConfiguration of the new spot market.

NewSpotMarketConfiguration

Configuration for a new spot market on Vega

NameTypeDescription
instrumentInstrumentConfigurationNew spot market instrument configuration.
decimal_placesuint64Decimal places used for the new spot market, sets the smallest price increment on the book.
metadatarepeated stringOptional new spot market metadata, tags.
price_monitoring_parametersPriceMonitoringParametersPrice monitoring parameters.
target_stake_parametersTargetStakeParametersSpecifies parameters related to target stake calculation.
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 spot market can be.
sla_paramsLiquiditySLAParametersSpecifies the liquidity provision SLA parameters.

NewTransfer

New governance transfer

NameTypeDescription
changesNewTransferConfigurationConfiguration for a new transfer.

NewTransferConfiguration

NameTypeDescription
source_typeAccountTypeSource account type, such as network treasury, market insurance pool
sourcestringIf network treasury, field is empty, otherwise uses the market ID
transfer_typeGovernanceTransferType"All or nothing" or "best effort": All or nothing: Transfers the specified amount or does not transfer anything Best effort: Transfers the specified amount or the max allowable amount if this is less than the specified amount
amountstringMaximum amount to transfer
assetstringID of asset to transfer
fraction_of_balancestringMaximum fraction of the source account's balance to transfer as a decimal - i.e. 0.1 = 10% of the balance
destination_typeAccountTypeSpecifies the account type to transfer to: reward pool, party, network insurance pool, market insurance pool
destinationstringSpecifies the account to transfer to, depending on the account type: Network treasury: leave empty Party: party's public key Market insurance pool: market ID
one_offOneOffTransfer
recurringRecurringTransfer

OneOffTransfer

Specific details for a one off transfer

NameTypeDescription
deliver_onint64Timestamp in Unix nanoseconds for when the transfer should be delivered into the receiver's account.

PerpetualProduct

Perpetual product configuration

NameTypeDescription
settlement_assetstringAsset ID for the product's settlement asset.
quote_namestringProduct quote name.
margin_funding_factorstringControls how much the upcoming funding payment liability contributes to party's margin, in the range [0, 1].
interest_ratestringContinuously compounded interest rate used in funding rate calculation, in the range [-1, 1].
clamp_lower_boundstringLower bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1].
clamp_upper_boundstringUpper bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1].
data_source_spec_for_settlement_scheduleDataSourceDefinitionData source spec describing the data source for settlement schedule.
data_source_spec_for_settlement_dataDataSourceDefinitionData source spec describing the data source for settlement.
data_source_spec_bindingDataSourceSpecToPerpetualBindingBinding between the data source spec and the settlement data.

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.
reasonoptional ProposalErrorReason for the current state of the proposal, this may be set in case of REJECTED and FAILED statuses.
error_detailsoptional stringDetailed 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_participationoptional stringRequired participation from liquidity providers, optional but is required for market update proposal.
required_liquidity_provider_majorityoptional stringRequired 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 futures market on Vega.
new_marketNewMarketProposal change for creating new futures 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.
new_spot_marketNewSpotMarketProposal change for creating new spot market on Vega.
update_spot_marketUpdateSpotMarketProposal change for modifying an existing spot market on Vega.
new_transferNewTransferProposal change for a governance transfer.
cancel_transferCancelTransferCancel a governance transfer.
update_market_stateUpdateMarketStateProposal change for updating the state of a market.
update_referral_programUpdateReferralProgramProposal change for updating the referral program.
update_volume_discount_programUpdateVolumeDiscountProgramProposal change for updating the volume discount program.

RecurringTransfer

Specific details for a recurring transfer First epoch from which this transfer shall be paid.

NameTypeDescription
start_epochuint64
end_epochoptional uint64Last epoch at which this transfer shall be paid.
dispatch_strategyoptional DispatchStrategyOptional parameter defining how a transfer is dispatched.

ReferralProgramChanges

NameTypeDescription
benefit_tiersrepeated BenefitTierDefined benefit tiers in increasing order. First element will give Tier 1, second element will give Tier 2, and so on. Determines the level of benefit a party can expect based on performance criteria.
end_of_program_timestampint64Timestamp as Unix time in seconds, after which when the current epoch ends, the program will end and benefits will be disabled.
window_lengthuint64Number of epochs over which to evaluate a referral set's running volume.
staking_tiersrepeated StakingTierDefined staking tiers in increasing order. First element will give Tier 1, second element will give Tier 2, and so on. Determines the level of benefit a party can expect based on their staking.

SpotProduct

Spot product configuration

NameTypeDescription
base_assetstringBase asset ID.
quote_assetstringQuote asset ID.
namestringProduct name.

SuccessorConfiguration

Configuration required to turn a new market proposal in to a successor market proposal.

NameTypeDescription
parent_market_idstringID of the market that the successor should take over from.
insurance_pool_fractionstringA decimal value between or equal to 0 and 1, specifying the fraction of the insurance pool balance that is carried over from the parent market to the successor.

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.
perpetualUpdatePerpetualProductPerpetual.

UpdateMarket

Update an existing market on Vega

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

UpdateMarketConfiguration

Configuration to update a futures market on Vega

NameTypeDescription
instrumentUpdateInstrumentConfigurationUpdated futures market instrument configuration.
metadatarepeated stringOptional futures 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_rangeoptional stringDEPRECATED: Use liquidity SLA parameters instead. Percentage move up and down from the mid price which specifies the range of price levels over which automated liquidity provisions 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.
liquidity_sla_parametersLiquiditySLAParametersLiquidity SLA parameters

UpdateMarketState

NameTypeDescription
changesUpdateMarketStateConfigurationConfiguration for governance-initiated change of a market's state

UpdateMarketStateConfiguration

NameTypeDescription
market_idstringID of the market
update_typeMarketStateUpdateTypeType of the market update
priceoptional stringSettlement price, relevant only for market termination for futures markets

UpdateNetworkParameter

Update network configuration on Vega

NameTypeDescription
changesNetworkParameterThe network parameter to update.

UpdatePerpetualProduct

Perpetual product configuration

NameTypeDescription
quote_namestringHuman-readable name/abbreviation of the quote name.
margin_funding_factorstringControls how much the upcoming funding payment liability contributes to party's margin, in the range [0, 1].
interest_ratestringContinuously compounded interest rate used in funding rate calculation, in the range [-1, 1].
clamp_lower_boundstringLower bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1].
clamp_upper_boundstringUpper bound for the clamp function used as part of the funding rate calculation, in the range [-1, 1].
data_source_spec_for_settlement_scheduleDataSourceDefinitionData source spec describing the data source for settlement schedule.
data_source_spec_for_settlement_dataDataSourceDefinitionData source spec describing the data source for settlement.
data_source_spec_bindingDataSourceSpecToPerpetualBindingBinding between the data source spec and the settlement data.

UpdateReferralProgram

NameTypeDescription
changesReferralProgramChangesConfiguration for change to update a referral program.

UpdateSpotMarket

Update an existing spot market on Vega

NameTypeDescription
market_idstringMarket ID the update is for.
changesUpdateSpotMarketConfigurationUpdated configuration of the spot market.

UpdateSpotMarketConfiguration

Configuration to update a spot market on Vega

NameTypeDescription
metadatarepeated stringOptional spot market metadata, tags.
price_monitoring_parametersPriceMonitoringParametersPrice monitoring parameters.
target_stake_parametersTargetStakeParametersSpecifies parameters related to target stake calculation.
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.
sla_paramsLiquiditySLAParametersSpecifies the liquidity provision SLA parameters.

UpdateVolumeDiscountProgram

NameTypeDescription
changesVolumeDiscountProgramChangesConfiguration for a change to update a volume discount program

VolumeDiscountProgramChanges

NameTypeDescription
benefit_tiersrepeated VolumeBenefitTierDefined benefit tiers in increasing order. First element will give Tier 1, second element will give Tier 2, and so on. Determines the level of benefit a party can expect based on performance criteria.
end_of_program_timestampint64Timestamp as Unix time in seconds, after which when the current epoch ends, the program will end and benefits will be disabled.
window_lengthuint64Number of epochs over which to evaluate a referral set's running volume.

Vote

Governance vote

NameTypeDescription
party_idstringVoter's party ID.
valueVote.ValueWhich way the party voted.
proposal_idstringProposal ID being voted on.
timestampint64Timestamp in Unix nanoseconds when the vote was acknowledged by 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

GovernanceTransferType

NameNumberDescription
GOVERNANCE_TRANSFER_TYPE_UNSPECIFIED0
GOVERNANCE_TRANSFER_TYPE_ALL_OR_NOTHING1
GOVERNANCE_TRANSFER_TYPE_BEST_EFFORT2

MarketStateUpdateType

NameNumberDescription
MARKET_STATE_UPDATE_TYPE_UNSPECIFIED0Default value, always invalid
MARKET_STATE_UPDATE_TYPE_TERMINATE1Request to terminate a market via governance
MARKET_STATE_UPDATE_TYPE_SUSPEND2Request to suspend a market via governance
MARKET_STATE_UPDATE_TYPE_RESUME3Request to resume a market via governance

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
PROPOSAL_ERROR_INVALID_SPOT46Validation failed for spot proposal
PROPOSAL_ERROR_SPOT_PRODUCT_DISABLED47Spot trading not enabled
PROPOSAL_ERROR_INVALID_SUCCESSOR_MARKET48Market proposal is invalid, either invalid insurance pool fraction, or it specifies a parent market that it can't succeed.
PROPOSAL_ERROR_GOVERNANCE_TRANSFER_PROPOSAL_FAILED49Governance transfer proposal is invalid
PROPOSAL_ERROR_GOVERNANCE_TRANSFER_PROPOSAL_INVALID50Governance transfer proposal failed
PROPOSAL_ERROR_GOVERNANCE_CANCEL_TRANSFER_PROPOSAL_INVALID51Proposal for cancelling transfer is invalid, check proposal ID
PROPOSAL_ERROR_INVALID_MARKET_STATE_UPDATE52Proposal for updating market state is invalid
PROPOSAL_ERROR_INVALID_SLA_PARAMS53Liquidity provision SLA parameters are invalid
PROPOSAL_ERROR_MISSING_SLA_PARAMS54Mandatory liquidity provision SLA parameters are missing
PROPOSAL_ERROR_INVALID_PERPETUAL_PRODUCT55Perpetual market proposal contained invalid product definition
PROPOSAL_ERROR_INVALID_REFERRAL_PROGRAM56Referral program proposal is invalid
PROPOSAL_ERROR_INVALID_VOLUME_DISCOUNT_PROGRAM57Volume discount program proposal is invalid

Vote.Value

Vote value

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