Skip to main content
You can delegate NEAR tokens to a validator to help secure the network and earn staking rewards. This tutorial shows you how to stake tokens, check balances, unstake, and withdraw using the NEAR CLI.
Contract source codeYou can review the Staking pool smart contract source code in this GitHub repository.

Delegate NEAR tokens

Before delegating, you need to choose a validator (a node that participates in staking). Check NearBlocks, Pikespeak or Near Staking, and look for validators with a good track record, uptime, and reasonable commission rates.
If you prefer, you can get the list of current validators by using the near-validator CLI:

Stake Tokens

You will start earning staking rewards after the next epoch

Staked Balance

To check your staked balance on the <my_validator> pool for the <user-account.near> account, run the following command:
You can view additional information and balances from the staking pool using the following CLI commands:

Total staked balance of the entire pool

Owner of the staking pool

Current reward fee

Owner’s balance

Staking key


Withdrawing Staked Tokens

To withdraw your staked tokens, you will first need to “un-delegate” them from the validator. Your tokens will enter a 4-epoch unbonding period before they can be withdrawn.

Unstake Tokens

Use the unstake-all command to unstake all tokens at once:

Query Unstaked Balance

Withdraw Tokens

Once the unbonding period has passed, you can withdraw your unstaked tokens:
If you want to withdraw all available tokens, you can use the withdraw-all command:

Tools and Resources