Architecture
What both pools are built out of.
The two shapes differ in how many claims a pool divides into. Everything below is shared, or is the same mechanism specialised.
- Contracts — six core contracts, no factory: two singletons, a router and a lens each — and the F-pool policies with their registry. Market identity, the ERC-6909 id space, and the size budget that shapes the external surface.
- State and the ladder — log price as the working coordinate, the tick bitmap and its pointer, one signed ladder carrying caps, and why the reserve shadows survived.
- Fee machinery — the C-pool accumulator, the mint fee, the dynamic variance kernel and its bounds.
- Settlement — one flash-accounting lock spanning every market, token claims, and why this replaces re-entrancy guards.
- Numerics and verification — solvency as a derivation, guardrails, and what is actually proven.
The one constraint that shapes everything
ManagerF runs a few hundred bytes under the EIP-170 limit, ManagerC a few kilobytes; the routers and the lenses have room to spare (decision 096). The size budget
is the binding constraint, and it is why the external surface is lean: conveniences that compose
from primitives live in the router, and derivations recomputable from public state live in the lens.
When the next fix does not fit, that is the order to evict in — never the accounting.