Skip to main content

How YieldBasis works

YieldBasis turns a single-sided BTC or ETH deposit (WBTC, cbBTC, tBTC, or WETH) into a 2× leveraged Curve liquidity position. By keeping leverage anchored at 2× through automatic arbitrage rebalancing, a yb-LP share earns trading fees and keeps full price exposure to BTC or ETH, up and down.

A 1 BTC example: why normal pools fall behind​

Suppose BTC trades at $100,000, and you start with 1 BTC plus $100,000 in cash ($200,000 total). Now suppose BTC rises 50% to $150,000:

  • Hold 1 BTC + $100,000 cash: Your 1 BTC is now worth $150,000, so your total portfolio is $250,000.
  • Standard 50/50 liquidity pool: The pool holds a passive constant-product curve (x⋅y=kx \cdot y = k). As BTC climbs to $150,000, arbitrageurs buy underpriced BTC out of the pool until its quote matches the market, leaving you with less BTC and more stablecoins. Your pool share is worth $244,949—2.02% behind holding—the moment price settles at $150,000, even if no other trades occur.
  • YieldBasis: You deposit only your 1 BTC and keep your $100,000 cash untouched. Behind the scenes, YieldBasis borrows $100,000 of crvUSD from a dedicated credit line, pairs it with your 1 BTC in a Curve pool, and automatically rebalances that 2× position as BTC moves. Before trading fees and rebalancing costs, your YieldBasis position grows to $150,000—matching 1 BTC 1:1—so your total portfolio is $250,000 plus trading fees.

The same math holds when BTC falls: your YieldBasis position moves 1:1 with BTC down as well as up.

Illustrative comparison across four BTC prices​

Starting with 1 cbBTC and $100,000 in cash at a $100,000 BTC entry price, before trading fees, borrow interest, and rebalancing costs:

BTC moveHold 1 cbBTC + $100,000Plain 50/50 LPDivergence vs. holdYieldBasis 1 cbBTC + $100,000 cash (before costs)
−50% (BTC = $50,000)$150,000$141,421−5.72%$150,000 + fees
0% (BTC = $100,000)$200,000$200,0000.00%$200,000 + fees
+50% (BTC = $150,000)$250,000$244,949−2.02%$250,000 + fees
+100% (BTC = $200,000)$300,000$282,843−5.72%$300,000 + fees

Subtract borrow interest and rebalancing costs from the + fees term. During low-volume or strongly trending periods, net return after costs can turn negative.

PropertyStandard 50/50 LPYieldBasis yb-LP
Price exposureTrails holding when price moves up or downMoves 1:1 with BTC or ETH (before fees and costs)
Capital you supplyBoth BTC/ETH and a stablecoinBTC or ETH only (protocol borrows matching crvUSD)
Leverage1× (unleveraged)2× compounding target
RebalancingPassive curve; arbitrageurs shift your BTC/USD reserve mix as price movesArbitrageurs continuously adjust crvUSD debt to keep leverage anchored at 2×
Under the hood: why passive AMMs lag holding, and why 2× leverage needs concentrated liquidity

Why no passive AMM curve avoids the p\sqrt{p} drag: In any passive, unleveraged AMM without external price feeds, arbitrageurs trade against the pool's invariant until the pool's quote matches the market. By convex analysis, the pool's portfolio value V(p)V(p) must be concave (V′′(p)≤0V''(p) \le 0) for prices to stay stable. If V(p)V(p) were flat (V′′(p)=0V''(p) = 0), the pool would never trade; if V(p)V(p) were convex (V′′(p)>0V''(p) > 0), any tiny price move would let arbitrageurs drain 100% of one reserve. Because V(p)V(p) is concave, a standard constant-product pool (xy = k) scales as 2k⋅p2\sqrt{k \cdot p} and immediately trails holding (pp) whenever price moves away from entry—even if no further trades occur.

How YieldBasis sidesteps this limit: YieldBasis steps outside passive unleveraged AMMs by pairing the LP position with continuous 2× compounding leverage (LEVERAGE = 2 * 10**18 in AMM / LEVAMM), squaring the curve back to linear exposure:

(p)2=p(\sqrt{p})^2 = p

