Overview
Staking skills enable agents to participate in Solana’s proof-of-stake consensus mechanism. By staking SOL to validators, agents can earn rewards while helping secure the network.How Solana Staking Works
Solana staking involves several key concepts:Stake Accounts
- Separate accounts: Staked SOL is held in dedicated stake accounts (not your wallet)
- Rent-exempt: Each stake account requires ~0.002 SOL rent
- Delegatable: Stake accounts delegate to validator vote accounts
Validator Delegation
- Vote accounts: Validators have vote accounts that accept delegations
- Commission: Validators charge commission (e.g., 10% of rewards)
- Performance: Rewards depend on validator uptime and performance
Epochs and Timing
- Epoch: Solana’s time unit (~2-3 days on mainnet, faster on devnet)
- Activation: Staking takes effect at the next epoch boundary
- Deactivation: Unstaking also takes one epoch to complete
- Warmup/Cooldown: New stakes warm up gradually, deactivations cool down
stake_sol
Stake SOL by creating a stake account and delegating it to a validator.Parameters
Amount of SOL to stake (e.g., 1.0 for one SOL).
Validator vote account address. If not provided, Karen uses a default reliable devnet validator.
What Happens
- Creates a new stake account
- Transfers SOL from your wallet to the stake account
- Delegates the stake account to the validator
- Activation begins at next epoch boundary
Example Invocation: Default Validator
Example Response
Example Invocation: Specific Validator
Activation Timing: Your stake becomes active at the next epoch boundary. On devnet this is usually within hours; on mainnet it can take 2-3 days.
list_stakes
List all your stake accounts with their status, balances, and delegations.Parameters
This skill requires no parameters.Returns
For each stake account:- Account address
- SOL balance
- State (activating, active, deactivating, inactive)
- Delegated validator (if any)
Example Invocation
Example Response: Multiple Stakes
Example Response: No Stakes
Stake States:
- inactive: Stake account created but not delegated
- activating: Delegation submitted, waiting for epoch boundary
- active: Fully active and earning rewards
- deactivating: Unstake initiated, waiting for cooldown
unstake_sol
Deactivate a stake account. After deactivation completes (1 epoch), you can withdraw the SOL.Parameters
Public key of the stake account to deactivate. Get this from
list_stakes.What Happens
- Initiates deactivation of the stake account
- Deactivation takes effect at next epoch boundary
- After deactivation completes, SOL can be withdrawn
Example Invocation
Example Response
withdraw_stake
Withdraw SOL from a fully deactivated stake account back to your wallet.Parameters
Public key of the deactivated stake account. Must be in “inactive” state.
Requirements
Example Invocation
Example Response
Rent Reclamation: Withdrawing closes the stake account and reclaims the rent-exempt balance (~0.002 SOL).
Complete Staking Lifecycle Example
Scenario: Agent stakes SOL, waits for activation, then unstakes and withdraws
Cycle 1: Check Initial Balance
SOL: 10.0000 SOL
Cycle 2: Stake 5 SOL
Cycle 3: List Stakes (Activating State)
Cycle 4: Wait for Epoch (After 1+ Epoch)
Cycle 5: Unstake
Stake account deactivation initiated.
Cycle 6: Wait for Deactivation
Cycle 7: Check Status (After 1+ Epoch)
Cycle 8: Withdraw
Successfully withdrew stake. SOL returned to your wallet.
Cycle 9: Verify Final Balance
SOL: 10.0019 SOL (Net gain: 0.0019 SOL after rent)
Staking Strategies
Long-Term Staking (Passive Income)
- Stake significant SOL to high-performance validator
- Leave staked for multiple epochs
- Rewards compound automatically
- Withdraw periodically to realize gains
Validator Shopping
- Stake small amounts to multiple validators
- Monitor rewards over several epochs
- Consolidate to best-performing validator
- Balance rewards vs. decentralization
Liquid Staking Alternative
Karen doesn’t currently support liquid staking protocols (like Marinade or Lido), but these allow you to stake while maintaining liquidity through derivative tokens.
Rewards and APY
Reward Factors
Staking rewards depend on:- Validator commission: Lower = more rewards for you
- Validator performance: Uptime and vote accuracy
- Network inflation rate: Solana’s overall inflation schedule
- Total staked: Network-wide stake affects individual rewards
Typical APY
- Mainnet: 5-8% APY (varies by validator and network conditions)
- Devnet: Rewards are for testing only, not real value
Reward Distribution
- Automatic: Rewards accrue directly to stake account balance
- Compound: Rewards automatically compound (stake on stake)
- No claiming: No manual claim required
Error Handling
Common Staking Errors
- Insufficient balance: Not enough SOL to stake (need amount + rent + fees)
- Invalid validator: Validator vote account doesn’t exist or isn’t active
- Account not deactivated: Can’t withdraw from active/activating stake
- Already deactivating: Stake is already in deactivation process
Recovery Strategies
- Can’t withdraw: Check state with
list_stakes, wait for full deactivation - Lost stake account address: Use
list_stakesto find all your stakes - Rewards seem low: Check validator commission and performance
Devnet vs Mainnet Differences
| Aspect | Devnet | Mainnet |
|---|---|---|
| Epoch duration | Minutes to hours | 2-3 days |
| APY | Testing only | 5-8% real |
| Validator reliability | Variable | Generally high |
| Value | None (test SOL) | Real economic value |
| Activation time | Very fast | 2-3 days |
Next Steps
Wallet Operations
Return to basic wallet operations
DeFi Operations
Learn about token swaps and DeFi