Propose a new asset
This page provides a tutorial for submitting a proposal for a new ERC-20 asset to be used as collateral. It describes what can be proposed, what you need to propose a new asset, and provides proposal templates that you will need to edit before submitting.
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: π1 token or π1 token
- Familiarity with governance on Vega, particularly assets at a protocol level
- After a new asset vote passes, the change has to be submitted to the asset bridge on Ethereum. Until it has been submitted, no one can start depositing that asset.
Overviewβ
Vega currently supports adding ERC-20 assets β. ERC-20 assets that pass a governance vote can be enabled via the Vega bridge - which is to say that they are deposited from and withdrawn to Ethereum. More token standards and chains are on the roadmap.
You can see all of the currently supported assets using the REST endpoint or the 'assets' GraphQL query.
If an asset that you would like to see on the network is not already available, a governance proposal can be made to list the asset.
If the vote passes, the network validators will then enable the asset on the bridge contract which will enable deposits and withdrawals for that token.
ERC-20 asset validationβ
When adding an ERC-20 asset to the bridge, the key details are compared to the smart contract on Ethereum. Specifically:
- The name and symbol must match
- The contract must be an ERC-20 asset
- There cannot be multiple assets on a Vega network for the same ERC-20 asset
Validation happens according to the validationTimestamp
parameter. In most situations, this should be early on in the voting period so that any validation errors are caught before token holders start voting. However you could push the validation later if the contract is not yet deployed.
Templates and submittingβ
In the tabs below you'll see an annotated example, which describes what each field is for, a JSON example that can be used to submit on the governance dApp β, and command line examples for different operating systems. You'll need to replace the example data with the relevant details before submitting.
- Annotated example
- Governance dApp (JSON)
- Command line (Linux / OSX)
- Command line (Windows)
{
rationale: {
title: "Add tDAI TEST (tDAI)",
description: "Proposal to add tDAI TEST (tDAI) as an asset"
},
terms: {
newAsset: {
changes: {
// Name of the asset (e.g: Great British Pound) (string)
name: "tDAI TEST",
// Symbol of the asset (e.g: GBP) (string)
symbol: "tDAI",
// Number of decimal / precision handled by this asset (string)
decimals: "18",
// The minimum economically meaningful amount in the asset (string)
quantum: "1",
// An Ethereum ERC20 asset
erc20: {
// The address of the contract for the token, on the ethereum network (string)
contractAddress: "0x26223f9C67871CFcEa329975f7BC0C9cB8FBDb9b",
// The maximum you can withdraw instantly. All withdrawals over the threshold will be delayed by the withdrawal delay.
// Thereβs no limit on the size of a withdrawal (string)
withdrawThreshold: "10",
// The lifetime limits deposit per address
// note: this is a temporary measure that can be changed by governance (string)
lifetimeLimit: "10",
}
}
},
// Timestamp (Unix time in seconds) when voting closes for this proposal,
// constrained by `minClose` and `maxClose` network parameters (int64 as string)
closingTimestamp: 1680534013000,
// Timestamp (Unix time in seconds) when proposal gets enacted (if passed),
// constrained by `minEnact` and `maxEnact` network parameters (int64 as string)
enactmentTimestamp: 1680620413000,
// Validation timestamp (Unix time in seconds) (int64 as string)
validationTimestamp: 1680620413000
}
}
- Copy the JSON example below into a text editor.
- Replace the placeholder values with those you want for the market.
- Submit your proposal from the New Proposal area of the governance dApp.
- Check you can see your proposal on Open Proposals area of the governance dApp.
{
"rationale": {
"title": "Add tDAI TEST (tDAI)",
"description": "Proposal to add tDAI TEST (tDAI) as an asset"
},
"terms": {
"newAsset": {
"changes": {
"name": "tDAI TEST",
"symbol": "tDAI",
"decimals": "18",
"quantum": "1",
"erc20": {
"contractAddress": "0x26223f9C67871CFcEa329975f7BC0C9cB8FBDb9b",
"withdrawThreshold": "10",
"lifetimeLimit": "10"
}
}
},
"closingTimestamp": 1680534013000,
"enactmentTimestamp": 1680620413000,
"validationTimestamp": 1680620413000
}
}
- Copy the command line example below into a text editor.
- Replace the placeholder values with those you want in the proposal.
- Use the command line to submit your proposal.
- Check you can see your proposal on Open Proposals area of the governance dApp.
./vegawallet transaction send --wallet your_walletname --pubkey your_public_key --network fairground '{
"proposalSubmission": {
"rationale": {
"title": "Add tDAI TEST (tDAI)",
"description": "Proposal to add tDAI TEST (tDAI) as an asset"
},
"terms": {
"newAsset": {
"changes": {
"name": "tDAI TEST",
"symbol": "tDAI",
"decimals": "18",
"quantum": "1",
"erc20": {
"contractAddress": "0x26223f9C67871CFcEa329975f7BC0C9cB8FBDb9b",
"withdrawThreshold": "10",
"lifetimeLimit": "10"
}
}
},
"closingTimestamp": 1680534013000,
"enactmentTimestamp": 1680620413000,
"validationTimestamp": 1680620413000
}
}
}'
- Copy the command line example below into a text editor.
- Replace the placeholder values with those you want in the proposal.
- Use the command line to submit your proposal.
- Check you can see your proposal on Open Proposals area of the governance dApp.
vegawallet.exe transaction send --wallet your_walletname --pubkey your_public_key --network fairground ^
"{^
\"proposalSubmission\": {^
\"rationale\": {^
\"title\": \"Add tDAI TEST (tDAI)\",^
\"description\": \"Proposal to add tDAI TEST (tDAI) as an asset\"^
},^
\"terms\": {^
\"newAsset\": {^
\"changes\": {^
\"name\": \"tDAI TEST\",^
\"symbol\": \"tDAI\",^
\"decimals\": \"18\",^
\"quantum\": \"1\",^
\"erc20\": {^
\"contractAddress\": \"0x26223f9C67871CFcEa329975f7BC0C9cB8FBDb9b\",^
\"withdrawThreshold\": \"10\",^
\"lifetimeLimit\": \"10\"^
}^
}^
},^
\"closingTimestamp\": 1680534013000,^
\"enactmentTimestamp\": 1680620413000,^
\"validationTimestamp\": 1680620413000^
}^
}^
}"
Voting and enactmentβ
All proposals are voted on by the community. To vote, community members need, at a minimum, the larger of π1 token or π1 token associated with their Vega key.
Your proposal will need participation of π30% and a majority of π66%, so having community support is essential. If successful, the proposal will be enacted at the time you specify in the enactmentTimestamp
field.
Building support is down to you. Share your proposal in the Fairground governance forum β on Vega community. You may also wish to share on Discord β.
Proposers who invite feedback, engage with comments, and make revisions to meet the needs of the community are more likely to be successful.