AIMM at a glance: how BTR pools price swaps

Constant-product pools price from a fixed curve and let the trade move the price. BTR pools do the opposite: an external reference price anchors the quote, and the pool’s own state decides how far trading can push it.

The three inputs

  • Mark - the external reference price. A signer quorum attests marks off-chain and pushes them on-chain (the oracle page lets you verify one end-to-end). Past its TTL a feed fails closed: reads revert StaleData and the asset freezes rather than quote off a stale anchor (depeg halt). Same-asset withdrawals are not feed-gated, so a dead keeper cannot trap you in the asset you deposited.
  • Inventory - what the pool actually holds per asset. When inventory drifts from target allocation, the mid skews and spreads widen so flow that restores balance gets the better side.
  • Coverage - reserves divided by liabilities on a leg. 100% means the pool holds exactly what LPs are owed; coverage shortfalls feed straight into pricing, which is how BTR does impermanent-loss protection without a separate insurance fund.

What the quote is made of

Not weighted heuristics: three additive terms in one spread, each charged for a different risk:

termcharges fordriven by
volatilityhow fast the asset movespath sigma, endpoint vega
stalenesshow old the mark isage past grace, per leg
confidencehow sure the feed iseach leg’s reported 1σ interval

Staleness and confidence are summed per leg, so a path pays for every leg’s own risk rather than the worst one. The formula, constants and integer arithmetic are in spread & fees.

Why not just x·y=k

A fixed curve pays arbitrageurs out of LP pockets every time the market moves (LVR). Anchoring to a keeper mark means the pool re-prices before arbitrage arrives, so the spread compensates flow that takes real inventory risk instead of subsidizing flow that takes none.

designprices fromre-prices whenwho pays the move
constant productits own reservessomeone tradesthe LP
concentrated rangea range set by handsomeone trades, inside the rangethe LP
AIMMa signed external markthe mark moves, same blockwhoever takes the stale side

Per-asset oracle modes

  • EXTERNAL (recommended) - any IOracle mark: a signed push feed, Chainlink adapter, Uniswap/vault reader, custom on-chain discovery.
  • INTERNAL - cash-collateral 1.0 peg helper only. Mix allowed; prefer EXTERNAL.

Routing

One pool holds many assets. Each anchors to a correlated parent, not necessarily the base, and a swap prices along the unique tree path between its two endpoints via their lowest common ancestor. Depth is capped at 4, so a path spans at most 9 nodes and 8 legs.

WBTC base

WETH

USDC

stETH

weETH

USDT

DAI

USDe

sUSDe

Two assets sharing a parent trade through that parent: stETH to weETH is two legs via WETH, never touching the base. Everything settles inside the one pool, so there is no cross-pool hop and no aggregator leg. Each leg still charges its own fee floor, so a two-leg path pays both.

Next

Spread & fees carries the formal parameter surface; inventory management shows how drift maps to quote skew.