How Interest Rate Swaps Work

TL;DR: Interest Rate Swaps exchange one type of yield for another. XCCY uses a Virtual AMM to match parties wanting Fixed Yield with those wanting Variable Yield, settling the difference at maturity.

The Basic Concept

An Interest Rate Swap (IRS) is a contract where two parties exchange yield obligations:

┌──────────────────────────────────────────────────────────────┐
│                    INTEREST RATE SWAP                        │
├──────────────────────────────────────────────────────────────┤
│                                                              │
│   Party A                              Party B               │
│   ───────                              ───────               │
│                                                              │
│   Has: Variable Yield exposure         Has: Fixed Yield      │
│   Wants: Fixed Yield certainty         Wants: VY upside     │
│                                                              │
│                       ┌───────┐                              │
│   Pays VY ───────────►│ SWAP  │◄─────────── Pays FY          │ 
│   Receives FY ◄───────│       │───────────► Receives VY      │
│                       └───────┘                              │
│                                                              │
│   Result: Locked yield          Result: Variable exposure    │
│                                                              │
└──────────────────────────────────────────────────────────────┘

Important: No principal is exchanged — only the yield difference is settled.

The XCCY Approach

Traditional IRS requires finding a counterparty with opposite needs. XCCY solves this with a Virtual AMM (VAMM):

How the VAMM Works

  1. Liquidity Providers deposit liquidity at specific FY ranges

  2. Traders swap between FY and VY at market rates

  3. Price Discovery happens automatically via supply/demand

  4. No Counterparty Search — the pool is always available

Step-by-Step: Opening a Position

Step 1: Choose Your Pool

Each XCCY pool has specific parameters:

Parameter
Example

Underlying Asset

USDC

Yield Source

Aave aUSDC

Term Start

Jan 1, 2025

Term End (Maturity)

Apr 1, 2025 (90 days)

Current FY Rate

6.2% APY

Step 2: Deposit Margin

You deposit collateral to secure your position:

Step 3: Execute the Swap

For FY Position (Lock Fixed Yield):

For VY Position (Trade Variable Yield):

Step 4: Position is Active

Your position is now active until maturity:

During the Term

What's Happening

While your position is active:

  1. Variable Yield accrues — The oracle tracks actual VY from Aave

  2. Your FY is locked — Doesn't change regardless of market

  3. PnL updates — Unrealized profit/loss based on current VY vs FY

  4. Margin monitored — Protocol ensures you have sufficient collateral

Example: Tracking Your Position

Settlement at Maturity

The Settlement Process

At maturity, positions are settled:

Settlement Math

Example Settlement

Parameter
Value

Notional

100,000 USDC

Term

90 days (0.247 years)

FY locked

6.2%

VY actual (average)

4.8%

The Role of Liquidity Providers

LPs make the market work by providing liquidity:

Complete Flow Diagram

Key Takeaways

  1. IRS exchanges yield types — FY ↔ VY with no principal transfer

  2. VAMM enables instant trading — No counterparty search needed

  3. Settlement is automatic — Oracle reports VY, protocol settles

  4. Margin protects the system — Both sides have skin in the game

  5. LPs make it work — They provide liquidity and earn fees

Next Steps

  • Locking Fixed Yield — Detailed walkthrough

  • Risk Management — Understanding the risks

  • Architecture Overview — Technical deep dive

Last updated