LLM Notice: This documentation site supports content negotiation for AI agents. Request any page with Accept: text/markdown or Accept: text/plain header to receive Markdown instead of HTML. Alternatively, append ?format=md to any URL. All markdown files are available at /md/ prefix paths. For all content in one file, visit /llms-full.txt
Skip to main content

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:


_12
Without leverage:
_12
- Deposit: $1,000
_12
- Yield: 10% APY
_12
- Annual return: $100 (10% on $1,000)
_12
_12
With 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


_10
User deposits: 1000 FLOW @ $1.00 = $1,000
_10
Collateral Factor: 0.8 (80%)
_10
Effective Collateral (EC): $1,000 × 0.8 = $800

2. Calculate Borrowing Capacity


_10
Target Health Factor: 1.3
_10
Maximum Safe Borrow = EC / Target HF
_10
= $800 / 1.3
_10
= $615.38 MOET

3. Auto-Borrow


_10
Position borrows: 615.38 MOET @ $1.00 = $615.38
_10
Debt created: $615.38
_10
Health Factor: $800 / $615.38 = 1.30 ✓

4. Convert to Yield Tokens


_10
Swap: 615.38 MOET → ~610 YieldToken
_10
Slippage: ~1% (typical)
_10
Yield exposure: $610

5. Deposit to Yield Vault


_10
AutoBalancer deposits: 610 YieldToken to ERC4626
_10
Total position value: $1,000 (collateral) + $610 (yield) = $1,610
_10
Effective 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:


_10
Leverage = Total Exposure / Initial Capital
_10
= (Collateral + Borrowed Value) / Collateral
_10
= (C + B) / C
_10
= 1 + (B / C)

For TracerStrategy with default settings:


_10
Borrowed (B) = (C × CF) / Target HF
_10
= (C × 0.8) / 1.3
_10
= 0.615 × C
_10
_10
Leverage = 1 + 0.615 = 1.615x

Different collateral factors:


_10
CF = 0.75, Target HF = 1.3:
_10
Borrow = (C × 0.75) / 1.3 = 0.577 × C
_10
Leverage = 1.577x
_10
_10
CF = 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)


_16
Initial: 1000 FLOW, 1.61x leverage, 10% APY on yield tokens
_16
_16
Without leverage (baseline):
_16
- Capital: $1,000
_16
- Yield: 10% × $1,000 = $100
_16
- Return: 10%
_16
_16
With 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)


_14
Initial: 1000 FLOW, 1.61x leverage, -5% yield (vault loss)
_14
_14
Without leverage:
_14
- Capital: $1,000
_14
- Loss: -5% × $1,000 = -$50
_14
- Return: -5%
_14
_14
With 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


_10
HF = Effective Collateral / Effective Debt
_10
= (Collateral Value × CF) / Debt Value

Price Impact on Health

When collateral price changes, health factor changes proportionally:


_17
Initial state:
_17
- 1000 FLOW @ $1.00
_17
- EC: $800 (80% CF)
_17
- Debt: $615.38
_17
- HF: 1.30
_17
_17
FLOW 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
_17
FLOW 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?


_10
Liquidation occurs when HF < 1.0:
_10
(C_new × Price_new × CF) / Debt = 1.0
_10
_10
Solving for Price_new:
_10
Price_new = Debt / (C × CF)
_10
= $615.38 / (1000 × 0.8)
_10
= $0.769
_10
_10
Safe 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:


_14
Before 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
_14
After 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:


_15
Before 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
_15
After 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


_13
Higher 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
_13
Lower 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:


_14
Conservative vault:
_14
- 50% of capital
_14
- Target HF = 1.5
_14
- Leverage: 1.53x
_14
- Low risk
_14
_14
Aggressive vault:
_14
- 50% of capital
_14
- Target HF = 1.2
_14
- Leverage: 1.67x
_14
- Higher risk
_14
_14
Combined effective leverage: (1.53 + 1.67) / 2 = 1.60x
_14
Risk 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

Key Takeaway

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.