Threat boundaries
The program can reject an invalid state transition. It cannot make a compromised client, token program, administrator, or custody process trustworthy.
Protected assets
- Token balances held by the AMM and user records
- Position authority carried by
PositionNFT - Pool price, active liquidity, ticks, fees, and owed-token accounting
- Pending swap output and refund entitlements
- Private blinding factors and record decryption material
- Investigator view-key material and decrypted compliance data
- Admin and upgrade authority
Core accounting invariants
- Pool tokens are sorted, distinct, and bound to the expected token IDs.
- The current square-root price lies in the current tick interval.
- Active liquidity matches the ranges that contain the current tick.
- An initialized tick’s gross and net liquidity reconcile with positions.
- Linked-tick pointers are sorted and reciprocal.
- Swap fees are applied to the liquidity active when earned.
- Position settlement uses modular fee-growth deltas and the correct liquidity epoch.
- A pending swap output can be claimed once and only with exact stored fields.
- A position can be burned only after liquidity and owed balances reach zero.