How the Agent Works
StakePilot's autonomous agent monitors the Solana network, evaluates validators, and manages stake positions — without human intervention.
🔄 Execution Cycle
The agent runs on a 4-hour monitoring cycle, with intelligent execution gating based on epoch timing. This prevents unnecessary transactions while ensuring timely rebalancing.
Monitor
- ›Check current epoch progress
- ›Read vault & agent balances
- ›Scan all active stake positions
- ›Evaluate validator health
Decide
- ›Epoch >90%? → Prepare rebalance
- ›New epoch (<5%)? → Execute plan
- ›Deactivating stakes ready? → Withdraw
- ›All healthy? → Skip execution
Execute
- ›Withdraw cooled-down stakes
- ›Deactivate unhealthy positions
- ›Stake to new high-quality validators
- ›Log all decisions on-chain
⏱️ Epoch-Aware Timing
Solana epochs are the heartbeat of staking. Stake changes only take effect at epoch boundaries, and deactivating stake means ~2 epochs of zero rewards. The agent uses this knowledge to time its actions:
⚖️ Rebalancing Logic
The agent is conservative about rebalancing. Deactivating stake costs ~2 epochs of rewards, so it only triggers when the cost of staying exceeds the cost of moving.
🚨 Triggers Deactivation
- •Commission raised above 15%
- •Commission jumped 3%+ since staking
- •Validator went delinquent (not voting)
- •Validator disappeared from network
✅ Keeps Position
- •Score dropped but commission stable
- •Minor performance dip (transient)
- •Better validator available (cost of moving too high)
- •Mid-epoch — wait for boundary
🎯 Validator Selection
When staking to new validators, the agent prioritizes decentralization and net yield to the staker.
Scoring Factors
🔐 Security Model
The on-chain program enforces strict constraints. The agent wallet is authorized to manage staking operations but can never extract funds.
📊 Live Activity
The agent logs every decision and transaction. View real-time activity on the dashboard.