Why concentrated liquidity is required: Keeping leverage fixed at 2× requires borrowing more crvUSD as price rises and repaying crvUSD as price falls. In choppy markets, this creates an ongoing rebalancing cost (similar to leveraged-ETF volatility decay). On a plain xy = k pool, that rebalancing cost consumes nearly all doubled trading fees. YieldBasis pairs LEVAMM with Curve Cryptoswap's concentrated liquidity so trading fees per unit of capital can out-earn rebalancing costs. For the full derivation and the difference between static divergence loss and Loss-Versus-Rebalancing (LVR), read Math and economics.

What happens when you deposit and withdraw​

When you deposit BTC or ETH, the market borrows matching crvUSD, supplies both into a Curve pool, holds the Curve LP tokens as collateral, and mints yb-LP shares to your wallet.

Deposit flow: you deposit 1 cbBTC, the YieldBasis market vault (LT) draws matching crvUSD from its credit line, both enter the Curve pool, LEVAMM holds the LP tokens as collateral against the crvUSD debt, and you receive yb-cbBTC shares.Deposit flow: you deposit 1 cbBTC, the YieldBasis market vault (LT) draws matching crvUSD from its credit line, both enter the Curve pool, LEVAMM holds the LP tokens as collateral against the crvUSD debt, and you receive yb-cbBTC shares.

Deposit​

  1. You send your BTC or ETH (for example, 1 cbBTC) to the market.
  2. The market borrows matching crvUSD from its credit line and adds both assets into the Curve pool.
  3. The market locks the resulting Curve LP tokens as collateral against the crvUSD loan and mints yb-LP shares to your wallet.

Existing holders keep any Curve deposit imbalance fees and absorb any small internal price adjustment triggered by your deposit.

Withdraw​

  1. Start with unstaked yb-LP shares in your wallet. (If your shares are staked, unstake them first.)
  2. The market burns your shares and removes your proportional slice of Curve LP collateral and crvUSD debt.
  3. The market unwinds the Curve LP tokens to repay the crvUSD loan and sends the remaining BTC or ETH to your wallet.

Because withdrawing unwinds against live Curve pool reserves, the exact amount you receive (Redemption Value) can differ from book value (Fundamental Value). Check TRD and pricing before exiting.

Under the hood: deposit and withdraw contract calls

Each YieldBasis market pairs a vault contract (LT), a leveraged AMM (LEVAMM), and a Curve Cryptoswap pool:

  • Deposit (LT.deposit(assets, debt, min_shares, receiver)): LT draws debt crvUSD from LEVAMM's credit line, adds [debt, assets] to the Curve pool, sends the minted LP tokens to LEVAMM, verifies that total vault equity stays within half of AMM.max_debt() (leaving headroom for debt expansion when prices rise), and mints yb-LP shares priced at LT.pricePerShare(). On a pool running YBOraclizedPolicy, the policy also verifies that added debt matches LEVAMM's existing debt-to-collateral ratio within ratio_tolerance(), reverting with LT deviation if it does not.
  • Withdraw (LT.withdraw(shares, min_assets, receiver)): LT burns unstaked yb-LP shares, removes pro-rata collateral and debt from LEVAMM, unwinds Curve LP tokens to repay the debt, and sends the remaining volatile asset to receiver. Preview live output via LT.preview_withdraw(shares).

How YieldBasis keeps leverage at 2× automatically​

A static 2× loan drifts the moment BTC or ETH moves. If BTC rises, collateral value grows while debt stays fixed, so leverage drops below 2×. If BTC falls, collateral shrinks while debt stays fixed, so leverage rises above 2×.

YieldBasis corrects this drift automatically without manual action from you:

  1. Price tracking: The market reads an internal valuation of its Curve LP collateral.
  2. Automatic rebalancing quotes: Whenever leverage drifts away from 2×, the market quotes a small discount or premium to external arbitrageurs.
  3. Arbitrage restores 2×: Arbitrageurs trade against the market to capture that spread. Every profitable arbitrage trade adds or repays crvUSD debt in the exact direction that pulls leverage back to 2×.
