Skip to main content

How YieldBasis Works

YieldBasis enables users to provide BTC as liquidity in an AMM pool without impermanent loss (IL), while still earning trading fees.

At a glance

  • Deposit BTC -> receive ybBTC (claim on a 2× leveraged BTC/crvUSD LP).
  • The protocol borrows crvUSD against the LP position and keeps the loan position at 2× compounding leverage (50% debt‑to‑value).
  • The position tracks BTC 1:1 (no p\sqrt{p} drag) while earning Curve trading fees.
  • Stay unstaked to earn fees in BTC, or stake the ybBTC token to earn YB token emissions instead.
  • YB can be vote-locked to grant voting power and a share of BTC fees (see the section on fee distribution for details).

The Problem: Impermanent Loss

In traditional constant‑product AMMs (Uniswap v2, x·y = k), your position is continually rebalanced between BTC and stablecoins. That makes your value grow as p\sqrt{p} (where pp is BTC price), which is slower than pp itself. When BTC rises, you’ve sold too early; when it falls, you’ve bought more on the way down. The shortfall versus simply holding is impermanent loss (IL).

Example

  • Start: 1 BTC ($100k) + $100k stablecoins
  • BTC price doubles to $200k
  • AMM position ends ≈ 0.707 BTC + $141k = ~$283,885
  • Just holding would be $300,000 -> ~5.7% IL (fees may offset some, but not reliably)

Some protocols try to cover IL with token incentives. That’s a subsidy, not a fix. YieldBasis removes IL at the root.


The Solution: Leveraged Liquidity (2×)

YieldBasis makes LP positions move 1:1 with BTC (no IL) by pairing BTC with borrowed crvUSD and keeping the position at a constant 2× compounding leverage.

  • Borrow & pair: BTC is matched with an equal USD value of crvUSD (borrowed via a dedicated CDP). Both are deposited into the Curve BTC/crvUSD pool.
  • LP as collateral: The resulting Curve LP token becomes collateral for that debt.
  • Target ratio = 50% debt / 50% equity: Compounding leverage (L = 2) means debt is always half of LP value.
  • Auto‑rebalance: A “Re‑leverage AMM” + virtual pool nudges arbitrageurs to restore 2× leverage whenever BTC moves.

Why this kills IL: In a normal AMM, LP value grows like p\sqrt{p}. With 2× leverage on top of Curve’s √p behavior, your position scales with pp instead. No p\sqrt{p} drag -> no IL.

See the Math Primer for full derivations.


Comparing Outcomes Across Any BTC Price Move

YieldBasis tracks BTC 1:1 in both directions. Below, “x·y = k AMM” shows the final value and how far below “just hold” it ends (impermanent loss).

BTC MoveJust Hold 1 BTC + $100kx·y = k AMM (final value & IL)YieldBasis (2× leverage)
–50%$150,000$141,430 (≈ –5.7% vs. hold)$150,000 (+ fees)
0%$200,000$200,000 (0% vs. hold)$200,000 (+ fees)
+50%$250,000$244,949 (≈ –2.02% vs. hold)$250,000 (+ fees)
+100%$300,000$282,843 (≈ –5.7% vs. hold)$300,000 (+ fees)
We ignore trading fees for “Hold” and x·y = k to isolate IL.

Takeaway: Classic AMMs underperform holding whenever price drifts due to sublinearity of the value function. YieldBasis matches BTC exactly and still earns fees.


What Happens When BTC Price Changes?

YieldBasis auto‑keeps the position at 2× leverage (50% debt / 50% equity). A dedicated Rebalancing-AMM + VirtualPool makes it profitable for arbitrageurs to fix the ratio in one atomic swap.

📈 BTC goes up (debt too low)

  1. Debt ratio below target: LP value rises, debt stays fixed -> debt/value < 50%.
  2. Profitable quote: The Rebalancing-AMM prices swaps so bringing crvUSD in (to mint more LP) is slightly profitable.
  3. Single swap: An arbitrageur trades via the VirtualPool. Internally, the contract flash‑borrows crvUSD, mints extra LP, mints the missing debt (Δd)(\Delta d) from the YB CDP, repays the flash loan, and pays the arb.
  4. Back to 2×: Debt increases to the new 50% target.

📉 BTC goes down (debt too high)

  1. Debt ratio above target: LP value falls, debt stays fixed -> debt/value > 50%.
  2. Profitable quote: The AMM now makes it attractive to bring crvUSD and pull LP out so debt can be repaid.
  3. Single swap: The arbitrageur trades; the contract removes a slice of LP, withdraws balanced liquidity, repays the excess debt (Δd)(|\Delta d|) to the YB CDP, settles any flash borrow, and returns profit.
  4. Back to 2×: Debt drops to 50% of LP value.

Result: Position values always track BTC 1:1 (no IL), while Curve swaps continue generating fees.

Under the hood: Arbitrageurs only execute one swap. Inside that same transaction, the VirtualPool flash‑borrows, mints/burns Curve LP, and mints/repays crvUSD debt in the Rebalancing‑AMM, then settles everything and pays the arb.

See Advanced Concepts & Economics -> Rebalancing Flow and the Math Primer for the full mechanics (oracle math, invariants, flash‑loan sizing).


Using YieldBasis: User Flow

How YieldBasis worksHow YieldBasis works
  1. Deposit BTC
    Users deposit BTC and receive ybBTC (receipt token).

  2. Protocol pairs with crvUSD
    YieldBasis borrows an equal USD value of crvUSD and adds both assets to the Curve BTC/crvUSD pool.

  3. LP token as collateral
    The Curve LP token backs the crvUSD debt. The system maintains 2× leverage (50% debt / 50% equity) automatically.

  4. Hands‑off rebalancing
    When BTC moves, arbitrageurs rebalance via the Rebalancing‑AMM + VirtualPool. Positions keep tracking BTC 1:1 and keep earning fees.

  5. Exit whenever
    Burn ybBTC to withdraw BTC (and any accumulated yield) — the contract unwinds debt and LP behind the scenes.