Agent skill · data analytics · jeremylongshore

optimizing-staking-rewards

Compare and optimize staking rewards across validators, protocols, and

Why this skill is useful

Adds a Python script for optimizing staking rewards with detailed risk assessment and comparison across protocols that the AI cannot generate on its own.

What it needs

Requires python installed locally. Requires defillama account access. About 2k tokens when loaded. Last updated 2026-08-07. 2,604 stars on the source repository.

What this skill does

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: 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: Calculates effective APY accounting for gas costs and projects returns at 1M, 3M, 6M, and 1Y. 3. Optimize existing portfolio with current positions: Suggests higher-yield alternatives with projected improvement and switching costs. 4. Compare protocols or run risk assessment: 5. Export results in JSON or CSV: Output Comparison table ranked by risk-adjusted return (Net APY multiplied by Risk Score / 10), showing native and liquid staking options: 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 ${CLAUDESKILLDIR}/references/errors.md for comprehensive error handling. Examples Common staking analysis workflows from single-asset comparison to full portfolio optimization: Resources ${CLAUDESKILLDIR}/references/implementation.md - Optimization reports, risk assessment details, disclaimers ${CLAUDESKILLDIR}/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

How to use it

Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:

@skills jeremylongshore/optimizing-staking-rewards--be5fe8

View the source on GitHub

Browse the @skills marketplace