Skip to main content
Version: mainnet (v0.73)
Looking to transfer from a network-managed account?

If you want to transfer assets from accounts such as an insurance pool to fund trading rewards, see the tutorial on how to propose transferring an asset.

Transfers

Use transfers to send assets to another Vega key, from vested to general accounts for the same key, or to a reward pool to fund trading rewards.

Key-to-key, and account-to-account transfers can be one-off, or they can be set up to send assets repeatedly, for as long as the key/account sending the assets has enough money to keep the transfers funded and fees paid.

Transfers to fund reward pools can only be recurring, though they can be set up to limit for how long they supply a reward pool, or be cancelled.

Requirements

  • Enough of the asset to transfer and pay the transfer fee each time
  • Vega public key the assets are sent from. The same key pair must sign the transaction
  • Public key or account type the assets are going to. (Either the number or ACCOUNT_TYPE_..")
  • Asset ID for the asset to transfer
  • Transfer amount. It must be written with no decimal point, but include all decimal places. Note: The amount in the below examples is based on an 18 decimal point asset, and so these would transfer 1 tVEGA

Key-to-key transfers

A key-to-key, or account-to-account transfer allows you to transfer assets between two Vega keys. You'll need enough of the asset to transfer the nominated amount, as well as enough to pay the transfer fee.

One-off transfer to Vega key

Use deliverOn to set a delivery date/time for when the transfer arrives with the recipient account. deliverOn only accepts Unix time in nanoseconds. Setting it to 0 means the transfer will be completed immediately. Note: when you delay a transfer, the amount leaves your account immediately but is not delivered until the date/time you chose.

A one-off transfer cannot be cancelled by you, regardless of when the transfer is scheduled to arrive. If you do not have enough of the asset to cover the amount and the fees, it will be automatically cancelled.

vegawallet transaction send --wallet "wallet-name" --pubkey "pubkey" --network mainnet1 '{
"transfer":{
"fromAccountType": "ACCOUNT_TYPE_GENERAL",
"toAccountType": "ACCOUNT_TYPE_GENERAL",
"to":"recipient-Vega-public-key",
"asset":"fc7fd956078fb1fc9db5c19b88f0874c4299b2a7639ad05a47a28c0aef291b55",
"amount":"10000000000000000000",
"oneOff":{
"deliverOn": 0
}
}
}'

Recurring transfer to Vega key

In a recurring transfer, the assets move from your account to the nominated account at the end of each epoch.

You'll need the following information to set up a recurring transfer:

  • startEpoch: The number of the epoch in which you want the first transfer to be made. It will initiate at the end of that epoch.
  • factor: Written as a decimal less than 1.0. Factor is used to determine what portion of the full amount is transferred in each epoch. Think of it like a percentage, so the number you include, when multiplied by 100, will equal what percentage of the amount will be transferred each time.

If you do not have enough to cover each transfer and its fee, the transfer will automatically be cancelled. Otherwise, the transfer will repeated indefinitely, unless you add the optional parameter to end the recurring transfer:

  • endEpoch: The number of the epoch in which you want the last transfer to be made.
vegawallet transaction send --wallet "wallet-name" --pubkey "pubkey" --network mainnet1 '{
"transfer":{
"fromAccountType":"ACCOUNT_TYPE_GENERAL",
"toAccountType": "ACCOUNT_TYPE_GENERAL",
"to": "KEY",
"asset": "fc7fd956078fb1fc9db5c19b88f0874c4299b2a7639ad05a47a28c0aef291b55",
"amount": "10000000000000000000",
"recurring": {
"startEpoch": 1,
"endEpoch": 10,
"factor": "1"
}
}
}'

Funding trading and validator metric rewards

Trading rewards, as well as validator metric-based rewards, are funded using recurring transfers to a reward account, which holds the assets for reward pools. The assets move from your account to the nominated reward account at the end of each epoch.

