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
StaleDataand 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:
| term | charges for | driven by |
|---|---|---|
| volatility | how fast the asset moves | path sigma, endpoint vega |
| staleness | how old the mark is | age past grace, per leg |
| confidence | how sure the feed is | each 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.
| design | prices from | re-prices when | who pays the move |
|---|---|---|---|
| constant product | its own reserves | someone trades | the LP |
| concentrated range | a range set by hand | someone trades, inside the range | the LP |
| AIMM | a signed external mark | the mark moves, same block | whoever takes the stale side |
Per-asset oracle modes
- EXTERNAL (recommended) - any
IOraclemark: 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.
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.