From everything-claude-trading
- Evaluating DeFi yield opportunities across protocols and chains
npx claudepluginhub brainbytes-dev/everything-claude-tradingThis skill uses the workspace's default tool permissions.
- Evaluating DeFi yield opportunities across protocols and chains
Provides Ktor server patterns for routing DSL, plugins (auth, CORS, serialization), Koin DI, WebSockets, services, and testApplication testing.
Conducts multi-source web research with firecrawl and exa MCPs: searches, scrapes pages, synthesizes cited reports. For deep dives, competitive analysis, tech evaluations, or due diligence.
Provides demand forecasting, safety stock optimization, replenishment planning, and promotional lift estimation for multi-location retailers managing 300-800 SKUs.
APR (Annual Percentage Rate):
APY (Annual Percentage Yield):
Auto-compounding Cost/Benefit:
Definition: The difference in portfolio value between holding tokens in an LP vs simply holding them in a wallet.
Constant Product AMM (Uniswap v2) IL Formula:
IL = 2 * sqrt(price_ratio) / (1 + price_ratio) - 1
Where price_ratio = new_price / initial_price
Price change -> IL:
1.25x (25% up) -> -0.6%
1.50x (50% up) -> -2.0%
2.00x (2x up) -> -5.7%
3.00x (3x up) -> -13.4%
5.00x (5x up) -> -25.5%
0.50x (50% down) -> -5.7% (symmetric with 2x up)
0.20x (80% down) -> -25.5%
Concentrated Liquidity IL (Uniswap v3):
IL vs Fee Income Decision:
Net position P&L = fee_income - impermanent_loss - gas_costs
LP is profitable when:
fee_income > IL + gas_costs
Fee income depends on:
- Trading volume through the pool
- Fee tier (0.01% to 1%)
- Your share of liquidity in the active price range
- Duration of the position
Emission Yield (Unsustainable):
Real Yield (Sustainable):
Smart Contract Risk:
Market Risk:
Liquidity Risk:
Operational Risk:
Strategy 1: Delta-neutral LP
- Provide liquidity in ETH/USDC pool
- Short ETH perpetual equal to 50% of position value
- IL is offset by perp profit/loss (imperfect hedge but reduces variance)
- Net return = fee income - funding rate cost - residual IL
Strategy 2: Options-based hedge
- Buy put options on the volatile asset in the pair
- Protects against large downside moves that amplify IL
- Cost: option premium reduces net yield
Strategy 3: Correlated pair farming
- Farm pairs with high correlation (stETH/ETH, WBTC/renBTC)
- IL is minimal when prices move together
- Lower yield but much lower risk
Risk tier allocation:
- Blue chip farms (Aave, Uniswap major pairs): up to 30% of DeFi allocation
- Mid-tier (established protocols, new chains): up to 15%
- Degen farms (unaudited, high APY, new protocols): max 5%
- Never >5% of total portfolio in any single farm
- Emergency exit plan for each position documented
Strategy A — Curve 3pool LP:
- Base APY from fees: 2.5%
- CRV emissions: 8% (at current CRV price)
- Total APY: 10.5%
- IL risk: minimal (all stablecoins)
- Smart contract risk: low (Curve is battle-tested)
- Risk-adjusted yield: ~9%
Strategy B — Aave USDC lending:
- Supply APY: 3.5%
- No IL risk
- Smart contract risk: low
- Risk-adjusted yield: ~3.2%
Strategy C — New protocol stablecoin farm:
- Advertised APY: 50%
- Emission-funded (token has no revenue)
- Smart contract risk: high (unaudited, 2 weeks old)
- Expected real APY after token decline: ~5-10%
- Risk-adjusted yield: ~2% (high probability of loss)
Decision: Strategy A offers best risk-adjusted return.
Strategy C's headline APY is misleading.
Uniswap v3 ETH/USDC position:
- ETH price: $2,000
- Range: $1,700 - $2,300 (±15%)
- Capital efficiency: ~6.7x vs full range
- Fee tier: 0.30%
Scenario analysis (30-day horizon):
- If ETH stays in range: ~25% APY from fees
- If ETH goes to $2,500: position is 100% USDC, IL = -8.2% (amplified)
- If ETH drops to $1,500: position is 100% ETH, IL = -11.3% (amplified)
Expected outcome (historical vol = 80% annualized):
- Probability of staying in range: ~65%
- Expected fee income: $1,200 on $50,000 position
- Expected IL: -$400
- Net expected return: $800 / $50,000 = 1.6% monthly = ~19% APY
Gas costs for rebalancing: ~$80 per rebalance (2-3 times per month)
Net after gas: ~17% APY
Red flags identified:
- Protocol launched 5 days ago, no audit
- APY: 2,000% on native token LP
- Token price: down 60% from launch
- TVL growing but token price declining (people farming and selling)
- No revenue source — 100% emission funded
- Anonymous team, forked code
Analysis:
- Current APY in USD terms: 2000% * 0.4 (token decline) = ~800%
- But token is declining ~10% per day
- Daily yield: 800% / 365 = 2.2%
- Daily token decline: 10%
- Net daily return: -7.8%
Conclusion: Negative expected value despite headline APY.
Classic farm-and-dump dynamics. Avoid.
Before entering yield farming positions, verify: