What is Proof-of-Stake?
On the Solana network, many different people and entities run a program on specialized computers known as a validator. Validators play a key role in maintaining and securing the Solana blockchain. Validators are responsible for processing new incoming transactions on the network, as well as for voting on and appending new blocks to the blockchain.
As different validators around the world may receive different pieces of information at different times, it is essential that the network is able to come to agreement about which transactions and data are continually added to the blockchain. The strategy by which the validators and the entire network come to this agreement is known as the consensus mechanism, and is a core challenge to building a successful decentralized blockchain network. Many different projects have attempted various solutions on how to reach consensus in a fast and cost-efficient manner.
The Solana network uses a Proof-of-Stake consensus mechanism (often abbreviated to PoS). Every validator on the network has an opportunity to participate in consensus by casting votes for which blocks they believe should be added to the blockchain, thereby confirming any valid transactions contained in those particular blocks. However, not all validator’s votes are weighted equally.
Validator’s consensus votes are stake-weighted, meaning the more stake an individual validator has, the more influence that one validator has in determining the outcome of the consensus voting. Similarly, validators with less stake have less weight in determining the vote outcome, and validators with no stake cannot influence the outcome of a consensus vote.
What is staking?
Staking is the process by which a SOL token holder (such as someone who purchased SOL tokens on an exchange) assigns some or all of their tokens to a particular validator or validators, which helps increase those validators’ voting weight. Assigning your tokens to add to a validator’s stake-weight is known as “delegating” your tokens. Delegating your tokens to a validator does NOT give the validator ownership or control over your tokens. At all times, you still control all your staked tokens that you may have chosen to delegate.
By staking tokens with a validator or validators, the token holder indicates a degree of trust in the validator they chose to delegate to. As validators amass larger amounts of stake delegations from different token holders, this acts as “proof” to the network that the validator’s consensus votes are trustworthy, and their votes are therefore weighted proportionally to the amount of stake the validator has attracted. By weighing the collective votes from all validators against the proportion of stake that has been delegated to them, the network reaches consensus by this Proof of Stake.
In an open and decentralized network like Solana, anyone can run a validator if they choose. A malicious validator or other bad actor could attempt to attack the network or to submit incorrect or fraudulent transactions for their own gain. Because of the Proof-of-Stake consensus mechanism described above, a single entity acting alone in this fraudulent manner would need to attract some amount of stake before any of their proposed activities would be weighed in the consensus vote.
As more token holders choose to stake their SOL tokens to different validators across the network, and the total amount of stake on the network increases, it becomes increasingly difficult for even a coordinated and well-funded attacker to amass enough stake to single-handedly alter the outcome of a consensus vote for their own benefit.
In short, the more stake that is delegated to many different validators across the network, the more safe and secure the network becomes for all of its users.
Additionally, token holders who choose to stake their tokens and help secure the network in doing so, are eligible to receive staking rewards once they have delegated their tokens to one or more validators. More details on staking rewards are found below.
Are there risks associated with staking?
On many Proof-of-Stake networks, there exists a mechanism known as “slashing”. Slashing is any process by which some portion of stake delegated to a validator is destroyed as a punitive measure for malicious actions undertaken by the validator.
This mechanism incentivizes validators not to undertake such actions, as less stake delegated to a validator means that validator then accrues fewer rewards. Being slashed can also be seen as a reputational risk for retaining current or attracting potential future stake.
Slashing also poses a risk to token holders who could potentially lose some of their tokens if they have delegated to a validator which gets slashed. The presence of slashing could incentivize token holders to only delegate their tokens to validators they feel are reputable, and not to delegate all their tokens to a single or small number of validators.
On Solana, slashing is not automatic. If an attacker causes the network to halt, they can be slashed upon network restart. For more information, please check out our docs.
Who can stake?
Anyone who holds SOL can stake their tokens at any time.
How do I stake my tokens?
To stake SOL tokens, you must use a wallet that supports staking. Not all wallets support staking at this time. SolFlare.com is one user-friendly wallet that supports staking. Check out the official docs for a list of wallets which support staking.
SOL tokens in your wallet must first be moved into a stake account. You can create as many stake accounts as you like, and deposit as much or as little SOL into each stake account as you want. Each new stake account has a unique address, and a single wallet can manage or “authorize” many different stake accounts. Check out our docs on stake account structure for more details.
In order to earn staking rewards (if inflation is enabled on Mainnet Beta), the tokens in a stake account must be delegated to a validator. A single stake account can only be delegated to a single validator at any time, so if you want to delegate to different validators you will need to split your tokens between multiple stake accounts.
Where can I learn about the validators on Solana?
There are various community-operated tools where you can view information about the network as well as certain performance metrics about individual validators, such as:
Many validators also chose to introduce themselves and their services on the Solana forums:
Can I stake tokens from an account if my tokens have a lockup?
Yes. Some people may have received a stake account with locked up tokens from the Solana Foundation that was distributed in exchange for services. Tokens in stake accounts with a lockup may not be withdrawn to another wallet address before the lockup expires, but they may still be delegated to a validator to potentially earn staking rewards during this time. Rewards earned on locked tokens are deposited back into the locked stake account.
How do I add tokens to a stake account?
When you first create a stake account, you specify how many SOL tokens you want to fund it with, and these tokens are withdrawn from your main wallet account and deposited into the new stake account.
Tokens can also be transferred into a pre-existing stake account at any time, by using your wallet’s Transfer or Send feature and providing the address of your stake account. If you transfer tokens into a stake account that is already delegated, these new tokens will not automatically be delegated.
If you have a delegated stake account and you wish to increase your delegation to a particular validator, the best practice is to create a new stake account with the additional amount of stake and delegate that account to the same validator.
Example: Increasing the stake delegated to a single validator
- User has a wallet with 1000 SOL balance.
- User uses the wallet interface to create a stake account with 100 SOL, then delegates the tokens in the stake account to Validator A.
- Wallet balance is now 900 SOL and the wallet also controls a stake account with a balance of 100 SOL.
- The stake account shows in the wallet interface and on the Explorer that it is “Activating”. Once it is “Active”, the staked tokens are eligible for rewards. See Timing Considerations for more details.
- Later, the user wants to increase their delegation to Validator A, so uses the wallet interface to create a second stake account with 50 SOL, then delegates the tokens in the new stake account to Validator A.
- Wallet balance is now 850 SOL and the wallet also controls 2 stake accounts with 100 and 50 SOL, respectively, each delegated to Validator A.
If you transfer tokens into a stake account that is already delegated, these new tokens will not automatically be delegated. In order to get these new tokens also delegated and earning rewards, you would need to un-delegate the entire account, then re-delegate the same account. As un-delegating and re-delegating can take several days to take effect, your original stake would not be earning rewards during this transition period.
Therefore, we recommend only transferring SOL into a stake account when it is first created or otherwise not delegated.
How do I remove tokens from an existing stake account?
Tokens can only be withdrawn from a stake account when they are not currently delegated. When a stake account is first un-delegated, it is considered “deactivating” or “cooling down”. Tokens may not be withdrawn from the account until some or all of them have finished deactivating and are considered “inactive” and therefore no longer earning any potential staking rewards. For details on how long this transition period may take, please see Timing Considerations.
Once the tokens in a stake account are inactive, they can be withdrawn back to your main wallet address or to another address immediately.
Example: Withdrawing all tokens from a stake account
- User has a wallet with a balance of 900 SOL, and a single stake account with 100 SOL delegated to a validator.
- User uses the wallet interface to Deactivate their stake delegation. The stake account shows in the wallet interface and on the Explorer that it is “Deactivating”. Once it is “Inactive” or “Not Delegated”, the staked tokens stop earning rewards and can be withdrawn. See Timing Considerations for more details.
- User can use the wallet interface to withdraw their all tokens back into their main wallet account. The wallet balance now shows 1,000 SOL and the stake account is closed.
If you want to reduce the amount of delegated stake assigned to a given validator without deactivating your entire balance (and therefore missing any potential rewards during the delegation downtime), you can Split an existing stake account into two accounts, and undelegate one, while leaving the other account delegated and continuously eligible for rewards.
Example: Reducing the delegation staked to a given validator
- User has a wallet with a balance of 800 SOL, and a single stake account with 200 SOL delegated to a validator.
- User wants to reduce the amount of stake delegated to the validator by 100 SOL.
- Use the wallet interface to “Split” the stake account, and specifies 100 SOL as the amount to split.
- There are now 2 stake accounts, each with 100 SOL which are each delegated to the same validator.
- User can then use the wallet interface to Deactivate one of their stake delegations. The stake account shows in the wallet interface and on the Explorer that it is “Deactivating”. Once it is “Inactive” or “Not Delegated”, the staked tokens stop earning rewards and can be withdrawn. See Timing Considerations for more details.
- Once the account is Inactive, the user can then choose to delegate the account to a different validator, or to withdraw the tokens back into the main wallet, or to further split the inactive stake account and delegate to multiple different validators.
Tokens in a stake account with a lockup may not be withdrawn until the lockup expires, regardless of the delegation state of that account. Once the lockup expires, undelegated tokens may be withdrawn immediately. There is no action required by the account holder to specifically unlock the account.
Delegation Timing Considerations
When you delegate or un-delegate a stake account, the tokens do not change state immediately. Newly delegated tokens are considered “activating” or “warming up”, and are not eligible to earn rewards until they are fully activated. Newly un-delegated tokens are considered “deactivating” or “cooling down” and are not able to be withdrawn until deactivated.
The Solana protocol only allows stake tokens to finish
changing state at the beginning of a new epoch. An epoch
is approximately 2 days long. Use
solana epoch-info to
see details of the current epoch.
If you delegate tokens in a stake account in the middle of an epoch, the tokens will appear in your wallet as “activating” until the current epoch ends, at which point they will be active and eligible to earn rewards. Whether you delegate your stake tokens near the beginning of the current epoch, or near the end of the current epoch does not impact when the tokens will become active, which is only at the next epoch boundary. The same logic applies to un-delegating or deactivating a delegated stake account. Deactivating tokens cannot be withdrawn until they have finished deactivating at the epoch boundary.
There is a limit to how much total stake can change state in a single epoch across the entire Solana network. No more than 25% of the total active stake on the network can be activated or deactivated in a single epoch. In a scenario where more than 25% of the total active take on the network is being activated in a single epoch, a portion of all activating/deactivating stake up to the global 25% limit, will finish changing state at the first epoch boundary. The remaining stake would stay as “activating” or “deactivating” for at least one more epoch, until the next epoch boundary.
If a stake activation takes multiple epochs, the portion of stake that becomes fully active at the first epoch boundary is eligible for rewards, while the remaining portion that is still activating for an additional epoch is not yet eligible for rewards.
Similarly, if a stake deactivation takes multiple epochs, the portion of stake that becomes fully inactive at the first epoch boundary becomes able to be withdrawn, while the remaining portion is still deactivating for an additional epoch, at which point it can then be withdrawn.
How can I check on the status of a specific stake account?
All stake accounts on Solana (and all accounts of any variety) can be viewed on Solana’s network explorer, found here:
Copy and paste the stake account address of interest in the main search bar of the explorer to see details of the account, including its activation/deactivation/delegation status, current balance, and the address of the stake account’s authorities, which would usually be the same as your wallet’s main address.
Depending on which wallet solution you use to manage your stake accounts, this same information may be visible by logging in to your wallet and viewing your stake accounts.