TGViewer
Coffer Coffer @coffer_so · 308 subscribers
Post #62 52
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%
More from @coffer_so
  1. Sep 21, 2026A pool holding $2,000 can quote as if it held $20,000 🪎 Leverage in Coffer pools is a pri…
  2. Sep 18, 2026Coffer completed 2 audit rounds with Serokell🔒 Serokell has built and audited blockchain…
  3. Sep 16, 2026Every pool now has APY history🔓 24H, 1W, 1M, 1Y or all time, under pool stats. Every spik…
  4. Sep 15, 2026$10,000,000 swapped on Coffer🔓 4 months on mainnet. $1.5M at the start of August, 6.7x si…
  5. Sep 15, 2026XP rates halve tomorrow⏳ Epoch 1 closes at 00:00 UTC. Today a swap pays 10,000 XP per $1 o…
  6. Sep 14, 2026Pools don't have to be 50/50 or just two tokens 🪎 Weighted liquidity pools let you choose…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →