Skip to main content

Staking Tokens

Staking $XRB tokens on RibbleChain secures the Proof-of-Stake (PoS) network and earns rewards. This guide explains how to stake tokens as a validator or delegator.

Prerequisites

Step 1: Set Up Staking

Initialize your staking profile:

ribblechain-cli stake init

This creates a staking configuration in ~/.ribblechain/stake.json:
{
"walletAddress": "0xYOUR_ADDRESS",
"network": "testnet",
"stakingContract": "0xSTAKING_CONTRACT_ADDRESS"
}

Step 2: Stake as a Validator
Run a validator node and stake $XRB:
ribblechain-cli stake validator --amount 32000 --node-id YOUR_NODE_ID

Minimum stake: 32,000 $XRB (testnet). Replace YOUR_NODE_ID with your node's public key:
ribblechain-cli node info

Step 3: Stake as a Delegator
Delegate $XRB to an existing validator:
ribblechain-cli stake delegate --amount 1000 --validator 0xVALIDATOR_ADDRESS

No minimum stake for delegators.
Step 4: Monitor Staking
Check your staking status:
ribblechain-cli stake status

Output:
{
"walletAddress": "0xYOUR_ADDRESS",
"role": "validator",
"stakedAmount": "32000",
"rewards": "50.25",
"validatorAddress": "0xYOUR_ADDRESS"
}

View on the RibbleChain Explorer under the "Staking" tab.
Step 5: Withdraw Stake
Unstake your tokens (subject to unbonding period, e.g., 7 days):
ribblechain-cli stake withdraw --amount 1000

Best Practices

Validator Uptime: Ensure your node is online 24/7 to avoid slashing.
Diversification: Delegate to multiple validators to reduce risk.
Security: Store private keys securely and enable Node Security.
Rewards: Reinvest rewards to compound earnings.

Next Steps

Learn about Staking Rewards.
Explore Sequencer Setup.
Refer to Troubleshooting for staking issues.