defi-yield
Skill này làm gì
Skill này phân tích lợi nhuận từ các sản phẩm tài chính phi tập trung như cho vay, cung cấp thanh khoản và staking. Skill dành cho nhà đầu tư crypto muốn so sánh lợi suất một cách công bằng và đánh giá mức độ bền vững của chúng.
Khi nào nên dùng
- ✓Khi bạn muốn so sánh lợi suất cho vay hoặc staking giữa các giao thức DeFi.
- ✓Khi bạn muốn đánh giá một lợi suất khai thác thanh khoản cao có bền vững không.
- ✓Khi bạn muốn đọc lãi suất vay như tín hiệu về nhu cầu đòn bẩy trong crypto.
Liên kết skill
https://github.com/HKUDS/Vibe-Trading/blob/main/agent/src/skills/defi-yield/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“So sánh lợi suất cho vay stablecoin trên các giao thức DeFi lớn và cho tôi biết những giao thức nào có vẻ bền vững.”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent phân loại lợi suất theo nguồn, như cho vay, phí LP, staking hoặc token khuyến khích, rồi điều chỉnh theo rủi ro. Nó lưu ý rằng lợi suất cao chủ yếu được trả bằng token khuyến khích có thể không kéo dài, và so sánh các giao thức về mức độ bền vững.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
DeFi Yield Analysis & Optimization
Overview
Analyze and compare yields across DeFi protocols — lending, liquidity provision, staking, and yield farming — to identify the best risk-adjusted opportunities and assess sustainability. DeFi yields are a real-time proxy for crypto market leverage demand, capital allocation, and protocol health.
Core Concepts
1. DeFi Yield Sources
| Yield Source | Mechanism | Typical APY Range | Risk Level |
|---|---|---|---|
| Lending (supply) | Earn interest from borrowers | 1-15% (stablecoins 3-8%) | Low-medium |
| Borrowing cost | Interest paid by borrowers | 3-20% | N/A (cost side) |
| LP fees (AMM) | Trading fee share from DEX | 5-50% (varies by pair) | Medium-high |
| Staking | Validator/delegation rewards | 3-15% | Low-medium |
| Liquidity mining | Protocol token incentives | 10-500% (unsustainable) | High |
| Restaking | Re-hypothecated staking yield | 5-20% (ETH + AVS rewards) | Medium-high |
| Points farming | Off-chain points → future airdrop | Unknown (speculative) | Very high |
2. Lending Rate Analysis
Lending rates as market signal:
# High borrow rates = high leverage demand = bullish sentiment
# Low borrow rates = low leverage demand = bearish / waiting
def lending_rate_signal(borrow_rate_stable, borrow_rate_eth):
"""Analyze DeFi lending rates for market sentiment."""
if borrow_rate_stable > 15:
stable_signal = "extreme_demand" # Leveraged long via stablecoin borrowing
elif borrow_rate_stable > 8:
stable_signal = "elevated_demand"
elif borrow_rate_stable > 3:
stable_signal = "normal"
else:
stable_signal = "low_demand" # Bear market, no one borrowing
if borrow_rate_eth > 10:
eth_signal = "extreme_demand" # Shorting or leveraged strategies
elif borrow_rate_eth > 5:
eth_signal = "elevated"
else:
eth_signal = "low_demand"
return stable_signal, eth_signal
Key lending protocols:
| Protocol | Chain | Specialization | TVL Range |
|---|---|---|---|
| Aave V3 | Multi-chain | Blue-chip lending, institutional grade | $10-20B |
| Compound V3 | Ethereum, Base | Conservative, USDC-focused | $3-5B |
| MakerDAO/Sky | Ethereum | CDP-based DAI/USDS minting | $8-15B |
| Morpho | Ethereum | Rate optimization, P2P matching | $3-8B |
| Spark | Ethereum | MakerDAO lending arm | $2-5B |
| Kamino | Solana | Concentrated LP + lending | $1-3B |
3. LP Yield Analysis
Impermanent Loss (IL) — the core risk of LP positions:
def impermanent_loss(price_ratio_change):
"""
Calculate impermanent loss for a 50/50 AMM pool.
price_ratio_change: new_price / old_price of the volatile asset.
"""
r = price_ratio_change
il = 2 * (r ** 0.5) / (1 + r) - 1
return il * 100 # Return as percentage
# Examples:
# Price +25% → IL = -0.6%
# Price +50% → IL = -2.0%
# Price +100% (2x) → IL = -5.7%
# Price +200% (3x) → IL = -13.4%
# Price -50% → IL = -5.7%
# Price -75% → IL = -20.0%
LP yield = fee income + token incentives - impermanent loss
def net_lp_yield(fee_apy, incentive_apy, estimated_il_annualized):
"""Calculate risk-adjusted LP yield."""
gross_yield = fee_apy + incentive_apy
net_yield = gross_yield - abs(estimated_il_annualized)
return net_yield
# Example: ETH/USDC pool
# Fee APY: 15%, Incentive APY: 20%, Estimated IL: 8%
# Net yield: 15% + 20% - 8% = 27%
LP pool evaluation criteria:
| Metric | Good | Mediocre | Avoid |
|---|---|---|---|
| Fee APY / TVL | > 10% | 5-10% | < 5% |
| IL risk (based on pair volatility) | < 5% annualized | 5-15% | > 15% |
| TVL stability (30d change) | Growing or stable | Declining < 10% | Declining > 30% |
| Volume/TVL ratio | > 0.5x daily | 0.1-0.5x | < 0.1x |
| Incentive dependency | < 30% of yield | 30-70% | > 70% (unsustainable) |
4. Staking Yield Analysis
ETH staking ecosystem:
| Method | APY | Risk | Liquidity |
|---|---|---|---|
| Solo validator | ~3.5% | Slashing, downtime | Locked (exit queue) |
| Lido (stETH) | ~3.3% | Smart contract, governance | Liquid (stETH tradeable) |
| Rocket Pool (rETH) | ~3.2% | Smart contract, more decentralized | Liquid |
| Coinbase (cbETH) | ~3.0% | Custodial, regulatory | Liquid |
| EigenLayer restaking | ~3.5% + AVS rewards | Smart contract, slashing risk | Semi-liquid |
**Staking yi
Câu hỏi thường gặp
Tại sao lợi suất cao không phải lúc nào cũng tốt?
Lợi suất rất cao được trả qua token khuyến khích thường chỉ tạm thời và có thể biến mất khi khuyến khích kết thúc.
Cho vay DeFi có an toàn tuyệt đối không?
Không. Nó có rủi ro hợp đồng thông minh, thanh khoản và thị trường, và skill chỉ ra các rủi ro này.
Lãi suất vay cho biết điều gì?
Lãi suất vay cao thường nghĩa là nhu cầu đòn bẩy nhiều hơn, và điều này có thể phản ánh tâm lý thị trường.
Chi tiết
Mô tả gốc của tác giả
DeFi yield analysis and optimization — lending rates, LP yields, staking returns, yield farming strategies, risk-adjusted yield comparison, and protocol-level sustainability assessment.
repo: HKUDS/Vibe-Trading
Độ phổ biến
- Sao GitHub
- 37k
- Vị trí xếp hạng
- #7511
- Giấy phép
- MIT
- Cập nhật
- 1/11/2026
Bình luận
- …
Thêm skill từ kho mã này
vibe-trading
37kCho agent của bạn bộ công cụ nghiên cứu tài chính đầy đủ: backtest, phân tích nhân tố, định giá quyền chọn và dữ liệu thị trường nhiều nước.
adr-hshare
37kChỉ cho agent của bạn cách so sánh giá của một công ty Trung Quốc được niêm yết ở nhiều thị trường, như ADR ở Mỹ và cổ phiếu ở Hồng Kông.
akshare
37kCho agent của bạn lấy dữ liệu thị trường miễn phí: cổ phiếu Trung Quốc và toàn cầu, tương lai, ngoại hối, chỉ số kinh tế, không cần API key.
alpha-zoo
37kCho agent của bạn duyệt thư viện nhân tố cổ phiếu dựng sẵn và kiểm tra cả một nhóm nhân tố dự đoán lợi nhuận tốt đến đâu trên thị trường đã chọn.
Skill tương tự
gitcrawl
394kCho phép agent của bạn tìm trong kho lưu trữ issue và pull request GitHub, gom các mục trùng lặp và kiểm tra trạng thái hiện tại trên GitHub.
slacrawl
394kCho phép agent của bạn tìm và đếm tin nhắn trong kho lưu trữ Slack cục bộ, kiểm tra kho đó mới đến mức nào và làm mới khi cần.
goplaces
394kGiúp agent của bạn tìm địa điểm, lấy chi tiết và đánh giá, và xác định tên địa điểm bằng Google Places, với đầu ra JSON cho script.