Leveraged Farming
Leveraged farming amplifies your yield potential by using borrowed capital to increase your exposure to yield-generating assets. This document explains how FYV's TracerStrategy implements leveraged farming and the mechanics of leverage amplification.
What is Leveraged Farming?
Leveraged farming combines collateralized borrowing with yield farming to achieve returns greater than your initial capital. By depositing collateral to borrow additional capital, converting borrowed capital to yield-bearing tokens, and earning yield on both your capital and borrowed funds, you amplify your total returns while maintaining automated risk management through health factor monitoring.
Simple example:
_12Without leverage:_12 - Deposit: $1,000_12 - Yield: 10% APY_12 - Annual return: $100 (10% on $1,000)_12_12With 1.61x leverage:_12 - Deposit: $1,000_12 - Borrowed: $615_12 - Total farming: $1,615_12 - Yield: 10% APY on $1,615 = $161.50_12 - After repaying borrow cost (assume 3% APY): $161.50 - $18.45 = $143.05_12 - Net return: $143.05 (14.3% on $1,000 initial capital)
How TracerStrategy Achieves Leverage
TracerStrategy implements leveraged farming through integration with ALP's lending platform:
Step-by-Step Leverage Mechanics
1. Collateral Deposit
_10User deposits: 1000 FLOW @ $1.00 = $1,000_10Collateral Factor: 0.8 (80%)_10Effective Collateral (EC): $1,000 × 0.8 = $800
2. Calculate Borrowing Capacity
_10Target Health Factor: 1.3_10Maximum Safe Borrow = EC / Target HF_10 = $800 / 1.3_10 = $615.38 MOET
3. Auto-Borrow
_10Position borrows: 615.38 MOET @ $1.00 = $615.38_10Debt created: $615.38_10Health Factor: $800 / $615.38 = 1.30 ✓
4. Convert to Yield Tokens
_10Swap: 615.38 MOET → ~610 YieldToken_10Slippage: ~1% (typical)_10Yield exposure: $610
5. Deposit to Yield Vault
_10AutoBalancer deposits: 610 YieldToken to ERC4626_10Total position value: $1,000 (collateral) + $610 (yield) = $1,610_10Effective leverage: $1,610 / $1,000 = 1.61x
Leverage Ratio Calculation
The leverage ratio indicates how much total exposure you have relative to your initial capital:
_10Leverage = Total Exposure / Initial Capital_10 = (Collateral + Borrowed Value) / Collateral_10 = (C + B) / C_10 = 1 + (B / C)
For TracerStrategy with default settings:
_10Borrowed (B) = (C × CF) / Target HF_10 = (C × 0.8) / 1.3_10 = 0.615 × C_10_10Leverage = 1 + 0.615 = 1.615x
Different collateral factors:
_10CF = 0.75, Target HF = 1.3:_10 Borrow = (C × 0.75) / 1.3 = 0.577 × C_10 Leverage = 1.577x_10_10CF = 0.85, Target HF = 1.3:_10 Borrow = (C × 0.85) / 1.3 = 0.654 × C_10 Leverage = 1.654x
Risk-Adjusted Returns
Leverage amplifies both gains and losses. Understanding the risk/reward tradeoff is critical:
Upside Scenario (Yield Positive)
_16Initial: 1000 FLOW, 1.61x leverage, 10% APY on yield tokens_16_16Without leverage (baseline):_16 - Capital: $1,000_16 - Yield: 10% × $1,000 = $100_16 - Return: 10%_16_16With leverage (assuming 3% borrow cost):_16 - Collateral: $1,000_16 - Borrowed: $615.38_16 - Yield farming: $615.38 at 10% = $61.54_16 - Borrow cost: $615.38 at 3% = $18.46_16 - Net from leverage: $61.54 - $18.46 = $43.08_16 - Total return: $43.08 (4.3% additional from leverage)_16 - Combined: 10% (baseline) + 4.3% (leverage) = 14.3%_16 - Amplification: 1.43x returns
Downside Scenario (Yield Negative)
_14Initial: 1000 FLOW, 1.61x leverage, -5% yield (vault loss)_14_14Without leverage:_14 - Capital: $1,000_14 - Loss: -5% × $1,000 = -$50_14 - Return: -5%_14_14With leverage (3% borrow cost still applies):_14 - Yield farming loss: $615.38 × -5% = -$30.77_14 - Borrow cost: $615.38 × 3% = $18.46_14 - Net from leverage: -$30.77 - $18.46 = -$49.23_14 - Total return: -$49.23 (-4.9% additional loss from leverage)_14 - Combined: -5% (baseline) - 4.9% (leverage) = -9.9%_14 - Amplification: 1.98x losses
Key insight: Leverage amplifies returns but also amplifies losses. The amplification factor depends on the spread between yield and borrow cost.
Health Factor Dynamics
The health factor is critical for managing liquidation risk in leveraged positions:
Health Factor Formula
_10HF = Effective Collateral / Effective Debt_10 = (Collateral Value × CF) / Debt Value
Price Impact on Health
When collateral price changes, health factor changes proportionally:
_17Initial state:_17 - 1000 FLOW @ $1.00_17 - EC: $800 (80% CF)_17 - Debt: $615.38_17 - HF: 1.30_17_17FLOW price drops to $0.90 (-10%):_17 - Collateral value: $900_17 - EC: $900 × 0.8 = $720_17 - Debt: $615.38 (unchanged)_17 - HF: $720 / $615.38 = 1.17_17_17FLOW price drops to $0.75 (-25%):_17 - Collateral value: $750_17 - EC: $750 × 0.8 = $600_17 - Debt: $615.38_17 - HF: $600 / $615.38 = 0.975 ⚠️ LIQUIDATABLE!
Safe Price Drop Calculation
How much can price drop before liquidation?
_10Liquidation occurs when HF < 1.0:_10 (C_new × Price_new × CF) / Debt = 1.0_10_10Solving for Price_new:_10 Price_new = Debt / (C × CF)_10 = $615.38 / (1000 × 0.8)_10 = $0.769_10_10Safe price drop from $1.00:_10 Drop = ($1.00 - $0.769) / $1.00 = 23.1%
With target HF = 1.3, you have a 23.1% price drop buffer before liquidation.
Rebalancing Impact on Leverage
AutoBalancer's rebalancing affects your effective leverage over time:
Excess Profits Rebalancing
When yield accrues and AutoBalancer withdraws excess:
_14Before rebalancing:_14 - Collateral: 1000 FLOW_14 - Debt: $615.38_14 - Yield value: $671 (excess over historical $610)_14 - Leverage: ($1,000 + $671) / $1,000 = 1.671x_14_14After rebalancing (withdraw $61 excess):_14 - Swap $61 yield → ~60 FLOW_14 - Deposit 60 FLOW to position_14 - Collateral: 1060 FLOW_14 - Debt: $615.38 (unchanged)_14 - Yield value: $610 (back to baseline)_14 - Leverage: ($1,060 + $610) / $1,060 = 1.575x_14 - New HF: (1060 × 0.8) / 615.38 = 1.38 (improved!)
Effect: Leverage decreases slightly, safety buffer increases, profits locked in as collateral.
Deficit Recovery Rebalancing
When vault loses value and AutoBalancer requests recovery:
_15Before rebalancing:_15 - Collateral: 1000 FLOW_15 - Debt: $615.38_15 - Yield value: $580 (deficit below historical $610)_15 - Leverage: ($1,000 + $580) / $1,000 = 1.58x_15_15After rebalancing (borrow $30 more to cover deficit):_15 - Borrow additional $30 MOET_15 - Swap $30 MOET → ~29.7 YieldToken_15 - Deposit to vault_15 - Collateral: 1000 FLOW (unchanged)_15 - Debt: $615.38 + $30 = $645.38_15 - Yield value: $609.70 (recovered)_15 - Leverage: ($1,000 + $609.70) / $1,000 = 1.6097x_15 - New HF: (1000 × 0.8) / 645.38 = 1.24 (lower but still safe)
Effect: Leverage stays similar, safety buffer decreases, deficit recovered.
Optimizing Leverage
You can adjust leverage by changing configuration parameters:
Target Health Factor Adjustment
_13Higher Target HF (more conservative):_13 - Target HF = 1.5_13 - Borrow = (C × CF) / 1.5 = (C × 0.8) / 1.5 = 0.533 × C_13 - Leverage = 1.533x_13 - Larger safety buffer (50% above liquidation)_13 - Lower yield amplification_13_13Lower Target HF (more aggressive):_13 - Target HF = 1.1_13 - Borrow = (C × CF) / 1.1 = (C × 0.8) / 1.1 = 0.727 × C_13 - Leverage = 1.727x_13 - Smaller safety buffer (10% above liquidation)_13 - Higher yield amplification but higher risk
Multi-Vault Strategy
Advanced users can create multiple vaults with different leverage levels:
_14Conservative vault:_14 - 50% of capital_14 - Target HF = 1.5_14 - Leverage: 1.53x_14 - Low risk_14_14Aggressive vault:_14 - 50% of capital_14 - Target HF = 1.2_14 - Leverage: 1.67x_14 - Higher risk_14_14Combined effective leverage: (1.53 + 1.67) / 2 = 1.60x_14Risk diversification: Two independent positions
Best Practices
Understand Your Risk: Higher leverage = higher returns potential but also higher liquidation risk. Know your risk tolerance.
Monitor Health Factor: Check regularly, especially during volatile markets. Set alerts if possible for HF < 1.2.
Conservative Targeting: Start with higher target HF (1.4-1.5) until you understand the system, then optimize based on experience.
Diversify Collateral: If using multiple vaults, diversify across different collateral types to reduce price correlation risk.
Account for Costs: Factor in swap slippage, gas costs, and borrow costs when calculating expected returns.
Emergency Plan: Keep liquid funds available to add collateral if prices move against you.
Summary
Leveraged farming in FYV achieves 1.6x+ exposure through ALP integration, borrowing at target health factor (typically 1.3), converting borrowed capital to yield tokens, and maintaining automated health management. The system amplifies returns when yields exceed borrow costs, increases liquidation risk through reduced price buffers, and continuously optimizes through AutoBalancer rebalancing.
Risk/Reward tradeoff:
- Higher leverage → Greater amplification but higher liquidation risk
- Lower leverage → Lower amplification but greater safety buffer
- Optimal leverage → Balanced based on your risk tolerance and market outlook
Leveraged farming amplifies both gains and losses. With FYV's default 1.61x leverage and 23% price drop buffer, you get meaningful yield amplification while maintaining reasonable safety. Always monitor your health factor and understand the liquidation risks.