Step 4: Deploying Your Staking Pool

GateOmega
3 min readJul 18, 2022

--

NEAR uses a staking pool factory with a whitelisted staking contract to ensure delegators’ funds are safe. In order to run a validator on NEAR, a staking pool must be deployed to a NEAR account and integrated into a NEAR validator node. Delegators must use a UI or the command line to stake to the pool. A staking pool is a smart contract that is deployed to a NEAR account.

Run the following command in order to create your staking pool:
(Change “gateomega” with your validator Pool ID)

If there is a “True” at the End. Your pool is created.

From the example above, you need to replace:

  • Pool ID: Staking pool name, the factory automatically adds its name to this parameter, creating {pool_id}.{staking_pool_factory} Examples: gateomega.factory.shardnet.near
  • Owner ID: The SHARDNET account that will manage the staking pool.
  • Public Key: The public key in your validator_key.json file.
  • 5: The fee the pool will charge (e.g. in this case 5 over 100 is 5% of fees).
  • Account Id: The SHARDNET account deploying the staking pool.

Check your pool is now visible on here

Important : Please ensure that your Staking Key is matching with your Validator_Key

Deposit and Stake NEAR

Replace your pool id (gateomega), account id (gateomega.shardnet.near) with your own IDs.

Ping

A ping issues a new proposal and updates the staking balances for your delegators. A ping should be issued each epoch to keep reported rewards current.

Auto-Ping Script

You have to ping the server every 5 minutes in order to actualize your rewards and keep your node in active set in case it is kicked-out.

Make sh file executable with the following command:

Schedule it via Crontab :

Select 1 to enter the crontab editor.

Add the following line to the bottom line of the crontab.

Becoming a Validator

In order to become a validator and enter the validator set, a minimum set of success criteria must be met.

  • The node must be fully synced.
  • The validator_key.json must be in place.
  • The contract must be initialized with the public_key in validator_key.json.
  • The account_id must be set to the staking pool contract id.
  • There must be enough delegations to meet the minimum seat price. See the seat price here.
  • A proposal must be submitted by pinging the contract.
  • Once a proposal is accepted a validator must wait 2–3 epoch to enter the validator set.
  • Once in the validator set the validator must produce great than 90% of assigned blocks.

Check running status of validator node. If “Validator” is showing up, your pool is selected in the current validators list.

Useful commands:

Well done! You have created your staking pool!
Now let’s proceed with the Step 5: Monitoring Your Node

--

--

GateOmega
GateOmega

Written by GateOmega

Gate Omega is a new start-up company based in Turkey. We are a team of 6 and currently focusing on disruptive and innovative crypto projects .

No responses yet