- Docs
- Participate
- Staking
Staking
Archway is a Proof-Of-Stake (PoS) blockchain built with the Cosmos SDK , and it relies on validators in order to secure the network. Validators' voting power is determined by the amount of staking tokens (ARCHs) bonded as collateral. Delegating enables ARCH holders that don't have the skills or desire to run a validator to participate in securing the network and be rewarded.
You can stake by either:
Validators
Validators participate in the consensus protocol by proposing new blocks and receiving staking rewards in exchange. Those rewards (minus the commission fee) are then split between all the delegators. The commission fees are instead credited to the validator themselves.
Validators need to be in the active set to let their delegators earn rewards. The active set is the list of validators that have enough weight (i.e. voting power) to be included in the active set. Weight is directly proportional to the amount of delegated tokens. Just as a reference, the active set for chains built with the Cosmos SDK usually varies between 50 and 150.
Delegating
Delegators staking their coins with a validator entrust that validator to participate in the block issuance process on their behalf. This allows delegators to earn rewards in the process, while also being subjected to slashing penalties. Delegators keep full control of their funds while receiving staking rewards. Their coins stay in their wallets while staked. During the staking period, the tokens are bonded to the validator and are unusable. When the tokens are unstaked/withdrawn from the delegation, they suffer an unbonding period (a cooldown period during which the tokens are frozen before being unstacked and usable again). During the unbonding period, delegators don’t earn rewards. The unbonding period can vary between 14 and 28 days depending on the chain.
Delegators can also participate in governance by voting on the different Governance Proposals
ARCH holders who do not run a validator themselves, are called Delegators. Delegators can delegate ARCHs to a validator and obtain staking rewards minus the commission fee paid to the validator.
Slashing
Slashing the mechanism that penalizes validators (and consequently their delegators) for misbehaving, such as:
Downtime (soft slashing) When a validator is offline and does not participate in block signing for a certain amount of time, it gets slashed. Slashing leads to a small loss of staked tokens, on top of not earning new rewards for the duration of the downtime.
Double signing (hard slashing) Double signing occurs when a validator uses its private keys to sign multiple blocks at the same time. The penalty is considerably higher, as it involves a higher loss of staked tokens, jail time for the validator, and an unbonding time for the delegator tokens (during which delegators stop gaining rewards)
Validators need to be careful in adopting the necessary measures to prevent being slashed, as both the validator and its delegators are subjected to slashing penalties. For this reason, it is crucial for delegators to carefully choose the validator(s) to which delegate to.
How to choose a validator
There are many variables that can be used to compare validators and choose the right one for you. The most important indicators you need to look for are the following:
Uptime
Uptime is the metric that helps to determine how reliable a validator is Uptime is shown in the blockexplorer itself (in the validator tab) and usually varies between 90% and 100%.
Self-delegation
Self-delegation is the number of tokens a validator is delegating to itself. A high amount of self-delegation demonstrates that the validator has skin in the game, as it will need to be careful not to get slashed in order not to incur losses. A high self-delegation amount usually signals that the validator takes validating operations seriously.
Commissions
Commissions are the amounts a validator is charging for its validation services, and it is a percentage taken off the delegators' rewards. Commission rates may vary between 5 to 10%, as these amounts may provide enough profits for validators to run operations sustainably.
Commissions are a way for a validator to maintain their infrastructure costs and receive enough incentives to keep validating the chain.
Voting power
Voting power is the weight that a validator has in the consensus mechanism, and it is expressed as the percentage of the delegations to a validator compared to the full amount of delegations. In order to minimize single points of failure and nurture decentralization, it is helpful to delegate to validators with moderate voting power. This will help to balance the power between the different validators, preventing a few validators to collude.
Contributions
Some validators may run additional services such as relayers, blockexplorers, or other tools. Supporting these contributors is key to the success of a healthy ecosystem.
Voting
When delegating tokens to a validator, you are also delegating voting power. Delegating to a validator who is active in the governance processes and openly communicates with the community is an important element
Now, let's see how we can delegate some tokens to a validator.
You can stake by:
- Running a validator
- Delegating
In this section, we will focus on Delegating, which enables ARCH holders that don't have the skills or desire to run a validator to participate in securing the network and be rewarded.
You can delegate by either:
- Using the developer CLI
- Using Keplr
You can delegate by using the archwayd
or archway CLI, or by using Keplr
Delegate via CLI
Requirements
- Install the developer CLI and create a wallet
Connecting to the network
In order to delegate your stake you have to either run your node or you can connect to a trustworthy operator.
Malicious operators could return incorrect query results or censor your transactions. However, they will never be able to steal your funds, as your private keys are stored locally on your computer or ledger device. Possible options for full-node operators include validators, wallet providers or exchanges.
in order to connect to the network you need to:
Config CLI
If you are not running a node, you can configure your machine as a client. First, remove any archway node data if there is any:
rm -rf ~/.archway/*
You can set the default value for the node you are connecting to. If you want to connect to a node running on the Constantine
network, you can use:
archwayd config node https://rpc.constantine-1.archway.tech:443
Finally, you can set up the chain ID of the network we want to interact with
archwayd config chain-id constantine-1
Send funds
In order to delegate you need to send a delegate
transaction to a validator by launching:
archwayd tx staking delegate <validator-operator-address> <amount-to-bond> --from <your-key-name>
Find Validator's Operator Address
You can query all the validators and pick the one we want to delegate tokens to it by launching:
archwayd query staking validators
pagination: {}
validators:
- commission:
commission_rates:
max_change_rate: '0.100000000000000000'
max_rate: '0.100000000000000000'
rate: '0.010000000000000000'
update_time: '2021-10-12T20:15:35.967858491Z'
consensus_pubkey:
'@type': /cosmos.crypto.ed25519.PubKey
key: X1LGMAY8dToCgBuMIMpctn20Fwenim2YTGoY9Y2J+To=
delegator_shares: '1000000000.000000000000000000'
description:
moniker: my-validator
min_self_delegation: '1'
operator_address: archwayvaloper14gxqxpxulxssv7pr4kltr9tl5dujtestxvjhkp
status: BOND_STATUS_BONDED
tokens: '1000000000'
unbonding_time: '1970-01-01T00:00:00Z'
As you can see in the example, currently there is only one validator and its operator address is archwayvaloper14gxqxpxulxssv7pr4kltr9tl5dujtestxvjhkp
.
Delegate via Keplr
Staking
First open your Keplr browser extension and click on the Stake
button.
Prerequisite: Make sure to deposit some tokens beforehand.
After you click the Stake
button, the Keplr extension opens the Keplr web wallet.
In the list of validators, select the one you want and then select Manage
.
Pick a validator.
A window opens showing the website of the validator with some extra information.
Select the Delegate
button.
Enter the number of tokens that you want to stake.
Note: Since there is a transaction fee, make sure not to delegate all your tokens.
After you select the Delegate
button, another window allows you to select the transaction fees. If you want your transaction to be processed faster, you can offer a higher fee.
Now, select the Set Fee
button.
On the following page, make sure the validator address is correct.
The validator address shows on their website. Now that you see the address is correct, you can approve it.
It takes a few moments for the transaction to get through. Open the Keplr extension to see the updates on your account.
Claiming the Staking Reward
After some time, you can see the staking reward to be claimed.
To claim a reward, select the Claim
button.
Select a fee for the transaction and select the Set Fee
button.
After a few moments, you can see the updates on our account.
Note: Since there is a transaction fee, it is recommended to periodically claim the reward.
Undelegate and Redelegate
To undelegate your staked tokens, select the validator from the list of validators in your Keplr web wallet and then select the Undelegate
button.
Note: The unbonding period in Cosmos-based networks is 21
days.
To redelegate your tokens to another validator, select Redelegate
from the menu.
Then you can select another validator from the list.