Introduction
log(swap) is a risk-aware liquidity primitive for institutional DeFi, built on the log invariant — a relation between reserves whose holdings replicate , so liquidity is flat in log price. The protocol uses this curve in concentrated markets and pools with shared liquidity terms.
In one line: liquidity, commoditized. One number, , sets the depth, the exposure and the variance a position carries at any price above its floor, so liquidity becomes a standard unit that can be sized, priced against the risk it takes, combined and split.
- Predictable market impact. The displayed liquidity determines the price impact exactly, so what you see is what you get: log-price slippage is .
- Explicit liquidity exposure. Liquidity is constant across prices above the floor. Risk is constant in both the dimensions that matter: exposure — delta, — and the LVR risk — gamma, — are equal to , which makes exposure hedgeable and P&L quantifiable.
- Capital efficiency. For the same reserves, displayed liquidity is roughly four times that of the invariant — the same capital, four times the depth.
- Simple liquidity workflows. Positions are fungible and liquidity is algebraic: a portfolio can be combined, split, rebalanced or resized without rebuilding fragmented ranges and positions.
- Institutional infrastructure. At the core, the protocol provides the foundations for compliant liquidity infrastructure: protocol-owned liquidity and private pools with controlled access. SLAs and KPIs are contract-enforced parameters, under the operator's full control, and fee income and realized risk are measured from the same on-chain price path, so the outturn is a subtraction rather than a reconciliation.
- Elegant mathematics. The log invariant makes nominal delta and gamma constant, so a single parameter sets the pool's liquidity exposure — liquidity with no price attached.
The documentation is organised along four axes:
- Concepts — the mathematics, stated precisely. The invariant, the cap, the multi-asset extension, LVR, the swap law, the fee statistic, aggregation.
- Protocol — two pools and their architecture: two managers, a router and a lens each, and how the mathematics is actually implemented.
- Usage — every kind of participant and how each one interacts with the protocol: swapper, resting order, liquidity provider, basket holder, token creator, integrator.
- Products — what the protocol offers: public markets, private pools, protocol-owned liquidity and launchpads.
The primitive in one line
A pool holding base and quote runs the log invariant if
for an exposure in quote units and a floor . Differentiating gives , and substituting back fixes the whole state: , . Read The log invariant for what that buys.
One primitive, two implementations
The protocol provides two pool types. C-pool LPs choose individual floors and caps. F-pool holders share the pool's floor, composition and any generation cap; an F-pool can hold multiple base assets:
| F-pool (fungible) | C-pool (concentrated) | |
|---|---|---|
| the floor | one, shared by every share | one per LP |
| assets | bases, one quote | one base, one quote |
| concentration | none — liquidity is shared | per-LP floor and cap |
| fee accounting | none — the floor is the accumulator | explicit, per class |
| resting orders | — | capped positions, both directions |
| for | capital that wants risk-management guarantees | LPs who want their own range |
See The two pools.