Summary
The key detail page needs staking pool data to render the APY estimate. A GET /keys/:keyId/staking endpoint that reads staking pool balance, total staked quantity, and recent protocol fee inflow for the key should be added.
Scope
- Add GET /keys/:keyId/staking endpoint (no auth required)
- Return stakingPoolBalance, totalStaked, recentFeeInflow (sum of fees in the past 30 days), and stakerCount
- Read staking state from on-chain contract storage via the Soroban RPC
- Cache the response in Redis for 60 seconds and invalidate on each stake, unstake, or fee collection event
- Return 404 for unknown key IDs
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram
Summary
The key detail page needs staking pool data to render the APY estimate. A GET /keys/:keyId/staking endpoint that reads staking pool balance, total staked quantity, and recent protocol fee inflow for the key should be added.
Scope
Acceptance Criteria
ETA: 12 hours
Coordinate on Telegram