PRD: Staking Rewards Optimizer
Summary
One-liner: Compare and optimize staking rewards across validators, protocols, and blockchains to maximize yield while managing risk.
Domain: Cryptocurrency / Proof-of-Stake / DeFi
Users: Stakers, Yield Farmers, Portfolio Managers, DeFi Researchers
Problem Statement
Proof-of-stake staking involves significant complexity:
- Dozens of chains with different staking mechanisms (native, liquid, restaking)
- Hundreds of validators per chain with varying performance and commission rates
- Multiple liquid staking protocols with different risk/reward profiles
- Dynamic APYs that change based on participation rates and tokenomics
- Hidden costs (gas, unstaking periods, slashing risk)
- No unified interface to compare opportunities across the ecosystem
Stakers need a tool that aggregates staking data, calculates true returns after costs, assesses risks, and recommends optimal allocation strategies.
Target Users
Persona 1: Yield-Seeking Staker
- Profile: Individual crypto holder looking to earn passive income
- Goals: Maximize staking returns with acceptable risk
- Pain Points: Overwhelmed by protocol choices, doesn't understand risk factors
- Needs: Simple comparison tables, risk ratings, clear recommendations
Persona 2: DeFi Portfolio Manager
- Profile: Professional managing staked assets across multiple chains
- Goals: Optimal allocation across protocols, track performance over time
- Pain Points: Manual tracking across chains, calculating true yields
- Needs: Multi-chain view, position projections, rebalancing recommendations
Persona 3: Liquid Staking Researcher
- Profile: Analyst evaluating liquid staking derivatives (LSDs)
- Goals: Compare stETH, rETH, frxETH, and other LSDs objectively
- Pain Points: Metrics scattered across protocols, hard to compare apples-to-apples
- Needs: Standardized comparisons, peg stability data, protocol risk scores
User Stories
US-1: Compare Staking Opportunities
As a yield-seeking staker
I want to compare staking yields across different chains and protocols
So that I can identify the best opportunities for my assets
Acceptance Criteria:
- Shows APY/APR for native staking on major chains (ETH, ATOM, DOT, SOL)
- Includes liquid staking options (Lido, Rocket Pool, Frax, Marinade)
- Displays lock-up periods and unbonding times
- Factors in estimated gas costs for each option
US-2: Optimize Current Portfolio
As a DeFi portfolio manager
I want to input my current staking positions and get optimization recommendations
So that I can improve my overall yield
Acceptance Criteria:
- Accepts current positions (token, amount, current protocol, APY)
- Calculates total portfolio yield
- Suggests reallocation to higher-yield opportunities
- Shows projected improvement in annual returns
- Warns about switching costs and timing considerations
US-3: Assess Protocol Risk
As a liquid staking researcher
I want to see risk assessments for each protocol
So that I can balance yield against safety
Acceptance Criteria:
- Risk score (1-10) for each protocol
- Factors: audit status, time in production, TVL, slashing history
- Validator concentration metrics
- Smart contract risk indicators
- Clearly explains risk factors
US-4: Calculate True Returns
As a yield-seeking staker
I want to see true APY after all costs
So that I can make accurate comparisons
Acceptance Criteria:
- Shows gross APY (advertised rate)
- Deducts protocol fees and commissions
- Estimates gas costs for staking/unstaking
- Shows net APY after all fees
- Includes auto-compound benefits where applicable
US-5: Compare Liquid Staking Tokens
As a liquid staking researcher
I want to compare LSDs on standardized metrics
So that I can recommend the best options
Acceptance Criteria:
- Shows exchange rate vs underlying (stETH/ETH ratio)
- Tracks 30-day peg stability
- Displays TVL and market share
- Shows secondary market liquidity (DEX depth)
- Includes protocol token rewards if any
Functional Requirements
REQ-1: Multi-Source Data Aggregation
- Fetch staking data from DeFiLlama pools API
- Query StakingRewards.com or similar for native staking rates
- Support major chains: Ethereum, Cosmos, Polkadot, Solana, Avalanche, Near
- Cache data with configurable TTL (default 5 minutes)
REQ-2: Yield Calculations
- Convert between APY and APR
- Calculate effective APY with compounding frequency
- Estimate gas costs based on current network conditions
- Project returns for custom time horizons (1M, 3M, 6M, 1Y)
REQ-3: Risk Assessment Engine
- Score protocols based on multiple factors
- Track validator performance and slashing events
- Monitor smart contract audit status
- Flag concentration risks (single validator dominance)
REQ-4: Portfolio Optimization
- Accept current positions as input
- Run optimization algorithm for allocation
- Respect user constraints (max per protocol, excluded chains)
- Generate rebalancing recommendations
REQ-5: Multiple Output Formats
- Table format for quick comparisons
- JSON for programmatic use
- CSV for spreadsheet analysis
- Detailed report with recommendations
Non-Goals
- Not providing financial advice: Educational tool only
- Not executing transactions: Analysis only, no wallet integration
- Not tracking real-time prices: Focus on staking yields, not trading
- Not supporting every chain: Focus on major PoS chains
Success Metrics
- Skill activates correctly on staking-related queries
- Returns accurate staking rates (within 1% of source data)
- Risk scores align with community consensus on protocol safety
- Users find optimization recommendations actionable
Integration Points
Input
- User's current staking positions (optional)
- Target assets (e.g., "ETH", "ATOM")
- Risk tolerance (conservative, moderate, aggressive)
- Investment timeframe
Output
- Comparison tables of staking opportunities
- Optimization recommendations with projected returns
- Risk assessments for each option
- Step-by-step implementation guidance
Data Sources
- DeFiLlama Pools API:
https://yields.llama.fi/pools (liquid staking)
- StakingRewards API: Native staking rates and validator data
- CoinGecko API: Price data for USD calculations
- Protocol APIs: Direct queries to Lido, Rocket Pool, etc.
UX Flow
User Input (asset/positions)
↓
Fetch Data (DeFiLlama, StakingRewards)
↓
Calculate Metrics (net APY, risk scores)
↓
Run Optimization (if positions provided)
↓
Format Output (table/JSON/report)
↓
Display Recommendations
Constraints
- API rate limits on free tiers
- Some data sources may be incomplete or delayed
- Staking rates are point-in-time snapshots
- Risk scores are estimates, not guarantees
Risk Assessment
| Risk |
Impact |
Mitigation |
| Stale data |
Medium |
Cache with short TTL, show data age |
| Inaccurate APY |
High |
Cross-reference multiple sources |
| Missing protocols |
Medium |
Focus on major protocols first |
| API unavailability |
Medium |
Fallback to cached data |
Version History
| Version |
Date |
Author |
Changes |
| 1.0.0 |
2025-01-15 |
Jeremy Longshore |
Initial PRD |
1---2name: 027-prd-adb6eafa3description: PRD: Staking Rewards Optimizer4---5# PRD: Staking Rewards Optimizer67## Summary89**One-liner**: Compare and optimize staking rewards across validators, protocols, and blockchains to maximize yield while managing risk.1011**Domain**: Cryptocurrency / Proof-of-Stake / DeFi12**Users**: Stakers, Yield Farmers, Portfolio Managers, DeFi Researchers1314## Problem Statement1516Proof-of-stake staking involves significant complexity:17- Dozens of chains with different staking mechanisms (native, liquid, restaking)18- Hundreds of validators per chain with varying performance and commission rates19- Multiple liquid staking protocols with different risk/reward profiles20- Dynamic APYs that change based on participation rates and tokenomics21- Hidden costs (gas, unstaking periods, slashing risk)22- No unified interface to compare opportunities across the ecosystem2324Stakers need a tool that aggregates staking data, calculates true returns after costs, assesses risks, and recommends optimal allocation strategies.2526## Target Users2728### Persona 1: Yield-Seeking Staker29- **Profile**: Individual crypto holder looking to earn passive income30- **Goals**: Maximize staking returns with acceptable risk31- **Pain Points**: Overwhelmed by protocol choices, doesn't understand risk factors32- **Needs**: Simple comparison tables, risk ratings, clear recommendations3334### Persona 2: DeFi Portfolio Manager35- **Profile**: Professional managing staked assets across multiple chains36- **Goals**: Optimal allocation across protocols, track performance over time37- **Pain Points**: Manual tracking across chains, calculating true yields38- **Needs**: Multi-chain view, position projections, rebalancing recommendations3940### Persona 3: Liquid Staking Researcher41- **Profile**: Analyst evaluating liquid staking derivatives (LSDs)42- **Goals**: Compare stETH, rETH, frxETH, and other LSDs objectively43- **Pain Points**: Metrics scattered across protocols, hard to compare apples-to-apples44- **Needs**: Standardized comparisons, peg stability data, protocol risk scores4546## User Stories4748### US-1: Compare Staking Opportunities49**As a** yield-seeking staker50**I want to** compare staking yields across different chains and protocols51**So that** I can identify the best opportunities for my assets5253**Acceptance Criteria**:54- Shows APY/APR for native staking on major chains (ETH, ATOM, DOT, SOL)55- Includes liquid staking options (Lido, Rocket Pool, Frax, Marinade)56- Displays lock-up periods and unbonding times57- Factors in estimated gas costs for each option5859### US-2: Optimize Current Portfolio60**As a** DeFi portfolio manager61**I want to** input my current staking positions and get optimization recommendations62**So that** I can improve my overall yield6364**Acceptance Criteria**:65- Accepts current positions (token, amount, current protocol, APY)66- Calculates total portfolio yield67- Suggests reallocation to higher-yield opportunities68- Shows projected improvement in annual returns69- Warns about switching costs and timing considerations7071### US-3: Assess Protocol Risk72**As a** liquid staking researcher73**I want to** see risk assessments for each protocol74**So that** I can balance yield against safety7576**Acceptance Criteria**:77- Risk score (1-10) for each protocol78- Factors: audit status, time in production, TVL, slashing history79- Validator concentration metrics80- Smart contract risk indicators81- Clearly explains risk factors8283### US-4: Calculate True Returns84**As a** yield-seeking staker85**I want to** see true APY after all costs86**So that** I can make accurate comparisons8788**Acceptance Criteria**:89- Shows gross APY (advertised rate)90- Deducts protocol fees and commissions91- Estimates gas costs for staking/unstaking92- Shows net APY after all fees93- Includes auto-compound benefits where applicable9495### US-5: Compare Liquid Staking Tokens96**As a** liquid staking researcher97**I want to** compare LSDs on standardized metrics98**So that** I can recommend the best options99100**Acceptance Criteria**:101- Shows exchange rate vs underlying (stETH/ETH ratio)102- Tracks 30-day peg stability103- Displays TVL and market share104- Shows secondary market liquidity (DEX depth)105- Includes protocol token rewards if any106107## Functional Requirements108109### REQ-1: Multi-Source Data Aggregation110- Fetch staking data from DeFiLlama pools API111- Query StakingRewards.com or similar for native staking rates112- Support major chains: Ethereum, Cosmos, Polkadot, Solana, Avalanche, Near113- Cache data with configurable TTL (default 5 minutes)114115### REQ-2: Yield Calculations116- Convert between APY and APR117- Calculate effective APY with compounding frequency118- Estimate gas costs based on current network conditions119- Project returns for custom time horizons (1M, 3M, 6M, 1Y)120121### REQ-3: Risk Assessment Engine122- Score protocols based on multiple factors123- Track validator performance and slashing events124- Monitor smart contract audit status125- Flag concentration risks (single validator dominance)126127### REQ-4: Portfolio Optimization128- Accept current positions as input129- Run optimization algorithm for allocation130- Respect user constraints (max per protocol, excluded chains)131- Generate rebalancing recommendations132133### REQ-5: Multiple Output Formats134- Table format for quick comparisons135- JSON for programmatic use136- CSV for spreadsheet analysis137- Detailed report with recommendations138139## Non-Goals140141- **Not providing financial advice**: Educational tool only142- **Not executing transactions**: Analysis only, no wallet integration143- **Not tracking real-time prices**: Focus on staking yields, not trading144- **Not supporting every chain**: Focus on major PoS chains145146## Success Metrics147148- Skill activates correctly on staking-related queries149- Returns accurate staking rates (within 1% of source data)150- Risk scores align with community consensus on protocol safety151- Users find optimization recommendations actionable152153## Integration Points154155### Input156- User's current staking positions (optional)157- Target assets (e.g., "ETH", "ATOM")158- Risk tolerance (conservative, moderate, aggressive)159- Investment timeframe160161### Output162- Comparison tables of staking opportunities163- Optimization recommendations with projected returns164- Risk assessments for each option165- Step-by-step implementation guidance166167### Data Sources168- **DeFiLlama Pools API**: `https://yields.llama.fi/pools` (liquid staking)169- **StakingRewards API**: Native staking rates and validator data170- **CoinGecko API**: Price data for USD calculations171- **Protocol APIs**: Direct queries to Lido, Rocket Pool, etc.172173## UX Flow174175```176User Input (asset/positions)177 ↓178Fetch Data (DeFiLlama, StakingRewards)179 ↓180Calculate Metrics (net APY, risk scores)181 ↓182Run Optimization (if positions provided)183 ↓184Format Output (table/JSON/report)185 ↓186Display Recommendations187```188189## Constraints190191- API rate limits on free tiers192- Some data sources may be incomplete or delayed193- Staking rates are point-in-time snapshots194- Risk scores are estimates, not guarantees195196## Risk Assessment197198| Risk | Impact | Mitigation |199|------|--------|------------|200| Stale data | Medium | Cache with short TTL, show data age |201| Inaccurate APY | High | Cross-reference multiple sources |202| Missing protocols | Medium | Focus on major protocols first |203| API unavailability | Medium | Fallback to cached data |204205## Version History206207| Version | Date | Author | Changes |208|---------|------|--------|---------|209| 1.0.0 | 2025-01-15 | Jeremy Longshore | Initial PRD |