OP

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.zip

Installs 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, and
70 charsno explicit “when” trigger
Intermediate

Key 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

You give it
Asset name, optional amount, optional existing positions, optional protocols for comparison
You get back
Comparison table of staking options ranked by risk-adjusted return

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

  1. Python 3.8+ installed
  2. Dependencies: pip install requests
  3. Network access to DeFiLlama APIs
  4. Optional: CoinGecko API key for higher rate limits

Instructions

  1. Compare staking options for a specific asset:

    python ${CLAUDE_SKILL_DIR}/scripts/staking_optimizer.py --asset ETH
    

    Shows protocol name, type (native vs liquid), gross/net APY, risk score, TVL, and lock-up period.

  2. Analyze with position size for gas-adjusted yields:

    python ${CLAUDE_SKILL_DIR}/scripts/staking_optimizer.py --asset ETH --amount 10
    

    Calculates effective APY accounting for gas costs and projects returns at 1M, 3M, 6M, and 1Y.

  3. 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.

  4. 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
    
  5. 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

ErrorCauseSolution
API timeoutDeFiLlama unreachableCached data used with warning
Invalid assetUnknown staking assetLists supported assets
Rate limitedToo many API callsAutomatic retry with backoff
No data foundProtocol not indexedFalls 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

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

Python 3.8+ installedpip install requestsNetwork access to DeFiLlama APIs

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.

SkillInstallsUpdatedSafetyDifficulty
optimizing-staking-rewards (this skill)127dReviewIntermediate
quant-analyst1032moNo flagsAdvanced
stock-analyzer712moReviewBeginner
pair-trade-screener111moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

More by jeremylongshore

View all by jeremylongshore

analyzing-logs

jeremylongshore

Analyze application logs to detect performance issues, identify error patterns, and improve stability by extracting key insights.

14123

ollama-setup

jeremylongshore

Configure auto-configure Ollama when user needs local LLM deployment, free AI alternatives, or wants to eliminate hosted API costs. Trigger phrases: "install ollama", "local AI", "free LLM", "self-hosted AI", "replace OpenAI", "no API costs". Use when appropriate context detected. Trigger with relevant phrases based on skill purpose.

1167

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".

1071

generating-database-seed-data

jeremylongshore

Process this skill enables AI assistant to generate realistic test data and database seed scripts for development and testing environments. it uses faker libraries to create realistic data, maintains relational integrity, and allows configurable data volumes. u... Use when working with databases or data models. Trigger with phrases like 'database', 'query', or 'schema'.

1033

cursor-codebase-indexing

jeremylongshore

Execute set up and optimize Cursor codebase indexing. Triggers on "cursor index setup", "codebase indexing", "index codebase", "cursor semantic search". Use when working with cursor codebase indexing functionality. Trigger with phrases like "cursor codebase indexing", "cursor indexing", "cursor".

885

testing-mobile-apps

jeremylongshore

Execute mobile app testing on iOS and Android devices/simulators. Use when performing specialized testing. Trigger with phrases like "test mobile app", "run iOS tests", or "validate Android functionality".

810

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.

103355

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.

71214

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.

1198

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.

881

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".

1071

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.

548

Search skills

Search the agent skills registry