Public mappings
The program exposes the following public mappings.Market state
pools stores:
- Sorted token program identifiers
- Fee tier
- Enabled state
- Wrapper and underlying token relationships
slots stores:
- Current tick
- Tick spacing
- Current square-root price
- Protocol-fee setting
- Active liquidity
- Global fee growth for both tokens
- Maximum liquidity per tick
- Accrued protocol fees
- Nearest initialized ticks above and below
ticks stores, for each initialized boundary:
- Pool identifier
- Net and gross liquidity
- Tick index
- Fee growth outside the tick
- Previous and next initialized ticks
initialized_pools, tick_spacings, fee_tiers, and fee_to_tick_spacing expose pool and configuration availability.
Position state
positions stores a public row keyed by token_id. The row contains:
- Pool
- Lower and upper ticks
- Liquidity
- Last fee-growth checkpoints
- Owed amounts for both tokens
PositionNFT. The token ID still gives observers a stable pseudonymous handle for the position.
Mint, increase, and decrease return the token ID as a public output. Burn also returns the token ID and removes the position row. A public observer can therefore follow a position’s economic lifecycle without learning the record owner directly from this program.
Pending swap state
swap_outputs stores a public SwapOutput until claim. It includes:
- Public confidential recipient address
- Public confidential caller address
- Input and output token identifiers
- Exact output amount
- Exact unspent input amount
- Up to two additional input-token and remainder slots for multi-hop execution
Control state
The public control mappings expose:- Current and pending admin
- Used confidential addresses through
used_blinded_addresses - Registered token decimals
- Whether pool creation is open
- Global pause state
- Token eligibility for pool creation
- Token pause state
- Pair pause state
- Position freeze state and its current stored block height
pending_admin, swap_outputs, positions, and frozen_position entries can be removed.
Public inputs by operation
Pool creation
create_pool takes public token IDs, fee, initial square-root price, tick spacing, and initial tick. It returns the pool key and self.signer as public outputs.
Pool creation is not a confidential participant path. The return value explicitly exposes the creator’s signer address.
Mint
The fullMintPositionRequest is public:
- Pool
- Tick range
- Desired token amounts
- Minimum token amounts
- Tick insertion hints
Increase liquidity
The following are public:- Desired token amounts
- Minimum token amounts
- Token program identifiers
- Tick insertion hints
- Returned token ID
PositionNFT and token change records are encrypted to their owners. Public position, tick, and slot state changes reveal the economic effect.
Decrease liquidity
The token ID, liquidity removed, and minimum amounts are public. Principal and accrued fees are credited into the publictokens_owed fields. No token transfer occurs until collect.
Collect
Requested amounts and token identifiers are public. The recipient is a private input, and payout records are encrypted. The position mapping shows the reduction in owed amounts.Burn
The token ID is public. The signer address is not returned in the public outputs. The removal of the position mapping entry is public.Single-hop swap
The public inputs include:- Confidential address
- Pool
- Direction
- Input amount
- Minimum output
- Square-root price limit
- Nonce
- Deadline
- Both pool token identifiers
swap_outputs and updates public pool and tick state.
Multi-hop swap
The public inputs include:- Confidential address
- Endpoint token identifiers
- Input amount and minimum output
- Two or three pool identifiers
- Direction and square-root price limit for every hop
- Hop count
- Nonce and deadline
Claims
Claims keep the blinding factor private but take the following values publicly:- Confidential address
- Swap ID
- Output and refund token identifiers
- Exact output and refund amounts
Market-data consequences
Public state supports:- Deterministic quote simulation
- Independent fee and liquidity accounting
- Route validation
- Market surveillance based on amounts and price movement
- Public verification of pause and freeze controls
- Reconciliation of protocol fees
Current state is not complete history
Mappings are mutable state, not immutable event tables.swap_outputsis removed after claim.positionsis removed after burn.pending_adminis removed after acceptance.frozen_positionis removed on unfreeze.