optimizing-staking-rewards
Calculates and compares net staking yields across PoS protocols to identify optimal asset allocations.
Install
mkdir -p .claude/skills/optimizing-staking-rewards && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/5365" && unzip -o skill.zip -d .claude/skills/optimizing-staking-rewards && rm skill.zipInstalls to .claude/skills/optimizing-staking-rewards
Activation
This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.
Compare and optimize staking rewards across validators, protocols, andKey capabilities
- →Compare staking options for a specific asset
- →Analyze staking with position size for gas-adjusted yields
- →Optimize existing portfolios with current positions
- →Compare protocols or run risk assessment
- →Export results in JSON or CSV format
How it works
The skill analyzes staking opportunities across PoS blockchains and liquid staking protocols. It compares APY/APR, calculates net yields after fees, assesses protocol risks, and recommends optimal allocations.
Inputs & outputs
When to use optimizing-staking-rewards
- →Compare staking APY across protocols
- →Calculate gas-adjusted net staking yields
- →Assess risk scores for PoS validators
- →Optimize existing crypto staking portfolios
About this skill
Optimizing Staking Rewards
Overview
Analyze staking opportunities across PoS blockchains and liquid staking protocols. Compares APY/APR, calculates net yields after fees, assesses protocol risks, and recommends optimal allocations.
Prerequisites
- Python 3.8+ installed
- Dependencies:
pip install requests - Network access to DeFiLlama APIs
- Optional: CoinGecko API key for higher rate limits
Instructions
-
Compare staking options for a specific asset:
python ${CLAUDE_SKILL_DIR}/scripts/staking_optimizer.py --asset ETHShows protocol name, type (native vs liquid), gross/net APY, risk score, TVL, and lock-up period.
-
Analyze with position size for gas-adjusted yields:
python ${CLAUDE_SKILL_DIR}/scripts/staking_optimizer.py --asset ETH --amount 10Calculates effective APY accounting for gas costs and projects returns at 1M, 3M, 6M, and 1Y.
-
Optimize existing portfolio with current positions:
python ${CLAUDE_SKILL_DIR}/scripts/staking_optimizer.py --optimize \ --positions "10 ETH @ lido 4.0%, 100 ATOM @ native 18%, 50 DOT @ native 14%"Suggests higher-yield alternatives with projected improvement and switching costs.
-
Compare protocols or run risk assessment:
python ${CLAUDE_SKILL_DIR}/scripts/staking_optimizer.py --compare --protocols lido,rocket-pool,frax-ether python ${CLAUDE_SKILL_DIR}/scripts/staking_optimizer.py --asset ETH --detailed -
Export results in JSON or CSV:
python ${CLAUDE_SKILL_DIR}/scripts/staking_optimizer.py --asset ETH --format json --output staking.json
Output
Comparison table ranked by risk-adjusted return (Net APY multiplied by Risk Score / 10), showing native and liquid staking options:
STAKING OPTIONS FOR ETH 2025-01-15 15:30 UTC # 2025 timestamp
Protocol Type Gross APY Net APY Risk TVL Unbond
Frax (sfrxETH) liquid 5.10% 4.59% 7/10 $450M instant
Lido (stETH) liquid 4.00% 3.60% 9/10 $15B instant
Rocket Pool liquid 4.20% 3.61% 8/10 $3B instant
Coinbase cbETH liquid 3.80% 3.42% 9/10 $2B instant
ETH Native native 4.00% 4.00% 10/10 $50B variable
Error Handling
| Error | Cause | Solution |
|---|---|---|
| API timeout | DeFiLlama unreachable | Cached data used with warning |
| Invalid asset | Unknown staking asset | Lists supported assets |
| Rate limited | Too many API calls | Automatic retry with backoff |
| No data found | Protocol not indexed | Falls back to known protocol list |
See ${CLAUDE_SKILL_DIR}/references/errors.md for comprehensive error handling.
Examples
Common staking analysis workflows from single-asset comparison to full portfolio optimization:
# Quick ETH staking comparison
python ${CLAUDE_SKILL_DIR}/scripts/staking_optimizer.py --asset ETH
# Large position with full risk analysis
python ${CLAUDE_SKILL_DIR}/scripts/staking_optimizer.py --asset ETH --amount 100 --detailed
# Multi-asset comparison exported to CSV
python ${CLAUDE_SKILL_DIR}/scripts/staking_optimizer.py --assets ETH,SOL,ATOM --format csv
# Portfolio optimization with current positions
python ${CLAUDE_SKILL_DIR}/scripts/staking_optimizer.py --optimize \
--positions "50 ETH @ lido 3.6%, 500 SOL @ marinade 7.5%" # 500 - minimum stake amount in tokens
Resources
${CLAUDE_SKILL_DIR}/references/implementation.md- Optimization reports, risk assessment details, disclaimers${CLAUDE_SKILL_DIR}/references/errors.md- Comprehensive error handling- DeFiLlama Yields: https://defillama.com/yields
- StakingRewards: https://www.stakingrewards.com
- Lido: https://lido.fi | Rocket Pool: https://rocketpool.net
When not to use it
- →When DeFiLlama is unreachable, causing API timeouts
- →When an invalid asset is provided
- →When a protocol is not indexed, resulting in no data found
Prerequisites
Limitations
- →Rate limits can occur with too many API calls
How it compares
This skill provides specific commands to compare staking options, analyze gas-adjusted yields for position sizes, and optimize existing portfolios, unlike general staking analysis.
Compared to similar skills
optimizing-staking-rewards side by side with the closest alternatives in the catalog.
| Skill | Installs | Updated | Safety | Difficulty |
|---|---|---|---|---|
| optimizing-staking-rewards (this skill) | 1 | 27d | Review | Intermediate |
| quant-analyst | 103 | 2mo | No flags | Advanced |
| stock-analyzer | 71 | 2mo | Review | Beginner |
| pair-trade-screener | 11 | 1mo | Review | Advanced |
Try saying
Example prompts that trigger this skill in your AI assistant.
More by jeremylongshore
View all by jeremylongshore →You might also like
quant-analyst
zenobi-us
Expert quantitative analyst specializing in financial modeling, algorithmic trading, and risk analytics. Masters statistical methods, derivatives pricing, and high-frequency trading with focus on mathematical rigor, performance optimization, and profitable strategy development.
stock-analyzer
FrancyJGLisboa
Provides comprehensive technical analysis for stocks and ETFs using RSI, MACD, Bollinger Bands, and other indicators. Activates when user requests stock analysis, technical indicators, trading signals, or market data for specific ticker symbols.
pair-trade-screener
tradermonty
Statistical arbitrage tool for identifying and analyzing pair trading opportunities. Detects cointegrated stock pairs within sectors, analyzes spread behavior, calculates z-scores, and provides entry/exit recommendations for market-neutral strategies. Use when user requests pair trading opportunities, statistical arbitrage screening, mean-reversion strategies, or market-neutral portfolio construction. Supports correlation analysis, cointegration testing, and spread backtesting.
risk-metrics-calculation
wshobson
Calculate portfolio risk metrics including VaR, CVaR, Sharpe, Sortino, and drawdown analysis. Use when measuring portfolio risk, implementing risk limits, or building risk monitoring systems.
backtesting-trading-strategies
jeremylongshore
Backtest crypto and traditional trading strategies against historical data. Calculates performance metrics (Sharpe, Sortino, max drawdown), generates equity curves, and optimizes strategy parameters. Use when user wants to test a trading strategy, validate signals, or compare approaches. Trigger with phrases like "backtest strategy", "test trading strategy", "historical performance", "simulate trades", "optimize parameters", or "validate signals".
model-usage
openclaw
Use CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.