2061/yield-optimizer/SKILL.md
Autonomous USDC yield optimization across DeFi protocols. Scans 60+ pools on 6 chains (Ethereum, Arbitrum, Base, Optimism, Polygon, Avalanche) across 8+ protocols (Aave V3, Morpho, Pendle, Compound V3, Spark, Fluid, Euler). Auto-routes deposits to the highest-yielding protocol per chain. Includes a full web UI with multi-protocol deposit/withdraw. Use when the user asks about yield farming, best stablecoin rates, DeFi yields, where to deposit USDC, or wants autonomous yield management.
npx skillsauth add starchild-ai-agent/community-skills @2061/yield-optimizerInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Autonomous USDC yield optimization across DeFi lending protocols and chains. Auto-routes deposits to the best protocol per chain — Aave V3, Morpho (ERC-4626), or Pendle (PT fixed-rate).
Data sources: DeFi Llama Yields API, Morpho GraphQL API, Pendle Hosted SDK API (all free, no key).
| Protocol | Type | Deposit Method | Chains |
|----------|------|---------------|--------|
| Aave V3 | Lending pool | pool.supply(asset, amount, onBehalfOf, 0) | ETH, ARB, Base, OP, Polygon, Avax |
| Morpho | ERC-4626 vaults | vault.deposit(assets, receiver) | ETH, ARB, Base, OP |
| Pendle | PT fixed-rate | Hosted SDK → router swap | ETH, ARB, Base |
| Compound V3 | Lending | comet.supply(asset, amount) | ETH, ARB, Base, OP, Polygon |
| Spark / Sky | Lending | pool.supply(...) | ETH |
| Fluid | Lending | vault.deposit(...) | ETH |
| Euler | Lending | vault.deposit(...) | ETH, ARB, Base |
Stablecoins tracked: USDC, USDT, DAI, USDS, sDAI, sUSDe, GHO
server.js
├── /api/pools — best protocol per chain (Aave vs Morpho vs Pendle)
├── /api/chains — supported chain list
├── /api/tvl — total TVL from DeFi Llama
├── /api/agent-activity — recent deposit/withdraw log
├── /api/vault/:addr — user positions across all protocols
├── /api/deposit — record deposit event
├── /api/withdraw — record withdraw event
├── /api/usdc-balance/:addr — cross-chain USDC balance (RPC reads)
└── /api/pendle-swap — get Pendle SDK calldata for PT swap
public/
├── index.html — landing page + dashboard
├── styles.css — dark theme, glass-morphic UI
├── app.js — dashboard logic, deposit/withdraw modals
└── wallet.js — multi-protocol deposit routing
For each chain:
1. Fetch Aave V3 APY from DeFi Llama
2. Fetch Morpho vault APY from GraphQL (if vault exists on chain)
3. Fetch Pendle PT implied APY from Hosted SDK (if market exists on chain)
4. Return winner = max(aave_apy, morpho_apy, pendle_apy)
On deposit:
IF winner == "aave" → approve USDC → pool.supply()
IF winner == "morpho" → approve USDC → vault.deposit()
IF winner == "pendle" → approve USDC → router.swapExactTokenForPt()
On withdraw:
Read user balances across all protocols
IF has aTokens → pool.withdraw()
IF has Morpho shares → vault.withdraw() or vault.redeem()
IF has Pendle PT → router swap PT → USDC (or redeem at maturity)
When user asks "what are the best yields?" or "where should I put my USDC?":
python3 skills/yield-optimizer/scripts/scan_pools.pypython3 skills/yield-optimizer/scripts/scan_pools.py # Full report
python3 skills/yield-optimizer/scripts/scan_pools.py --json # JSON for automation
python3 skills/yield-optimizer/scripts/scan_pools.py --chain Arbitrum # Filter by chain
python3 skills/yield-optimizer/scripts/scan_pools.py --protocol pendle # Filter by protocol
python3 skills/yield-optimizer/scripts/scan_pools.py --amount 10000 --risk balanced # Allocation
For the full visual experience with wallet connection:
cd output/yield-agent-v4
npm install
node server.js # starts on port 3456
Then use preview_serve to expose it.
When user confirms a recommendation:
/api/pools)Prerequisites: Load wallet-policy skill and propose standard wildcard policy before on-chain ops.
For scheduled autonomous operation:
schedule_task(
command="python3 skills/yield-optimizer/scripts/scan_pools.py --json",
schedule="every 1 hour"
)
| Tier | Protocols | Characteristics | |------|-----------|----------------| | 🟢 Safe | Aave V3, Compound V3, Spark | Established, audited, >$100M TVL | | 🟡 Moderate | Morpho, Euler, Fluid | Newer but audited, ERC-4626, >$10M TVL | | 🔴 Aggressive | Pendle | Higher yields via PT fixed-rate, maturity risk |
See references/contracts.json for:
Morpho vault addresses:
0xBEEF01735c132Ada46AA9aA4c54623cAA92A64CB (Steakhouse USDC)0xc1256Ae5FF1cf2719D4937adb3bbCCab2E00A2Ca (Steakhouse USDC)0x2C8FBB630Bae56bBC27E286d0D4816D62e4C1509 (Steakhouse USDC)0x7BfA7e0e3De0e3a6B4399F9CAa1E444Dd3d55c54 (Gauntlet USDC Prime)apyReward (token incentives) can vanish. Weight apyBase higher.convertToAssets).parseUnits(amount, 6) not 18.| Skill | Purpose | |-------|---------| | wallet | Balance checks, transaction execution | | across-bridge | Cross-chain USDC transfers when rebalancing | | wallet-policy | Ensure wallet policy is set before on-chain ops | | coinglass / market-data | Broader market context for yield decisions | | charting | Visualize yield trends over time |
tools
TQX (tqx.trade) HK/US stock quant workflow via tqx-cli: cross-sectional factor analysis, event-driven strategy backtests on the panda_backtest engine, and agent-driven automated paper trading. Use when the user wants to run factor IC/IR analysis, backtest a Python trading strategy on Hong Kong or US stocks, or set up agent-automated trading (e.g. "backtest a moving-average strategy on AAPL", "analyze a momentum factor on HK stocks", "let the agent trade my paper account").
tools
中学物理实验教学参赛方案套件。包含四个完整实验(单摆测g、声悬浮测声速、向心力定量演示仪、电磁阻尼定量研究),每套含固件源码、3D打印图纸、教学PPT、教学文稿、采购清单、调试手册、视频分镜脚本、模拟器。Use when a teacher/student needs a complete, classroom-ready physics experiment package for competition or teaching.
development
End-to-end blog management for AI agents. Write, import, build, preview, and publish articles using the blog template. Covers draft workflow, article import, SEO, OG images, and deployment.
development
ESP8266/ESP32 + 磁簧开关/霍尔传感器 单摆测重力加速度实验套件。 硬件搭建→固件烧录→数据采集→Web仪表盘→g值计算→教学文档,一站式完成。 Use when the user wants to build a pendulum g-measurement experiment, measure gravity with a micro-controller, or needs a complete physics experiment package with hardware + firmware + dashboard + teaching materials.