Staking on FLAG Network
Before reading the paper, please kindly note that all references to the increments in values are in absolute terms with regards to the balance of FLAG. This document does not refer to the monetary value of FLAG at any time on the market.
As users stake their FLAG tokens, they help the network become more secure, and, as a result, they will get rewards while doing so.
Staking can be done by delegating your tokens to validators. They are the ones who process transactions and operate the network.
There is a shared-risk & shared-reward financial pattern that may offer long-term returns to holders of tokens delegated. It is to be called Delegating stake and is managed by arranging the financial incentives of the token-holders (delegators) and the validators to whom they delegate.
A validator will be chosen to process new transactions to the ledger more often if he gets more stakes delegated to him. Furthermore, if the validator processes more transactions, the rewards that the validator and its delegators may earn will also go up. Validators who process more transactions will be able to earn proportionally more rewards. That's why validators always aim to configure their systems to be able to keep the network running as fast and as smoothly as possible so they can process as many transactions as possible.
The costs that arise during operating and managing the systems will be incurred by validators. This amount will then be passed on to delegators in the form of a fee based on a percentage of rewards earned. A commission is the name of this fee. Validators can earn more rewards if there are more stakes delegated to them, so they may want to provide the lowest commission for their services to compete with others.
When you stake your tokens, you put them at risk of losing. This process is known as slashing. In this slashing process, a portion of a validator's delegated stake can be removed or destroyed because of some intentional malicious behaviors. These may include creating invalid transactions or censoring certain types of transactions or network participants.
All token holders who have delegated stake to a validator will suffer a partial loss of their delegation if that validator is slashed. This designates an immediate loss for the token holder. As for the validators, they will also suffer a loss in future rewards as their total delegation will be reduced.
Rewards and slashing will arrange validator and token holder interests. This bidirectional relationship helps keep the network secure, robust and performant.
How can users stake their FLAG tokens?
Users can stake FLAG by depositing their tokens into a wallet that supports staking. All the wallets that support staking will show how to step-by-step create a stake account and conduct delegation.
The following wallets are the solutions that support staking:
- FLAG Network command-line tools: Users can process all stake operations alongside with a CLI-generated keypair file wallet, a paper wallet, or with a connected Ledger Nano.
Create a Stake Account
Each wallet will provide some instructions for the users to follow and create a staking account. This staking account will be of a different type compared to the one which is used to simply transfer and collect tokens.
Choose a Validator
Proceed as per the instructions of each wallet to choose a validator. Users are able to obtain valuable information about potentially performant validators from the FLAG Network forum. The FLAG Network community does not recommend any particular validator.
The FLAG Network site is developed and managed by Staking Facilities, one of our validators. It provides some high-level graphical information about the network as a whole, as well as a list of validators and some updated performance statistics about each one.
Users can use the FLAG Network command-line tools to view block production statistics:
- FLAG Network validators
- FLAG Network block-production
The FLAG Network team does not make suggestions on how to interpret these pieces of information so please proceed with your own verification and assessment.
Delegate your Stake
Proceed as per the instructions of each wallet to delegate tokens to your chosen validator.
Stake Account Details
If you want to go into further details about the operations and permissions associated with a stake account, please view the Stake Accounts section.
Stake Account Structure
Users can utilize a stake account on the FLAG Network to delegate tokens to validators supported by the network to potentially reap some rewards for the owner of the stake account. Creating and maintaining a stake account is a little bit different from a traditional wallet address which is known as a system account. A traditional wallet a.k.a system account only allows users to exchange FLAG tokens with other accounts on the network, whereas a stake account extends the support for more complex operations needed to maintain a delegation of tokens.
On the FLAG Network, stake accounts also operate a little bit different compared to those of other Proof-of-Stake blockchain networks that you may be familiar with. This paper explains the high-level structure and functions of a FLAG Network stake account.
A unique address is provided for each stake account. This address can be used to look up the account information in the command line or in any network explorer tool. However, unlike a wallet address in which the holder of the address's keypair controls the wallet, the keypair associated with a stake account address does not necessarily have any control over the account. In fact, a stake account's address does not necessarily need a keypair or private key.
There is a time when a stake account's address possesses a keypair file which is when users create a stake account using the command line tools. During that process, a new keypair file will be generated at first just to ensure that the stake account's address is unique.
One or more signing authorities may be associated with certain types of accounts. If users want to sign certain transactions, they will need the authority of that account. Compared to some other blockchain networks, this difference indicates that the holder of the keypair associated with the account's address may control all of the account's activity.
Two signing authorities specified by their respective address will be available for each stake account. Each of them is authorized to conduct certain operations on the stake account.
The stake authority has the authorization to sign transactions for the following operations:
- Delegating stake
- Deactivating the stake delegation
- Splitting the stake account, creating a new stake account with a portion of the funds in the first one
- Merging two stake accounts
- Setting a new stake authority
The withdraw authority can sign transactions for the following operations:
- Withdrawing un-delegated stake into a wallet address
- Setting a new withdraw authority
- Setting a new stake authority
When the stake account is created, both the stake authority and withdraw authority will be set. They can also be changed in the future to authorize a new signing address at any time. The stake and withdraw authority can share the same address or use two different addresses.
The withdraw authority keypair is more powerful in controlling the account as users will need it to liquidate the tokens in the stake account. It can also be used to reset the stake authority if the stake authority keypair is lost or compromised.
Please pay utmost attention to keep the withdraw authority safe against loss or theft when maintaining a stake account.
Only one validator can be delegated at a time with each stake account. All of the tokens in the account must be either delegated or un-delegated, or in the middle of becoming delegated or un-delegated. Users must create multiple stake accounts if they want to delegate a portion of their tokens to a validator, or to delegate to multiple validators.
This can be done by creating multiple stake accounts from a wallet address containing some tokens, or by creating a single large stake account and using the stake authority to split the account into multiple accounts with token balances of your choice.
Users can assign the same stake and withdraw authorities to multiple stake accounts.
Merging stake accounts
Users can merge two stake accounts that have the same authorities and lockup into a single resulting stake account. No additional conditions will be required for a merge if the two stakes own the following states:
- two deactivated stakes
- an inactive stake into an activating stake during its activation epoch
The voter pubkey and vote credits mentioned must match in the following cases:
- two activated stakes
- two activating accounts that share an activation epoch, during the activation epoch
All other combinations of stake states cannot be successfully merged. This includes all "transient" states, in which a stake is activating or deactivating with a non-zero effective stake.
Delegation Warmup and Cooldown
The operation will not take effect instantly if a stake account is delegated, or a delegation is deactivated.
It takes several epochs to complete delegation or deactivation. Along with that, after the transaction containing the instructions, a fraction of the delegation becoming active or inactive at each epoch boundary has been sent to the cluster.
A limit is also applied on how much total stake can become delegated or deactivated in a single epoch. This aims to prevent large sudden changes in stake across the network as a whole. The exact warmup and cooldown durations are very hard to predict because they are dependent on the behavior of other network participants. For more details on the warmup and cooldown timing, please find within this paper.
A lockup may be applied to a stake account in order to prevent the stored tokens from being withdrawn before a particular date or epoch has been reached. During the lockup, users can still delegate, un-delegate, or split with the stake account. Its stake and withdraw authorities can also be changed as usual. The only thing that is not permitted is withdrawal into a wallet address.
A lockup can only be applied when users first create a stake account. However, it can still be adjusted later by the lockup authority or custodian. In the meantime, the associated address will also be set when the account is created.
Dismissing a Stake Account
A stake account balance that reaches 0 FLAG will no longer be tracked just like other types of accounts on the FLAG Network. Once a stake account is not delegated and all of its stored tokens are withdrawn to a wallet address, the account at that address is effectively dismissed. And if you want to use the address again, you will have to manually re-create it.
Observing Stake Accounts
Users can observe their stake account details via the FLAG Network Explorer. This can be done by copying and pasting an account address into the search bar.