vega-frontend-monorepo/specs/2001-STKE-staking.md
2023-08-07 08:41:25 +01:00

9.5 KiB

Staking

Staking is the act of securing a Vega network by nominating good validators with the governance token. Staking is rewarded with a share of trading fees (and treasury rewards). See the glossary and these specs for more on staking.

When staking a user may be motivated to select validators to maximize the rewards they get for the tokens they hold, this means selecting validator(s) who are less likely to be penalized (e.g. over staked, poor performance). Users may wish to stake more than one validator to diversify. Users will want/need to manage their stake over time to ensure they are getting a good return, e.g. move stake between validators. Staking is also important for facilitating protocol upgrades.

Understand staking on Vega

When considering whether to stake on Vega, I...

  • should see information to help inform me what return I might expect from staking (other protocols might show a typical APY)
  • must see that the governance token is an ethereum ERC20 token and needs to attributed (or associated) to a Vega wallet for use on Vega 1002-STKE-002
  • must see detailed documentation on how staking works on Vega 1002-STKE-003

...so I can decide if I want to stake on Vega, and how to go about doing it.

Note: There are many ways that "understanding the return" can be done, and this does not impose a particular solution. Solutions could...

  • look at previous epochs,
  • average this over a period,
  • select a range of validators or just one,
  • could have a calculator that allows the user to enter some values or just show this on the list of validators

Note: Income may come in a range of different tokens, as markets can settle in different assets, and there may be rewards paid out by the treasury.

Associate tokens

Before I stake, I need to Associate tokens with a Vega wallet/key...

  • must see linkAssociate tokens
  • should see that if no further action is taken, newly associated tokens will be nominated to validators based on existing distribution

...so that I can nominate validators.

Select validator(s)

When selecting what validators to nominate with my stake, I...

  • should be able to select any data that is available on Validators in a table

  • must see all validator information without having to connect Vega wallet 1002-STKE-050

  • see "static" information about the validator (these can change, just not frequently)

  • can see data for the current/next epoch, for each validator

  • can see data for the previous epoch

  • can see data for previous epochs

    • should see the the overall "score" for all previous epochs for each validator 1002-STKE-025
    • can see a breakdown of all the inputs to that "score" for all previous epochs
      • should see Ranking score
      • should see stake score
      • should see performance score
      • should see voting score

...so I can select validators that should give me the biggest return.

Nominate a validator

Note: User interfaces may use the term "Nominate", technically the function is called "delegate". Delegating tokens to a validator may imply that you also give that validator your vote on proposals, at time of writing, it does not. It only gives them the potential for more "voting power" in the production of blocks.

Within a staking epoch (typically 24 hours) a user can change their nominations many times, however the changes are only effective at the end of the epoch. You will only get rewards for a full epoch staked.

When attributing some (or all of my governance tokens to a given validator), I...

  • must select a validator I want to nominate 1002-STKE-031
  • must see link to connect to a Vega wallet/key (if not already) that has associated Vega (or Pending association) 1002-STKE-032
  • must select an amount of tokens 1002-STKE-033
    • must be able to populate this with the amount of governance tokens that will be associated but not nominated at the beginning of the next epoch 1002-STKE-034
    • must be warned if the amount I am about to nominate is below a minimum amount (spam protection) 1002-STKE-035
    • must be warned if the amount I am about to nominate is more than I have associated + un-nominated at the end of current epoch/beginning of next 1002-STKE-036
  • must submit the nomination Vega transactions 1002-STKE-037
  • must see feedback that my nomination has been registered, and will be processed at the next epoch 1002-STKE-038
  • must see all my pending nomination changes for the next epoch 1002-STKE-039

...so that I am rewarded for a share based on this validators performance.

Monitor staking rewards

When checking if im getting the staking return that I was expecting, I...

...so that I can make decisions about my staking, e.g. whether to re-distribute my stake.

Un-nominate validator

When removing stake from a validator, I...

  • must select a validator I want to un-nominate 1002-STKE-040
  • must connect to a Vega wallet/key with nominated stake, if not already 1002-STKE-041
    • must have the option of withdrawing nominated amount at the end of the epoch (and maintain the staking income for the current epoch) 1002-STKE-053
  • should have the option of withdrawing nomination amount now immediately (and forfeit the staking income)
  • must set an amount to remove from a validator 1002-STKE-044
    • must be able populate with the total delegated amount at the time where un-nominate will happen 1002-STKE-045
    • must be warned if amount is greater than the amount that will be on that validator at the end of the epoch 1002-STKE-046 1002-STKE-047
  • must submit un-nominate Vega transaction 1002-STKE-048
  • must see feedback that the un-nomination has been registered, and that the un-nominated amount is now available for re-nomination 1002-STKE-049

... so that I can use this stake for another validator etc.

note: if a user just wishes to seel their tokens and not wait for the end of an epoch they could simply disassociate (as long as tokens are not held by vesting contract)