name: sync-earn-pools description: Synchronize earn pool URLs with DefiLlama data. Validates URLs, removes stale pools, adds new pools. Use when asked to check, update, or fix earn pool links.
Sync Earn Pools
Maintain the src/lib/meta/earn-pools.json file which maps DefiLlama pool IDs to
their corresponding protocol UI URLs.
Quick Start
Run the sync script with --fix to automatically clean up and add pools:
python3 .claude/skills/sync-earn-pools/scripts/analyze_pools.py --fix
This will:
- Remove pools that no longer exist in DefiLlama
- Add new pools (with auto-generated URLs where possible)
- Report pools that need manual URL fixes
Script Options
# Just analyze (no changes)
python3 .claude/skills/sync-earn-pools/scripts/analyze_pools.py
# Analyze + validate that URLs actually work (slower)
python3 .claude/skills/sync-earn-pools/scripts/analyze_pools.py --validate-urls
# Apply fixes (remove stale, add new)
python3 .claude/skills/sync-earn-pools/scripts/analyze_pools.py --fix
# Dry run (show what would change without modifying)
python3 .claude/skills/sync-earn-pools/scripts/analyze_pools.py --fix --dry-run
What the Script Detects
| Category | Description | Auto-fixed? |
|---|---|---|
| ๐๏ธ Stale pools | In JSON but removed from DefiLlama | โ Yes (with --fix) |
| ๐ New pools | In DefiLlama but not in JSON | โ Yes (with --fix) |
| ๐ง Convex wrong URLs | Contract address instead of pool ID | โ Yes (queries on-chain) |
| โ Broken URLs | URLs that return HTTP errors | โ Manual |
| โ ๏ธ Generic URLs | Landing pages, not specific pool links | โ Manual |
| ๐ง Other incorrect URLs | Uniswap/Aerodrome wrong patterns | โ Manual |
Automatic Convex URL Generation
When running with --fix, the script queries the Convex Booster contract on-chain to:
- Build a mapping of all LP token addresses โ pool IDs (cached for the session)
- Automatically fix any Convex URLs that use contract addresses instead of pool numbers
- Generate correct URLs for new Convex pools
Manual URL Fixes
After running --fix, there may be pools needing manual URL attention:
- New pools without auto-generated URLs - Find the URL manually
- Generic URLs - Replace with specific pool links
- Broken URLs - Find the correct/updated URL
URL Patterns by Protocol
โ Verified Correct Patterns
Curve - Use contract address in path
https://curve.finance/#/{chain}/pools/{contract-address}/deposit
Example: https://curve.finance/#/ethereum/pools/0xE99810Cd5AdCD7b13455aE1Be678B382d61f2d1E/deposit
StakeDAO - Use LP token address as search param
https://stakedao.org/yield?search={lp-token-address}
Example: https://stakedao.org/yield?search=0x7b303cF6124A74a867C99889d39278Bc63e1054B
Morpho - Markets use market ID, vaults use vault address
# Markets
https://app.morpho.org/market?id={market-id}&network={network}
# Vaults
https://app.morpho.org/{network}/vault/{vault-address}
Example market: https://app.morpho.org/market?id=0xdb8938f97571aeab0deb0c34cf7e6278cff969538f49eebe6f4fc75a9a111293&network=ethereum
Example vault: https://app.morpho.org/base/vault/0xbb819D845b573B5D7C538F5b85057160cfb5f313
Yearn - Use chainId and vault address
https://yearn.fi/vaults/{chainId}/{vault-address}
Example: https://yearn.fi/vaults/1/0xBfBC4acAE2ceC91A5bC80eCA1C9290F92959f7c3
- chainId: 1 = Mainnet, 8453 = Base, 42161 = Arbitrum
Merkl - Use chain name and vault type + address
https://app.merkl.xyz/opportunities/{chain}/{type}/{address}
Example: https://app.merkl.xyz/opportunities/base/MORPHOVAULT/0xbb819D845b573B5D7C538F5b85057160cfb5f313
โ ๏ธ Requires Manual Lookup
Aerodrome / Aerodrome Slipstream (Base)
https://aerodrome.finance/deposit?token0={addr}&token1={addr}&type={type}&chain0=8453&chain1=8453&factory={factory}
- Types:
0= stable,-1= volatile (vAMM),200or similar = concentrated (Slipstream) - Factory addresses vary by pool type:
- vAMM:
0x420DD381b31aEf6683db6B902084cB0FFECe40Da - Slipstream:
0x5e7BB104d84c7CB9B682AaC2F3d509f5F406809A
- vAMM:
- Must find exact URL by navigating to pool on aerodrome.finance
Example vAMM: https://aerodrome.finance/deposit?token0=0x4200000000000000000000000000000000000006&token1=0x4da9a0f397db1397902070f93a4d6ddbc0e0e6e8&type=-1&chain0=8453&chain1=8453&factory=0x420DD381b31aEf6683db6B902084cB0FFECe40Da
Example Slipstream: https://aerodrome.finance/deposit?token0=0x4da9a0f397db1397902070f93a4d6ddbc0e0e6e8&token1=0x9b8df6e244526ab5f6e6400d331db28c8fdddb55&type=200&chain0=8453&chain1=8453&factory=0x5e7BB104d84c7CB9B682AaC2F3d509f5F406809A
Beefy - Must lookup vault ID on beefy.finance
https://app.beefy.finance/vault/{vault-id}
Example: https://app.beefy.finance/vault/aerodrome-weth-lcap
- Search at: https://app.beefy.finance/ and filter by token
Convex - Use pool NUMBER (not contract address!)
https://curve.convexfinance.com/stake/ethereum/{pool-number}
Example: https://curve.convexfinance.com/stake/ethereum/412
- WRONG:
https://curve.convexfinance.com/stake/ethereum/0xE99810Cd5AdCD7b13455aE1Be678B382d61f2d1E - Find pool numbers at: https://www.convexfinance.com/stake
Uniswap - Include chain in path
https://app.uniswap.org/explore/pools/{chain}/{pool-address}
Example: https://app.uniswap.org/explore/pools/ethereum/0x32d9259e6792b2150fd50395d971864647fa27b2
- WRONG:
https://info.uniswap.org/#/pools/{address}orhttps://app.uniswap.org/explore#/pools/{address}
โ No Specific URL Available
Concentrator - Only has landing page, no pool-specific URLs
- Use:
https://concentrator.aladdin.club/ - This is acceptable and should NOT be reported as a generic URL
Tracked Tokens
The script tracks pools containing these Reserve Protocol tokens:
- RSR, eUSD, hyUSD, ETH+, USDC+, USD3, rgUSD, bsdETH, dgnETH, KNOX
Workflow for Claude
When the user invokes this skill:
- Run the script with --fix to auto-clean stale and add new pools
- Review the output for pools needing manual URLs
- For each pool without URL:
- Use WebFetch to find the correct URL on the protocol's site
- Or generate from known patterns
- Update earn-pools.json with the correct URLs
- Run again without --fix to verify all issues resolved