BTC/ETH spot price and crvUSD peg feed Curve pool price_scale and YieldBasis market accounting, producing Fundamental Value at price_scale and spot-unwind Live Redemption Value.BTC/ETH spot price and crvUSD peg feed Curve pool price_scale and YieldBasis market accounting, producing Fundamental Value at price_scale and spot-unwind Live Redemption Value.

Because collateral and debt are pooled at the market level, you have no individual liquidation price. Instead, all depositors share pooled solvency risk, protected by an onchain safe debt band that blocks unsafe deposits or swaps.

Ongoing costs of maintaining 2× leverage​

Keeping leverage at 2× involves two ongoing costs:

  • Rebalancing cost: Arbitrageurs earn a small spread on each rebalance. Over many price swings, those spreads accumulate as rebalancing cost.
  • Borrow interest (refueling): The market accrues interest on its borrowed crvUSD, then collects and donates that interest back into the Curve pool (refueling) to subsidize pool recentering and offset part of the rebalancing cost.

When cumulative rebalancing costs after refueling exceed trading-fee income, share value grows slowly or declines (PPS drag).

Under the hood: LEVAMM oracle, safe debt band, and refueling
  • LP valuation: LEVAMM reads CryptopoolLPOracle, which prices the Curve LP token from the Curve pool's price_scale, its virtual_price, and the crvUSD/USD aggregator price. LEVAMM's invariant quotes the exact oracle price only at 2× leverage (debt = 50% of collateral value). Arbitrageurs typically trade against LEVAMM via VirtualPool.
  • Safe debt band: LEVAMM enforces a safe debt ratio between 6.25% (1/16) and 53.125% (17/32) of collateral value at the oracle price (equilibrium is 50%):
    • Deposits revert (Unsafe min or Unsafe max) if the resulting debt ratio falls outside the safe band.
    • Swaps against LEVAMM that end outside the safe band revert unless the trade moves the ratio closer to 2× equilibrium.
    • Withdrawals remove proportional collateral and debt, so the safe band does not block LT.withdraw.
  • Refueling: Calling LT.distribute_borrower_fees() collects accrued crvUSD borrow interest from LEVAMM and donates it into the Curve Cryptoswap pool. When rebalancing costs after refueling exceed trading-fee income, LT.pricePerShare() grows slowly or declines.

Market states​

Every YieldBasis market runs in one of three operational states:

Market stateWhat it means for youDepositsStandard withdrawEmergency withdrawStaking / unstaking
Normal (live)Market is healthy and activeOpen (up to capacity cap)OpenOpen for unstaked sharesOpen
Shutting down or oracle-degradedGovernance is winding down capacity, or the price oracle is temporarily unavailableBlockedOpen if oracle worksOpen for unstaked sharesOpen if oracle works
KilledGovernance permanently paused the market for safe exitBlockedBlocked (use emergency withdraw)Open for unstaked sharesUnstaking works
Exiting a killed or oracle-degraded market

Emergency withdrawal operates only on unstaked yb-LP shares. If your shares are staked and the market's value oracle stops responding while the market is not killed, unstaking reverts until either the oracle recovers or governance kills the market.

In a killed market, emergency withdrawal unwinds Curve LP collateral via a balanced removal (returning both volatile asset and crvUSD to settle debt) without relying on the value oracle.

Under the hood: market-state contract conditions

Market state is determined by AMM.max_debt(), AMM.value_oracle(), and AMM.is_killed():

  • Normal (live): is_killed() == False and AMM.value_oracle() succeeds. Deposits are open up to max_debt() // 2 vault equity. LT.emergency_withdraw() is callable by owner for unstaked shares.
  • Shutting down / oracle-degraded: Governance lowers max_debt() (deposits revert with Debt too high), or AMM.value_oracle() reverts while is_killed() == False (standard withdraw, staking, and unstaking revert; LT.emergency_withdraw() remains open for owner, or emergency_admin with receiver == owner if the oracle reverts).
  • Killed: Factory.admin() or Factory.emergency_admin() calls LT.set_killed(True). Deposits and standard LT.withdraw() revert (We're dead. Use emergency_withdraw). LT.emergency_withdraw() skips AMM.value_oracle(), and unstaking from LiquidityGauge works without staker rebase.

Next steps​