These rewards can be used to incentivise:

  • Placing market/limit orders that are filled (determined by amount of maker fees a party paid or received)
  • Certain types of trading activities, like keeping a large position open or making consistent returns
  • Providing liquidity by submitting orders to the book, which are then hit (determined by amount of liquidity fees a party received)
  • Creating markets that attract good trading volume (determined based on value of 🔗rewards.marketCreationQuantumMultiple, and the settlement asset's quantum)
  • Consensus and standby validators that have a ranking score higher than 0
Read more

Trading rewards: Read about trading rewards, including the different rewards you can contribute to.

Fields used to fund trading rewards

You'll need the following information to set up a reward:

  • startEpoch: The number of the epoch in which you want the first transfer to be made. It will initiate at the end of that epoch.
  • factor: Written as a decimal less than 1.0. Factor is used to determine what portion of the full amount is transferred in each epoch. Think of it like a percentage, so the number you include, when multiplied by 100, will equal what percentage of the amount will be transferred each time.

Recurring transfers can also set a dispatch strategy to distribute rewards based on dispatch metrics that are tracked by the system. The recurring reward transfer below would reward the public key that proposed the markets specified, depending on their value.

The transfer will run indefinitely, unless you add the optional paramter to specify when to stop:

  • endEpoch: The number of the epoch in which you want the last transfer to be made.

The destinationType must be the account type that matches the reward category. For example, to propose that the 'average position' reward will pay out, you'll need to set the destination type as ACCOUNT_TYPE_REWARD_AVERAGE_POSITION, and then choose the complementary reward category, known as the metric. The asset you choose then determines which market(s) the reward targets.

You will need to define the dispatch strategy, which includes the metric, the length of time to measure performance, the asset used to evaluate performance, and other fields.

Dispatch strategy fieldDescriptionAccepted values
assetForMetricAsset that's used to evaluate how someone performs, such as the settlement asset for the market(s) relevant to the rewardAny asset enabled on Vega
metricSpecific reward category the transfer is fundingDISPATCH_METRIC_MAKER_FEES_PAID; DISPATCH_METRIC_MAKER_FEES_RECEIVED; DISPATCH_METRIC_LP_FEES_RECEIVED; DISPATCH_METRIC_MARKET_VALUE; DISPATCH_METRIC_AVERAGE_POSITION; DISPATCH_METRIC_RELATIVE_RETURN; DISPATCH_METRIC_RETURN_VOLATILITY; DISPATCH_METRIC_VALIDATOR_RANKING
marketsOptional: Used to choose which market(s) are in scopeAny trading market's ID
stakingRequirementOptional: Sets a minimum number of VEGA tokens that need to be staked for a party to be considered eligible for the rewardNumber, if omitted it defaults to 0
notionalTimeWeightedAveragePositionRequirementOptional: Sets a minimum notional TWAP required for a party to be considered eligible to receive rewardsDefaults to 0
windowLengthNumber of epochs in which performance against the reward metric is measuredAny number between 1 and 100
lockPeriodNumber of epochs to keep earned rewards in the recipient's reward vesting account before moving to their vested account
entityScopedefines the entities within scopeCurrently ENTITY_SCOPE_INDIVIDUALS is the only option
individualScopeTo be used if the eligible reward recipients should be individuals, and that can then be further focused to determine who is eligibleCurrently INDIVIDUAL_SCOPE_ALL is the only option
distributionStrategySets how the participants should be ranked, and what other factors to consider.DISTRIBUTION_STRATEGY_PRO_RATA; DISTRIBUTION_STRATEGY_RANK
vegawallet transaction send --wallet "wallet-name" --pubkey "pubkey" --network mainnet1 '{
"transfer":{
"fromAccountType": "ACCOUNT_TYPE_GENERAL",
"toAccountType": "ACCOUNT_TYPE_REWARD_MARKET_PROPOSERS",
"to":"0000000000000000000000000000000000000000000000000000000000000000",
"asset":"fc7fd956078fb1fc9db5c19b88f0874c4299b2a7639ad05a47a28c0aef291b55",
"amount":"10000000000000000000",
"recurring":{
"startEpoch": 1,
"endEpoch": 10,
"factor": "1",
"dispatchStrategy": {
"assetForMetric": "fc7fd956078fb1fc9db5c19b88f0874c4299b2a7639ad05a47a28c0aef291b55",
"metric": "DISPATCH_METRIC_MARKET_VALUE",
"markets": ["marketid_goeshere"],
"windowLength": "number of epochs",
"entityScope": "ENTITY_SCOPE_INDIVIDUALS",
"individualScope": "INDIVIDUAL_SCOPE_ALL",
"distributionStrategy": "DISTRIBUTION_STRATEGY_YOU_WANT"

}
}
}
}'

Publicising trading and validator metric rewards

Once you've funded a reward pool, you can promote the reward, and what it's relevant for, by sharing it with the community on Discord ↗ and on the Vega forum ↗.

Cancelling recurring transfers

To cancel a recurring transfer, you'll need the transfer's ID. To see the ID for every transfer your public key makes, run a transfers REST query.

One-off transfers cannot be cancelled.

vegawallet transaction send --wallet "wallet-name" --pubkey "pubkey" --network mainnet1 '{ "cancelTransfer": { "transferId": "123" }}'