Part 1
An LP with 2+ years of experience LPing BTC wrappers reached
out to us last week with a problem.
We sat down, did the math, and realized Cube's pool design
solves it almost perfectly.
👇 Here's the breakdown.
—
1) CONTEXT
Cube is live on Solana mainnet. Security review by Serokell completed before launch. Real pools, real liquidity, real swaps happening right now.
This isn't a thesis post. It's a walkthrough of how we already fixed a problem that broke standard pool designs.
—
2) THE PROBLEM
cbBTC, WBTC, xBTC, LBTC — they all represent BTC. But they don't trade equally.
Each wrapper has its own:
- redemption mechanics
- withdrawal delays
- issuer / custody risk
- on-chain liquidity depth
This creates persistent price deviations. A wrapper might consistently trade at 0.995 BTC on the market while standard multi-token pools still price it at 1.000.
The result: free arbitrage. Buy wrapper at 0.995 → deposit into pool → withdraw clean BTC at 1.000. Repeat.
LPs end up on the losing side every time. The pool fills with the discounted asset. Toxic flow extraction.
—
3) WHY EXISTING DESIGNS DON'T FIX THIS
A standard Balancer 50/50 pool with 10 LBTC / 10 BTC will quote a starting spot price of 1.02 (correct).
But for a 0.1 LBTC → BTC swap:
out = 10 * 0.1 / (10 + 0.1) = 0.0990099 BTC
Fair value: 0.1 × 1.02 = 0.102 BTC
Slippage: ~2.93% worse than fair
The pool prices the trade as if both assets were 1:1, ignoring the actual peg. Balancer's weighted formula can't encode the real exchange rate without an external rate oracle.
Curve solves this with stable-swap amplification (A).
At A=1000–5000, Curve gets very close to fair price (~0.10199 BTC for the same swap). But Curve's invariant is rigid — one global A for the entire pool, no per-token control.
—
4) HOW CUBE SOLVES IT
Each token in a Cube pool has TWO configurable parameters:
- individual weight
- virtual balance (leverage)
The swap formula uses virtual balances instead of real ones:
out = vOut * (1 - (vIn / (vIn + amountIn)) ^ (wIn / wOut))
Set per-token leverage so virtual balance ratios encode the fair price directly:
Real: 10 LBTC + 10 BTC
Leverage: 1000 (LBTC) / 1020 (BTC)
Virtual: 10,000 vLBTC / 10,200 vBTC
→ Virtual price = 10200/10000 = 1.02 (fair)
→ Depth: feels like a 10,000 LBTC pool
For 0.1 LBTC → BTC:
out = 10200 * 0.1 / 10000.1 = 0.10199898 BTC
Slippage: ~0.001%
Post #62
52