Trade Locked Yield

TL;DR: This guide shows you how to lock in a guaranteed Fixed Yield rate, protecting yourself from Variable Yield drops. You'll learn the complete flow from analysis to settlement.

When to Lock Fixed Yield

Lock FY when:

Scenario
Why Lock FY

VY is temporarily high

Capture the spike before rates normalize

You need predictable income

DAO treasury, personal budgeting

You're bearish on rates

Expect VY to drop

You want to hedge

Offset variable exposure elsewhere

Pre-Trade Analysis

Step 1: Check Current Rates

// Get current Fixed Yield from the pool
const [tick, sqrtPriceX96] = await vammManager.getVAMMState(poolId);
const currentFY = Math.pow(1.0001, Number(tick)) * 100;

// Get current Variable Yield from Aave
const currentVY = await aprOracle.getOnAprRay(aUSDC_ADDRESS);
const vyPercent = Number(currentVY) / 1e27 * 100;

console.log(`Current Fixed Yield:    ${currentFY.toFixed(2)}%`);
console.log(`Current Variable Yield: ${vyPercent.toFixed(2)}%`);

Analysis:

  • If FY < VY: Locking FY costs you potential upside

  • If FY > VY: Unusual — check why (may be opportunity or risk)

  • FY ≈ VY: Market is balanced

Step 2: Calculate Break-Even

Your break-even is the VY rate where you neither profit nor lose:

Step 3: Estimate PnL Scenarios

Output:

Opening the Position

Step 1: Ensure Sufficient Margin

Step 2: Execute the Swap

Step 3: Parse the Result

Understanding Your Position

Position Breakdown

What the Numbers Mean

If
Then
Outcome

VY < FY

Cashflow positive

You profit

VY = FY

Cashflow zero

Break even

VY > FY

Cashflow negative

You lose

Monitoring Your Position

Check Unrealized PnL

Check Health Factor

Closing Early (Optional)

If you want to exit before maturity:

Note: Closing early may result in slippage and you realize current PnL immediately.

Settlement at Maturity

When Pool Matures

Execute Settlement

Complete Example

Key Takeaways

  1. Negative amountSpecified = Lock Fixed Yield

  2. Check rates first — Understand FY vs VY before trading

  3. Maintain margin buffer — Don't use maximum leverage

  4. Monitor position — Check health factor regularly

  5. Settle at maturity — Collect your PnL

Next Steps

  • Trade Variable Yield — The opposite position

  • Settlement — Maturity process details

  • Risk Management — Managing your risks

Last updated