This guide walks you through delegating GEN tokens to a validator on the GenLayer testnet.
Delegation allows you to stake your GEN tokens with an existing validator without running validator infrastructure yourself. You earn staking rewards proportional to your stake.
- Node.js installed
- GenLayer CLI installed (
npm install -g genlayer) - GEN tokens for staking
genlayer account createYou'll be prompted to set a password. This creates an encrypted keystore file.
genlayer network testnet-bradburyTransfer GEN tokens to your address. Check your balance:
genlayer accountgenlayer staking epoch-infoNote the delegatorMinStake - you need at least this amount.
List all active validators:
genlayer staking active-validatorsOutput:
{
count: 6,
validators: [
'0xa8f1BF1e5e709593b4468d7ac5DC315Ea3CAe130',
'0xe9246A020cbb4fC6C46e60677981879c9219e8B9',
...
]
}Get details about a specific validator:
genlayer staking validator-info --validator 0xa8f1BF1e5e709593b4468d7ac5DC315Ea3CAe130Look for:
live: true- Validator is activebanned: 'Not banned'- Validator is in good standingidentity- Validator's metadata (moniker, website, etc.)
For convenience:
genlayer account unlockgenlayer staking delegator-join --validator 0xa8f1...130 --amount 100genOptions:
--validator <address>- Validator address to delegate to (required)--amount <amount>- Amount to stake (e.g.,100gen)
genlayer staking delegation-info --validator 0xa8f1...130Output:
{
delegator: '0x86D0d159483CBf01E920ECfF8bB7F0Cd7E964E7E',
validator: '0xa8f1BF1e5e709593b4468d7ac5DC315Ea3CAe130',
shares: '100000000000000000000',
stake: '100 GEN',
projectedReward: '0.2 GEN per epoch',
pendingDeposits: 'None',
pendingWithdrawals: 'None'
}The projectedReward shows your estimated earnings per epoch based on current inflation and your stake weight.
genlayer staking delegation-info --validator 0xa8f1...130To withdraw your stake:
genlayer staking delegator-exit --validator 0xa8f1...130 --shares 50Options:
--validator <address>- Validator you delegated to--shares <shares>- Number of shares to withdraw
This initiates a withdrawal. Your tokens enter an unbonding period of 7 epochs before they can be claimed.
Check your pending withdrawals with delegation-info:
pendingWithdrawals: [
{
epoch: '5',
shares: '50',
stake: '50 GEN',
claimableAtEpoch: '12',
status: 'Unbonding (4 epochs remaining)'
}
]After the 7-epoch unbonding period, claim your tokens:
genlayer staking delegator-claim --validator 0xa8f1...130Consider these factors when choosing a validator:
- Uptime - Validators with high uptime earn more rewards
- Reputation - Check their identity metadata and community presence
- Stake - Higher stake may indicate trust from the community
- Not banned/quarantined - Avoid validators with issues
Check quarantined validators:
genlayer staking quarantined-validatorsCheck banned validators:
genlayer staking banned-validatorsRun genlayer account create first.
Ensure you have enough GEN. Check with genlayer account.
Check minimum with genlayer staking epoch-info and increase your amount.
Verify the validator address is correct and they are still active.
Check the transaction status:
genlayer receipt <tx-hash>When done, lock your account:
genlayer account lock