Real-time DeFi yield aggregator — compare APY/APR from Aave V3, Compound, Curve & Uniswap V3 with Telegram alerts.
DeFi yield aggregation compares interest rates and returns across multiple decentralized finance protocols, helping investors find the best opportunities without manually checking each platform.
This bot aggregates real-time APY data from:
- 🏦 Aave V3 — lending & borrowing rates
- 🏦 Compound — supply & borrow APY
- 🌊 Curve — liquidity pool APY + CRV rewards
- 🦄 Uniswap V3 — LP fee APY
- 💰 Best Yield Rankings — top opportunities sorted by APY
- 💵 Stablecoin Filter — show only USDC, USDT, DAI yields
- 🏦 Protocol Filter — filter by specific protocol
- 📊 Market Overview — avg, highest, lowest APY summary
- 🔔 APY Spike Alerts — get notified when APY > 20%
- 🤖 Telegram Bot — 8 interactive commands
- 🔄 Auto Cache — 10 minute cache to avoid rate limits
pip install requests# Windows PowerShell
$env:TELEGRAM_TOKEN = "your_telegram_bot_token"
$env:TELEGRAM_CHAT_ID = "your_chat_id"# Linux / Mac
export TELEGRAM_TOKEN="your_telegram_bot_token"
export TELEGRAM_CHAT_ID="your_chat_id"python defi_yield_aggregator.pypython defi_yield_aggregator.py scan| Command | Description |
|---|---|
/yield |
Best yield opportunities (top 10) |
/yield_stable |
Stablecoin yields only |
/yield_aave |
Aave V3 rates |
/yield_compound |
Compound rates |
/yield_curve |
Curve pool APY |
/yield_uni |
Uniswap V3 LP APY |
/yield_summary |
Market overview |
/yield_alert on/off |
Toggle APY spike alerts |
💰 BEST YIELD OPPORTUNITIES
━━━━━━━━━━━━━━━━━━━━━━
1. Aave V3 — USDC
💰 APY: 8.24% 🟢 | TVL: $1.2B
2. Curve — USDT/USDC/DAI
💰 APY: 6.81% 🟡 | TVL: $892M
3. Compound V3 — USDC
💰 APY: 5.43% 🟢 | TVL: $654M
4. Uniswap V3 — ETH/USDC
💰 APY: 12.3% 🟡 | TVL: $234M
🟢 LOW risk 🟡 MEDIUM risk
⏰ 2026-05-24 14:00
defi_yield_aggregator.py
├── AaveClient → Aave V3 API + DeFi Llama fallback
├── CompoundClient → Compound via DeFi Llama
├── CurveClient → Curve API + DeFi Llama fallback
├── UniswapClient → Uniswap V3 via DeFi Llama
├── YieldAggregator → Core engine (aggregate + rank + filter)
│ ├── get_all_yields() → fetch all protocols
│ ├── get_best_yields() → top N by APY
│ ├── get_stable_yields() → stablecoin only
│ ├── get_by_protocol() → filter by protocol
│ ├── detect_apy_spikes() → find unusually high APY
│ └── get_summary() → market overview stats
└── YieldBot → Telegram bot with 8 commands
| Source | Usage |
|---|---|
| DeFi Llama Yields API | Primary — all protocols |
| Aave API | Aave V3 detailed rates |
| Curve API | Curve pool APY + CRV rewards |
All data is fetched in real-time with 10-minute caching to avoid rate limits.
| Risk Level | Description |
|---|---|
| 🟢 LOW | Lending protocols (Aave, Compound) — audited, battle-tested |
| 🟡 MEDIUM | Liquidity pools (Curve, Uniswap) — impermanent loss risk |
| 🔴 HIGH | New/unaudited protocols — DYOR |
Always do your own research before depositing funds into any DeFi protocol.
requests>=2.28.0
No Web3.py required — uses REST APIs only!
Rizal — @rizalcodes
Building Web3 tools with Python 🐍⛓️
MIT License — free to use, modify, and distribute.