> ## Documentation Index
> Fetch the complete documentation index at: https://shield.fi/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Public data

> The market, position, transaction, and control information visible through public inputs and mappings.

Public pool mappings let wallets, routers, market makers, and LP tools reconstruct state and verify finalization. Trade size, route, price movement, position range, and timing remain observable.

## 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

The mapping does not contain the LP wallet address. Ownership is carried by the encrypted `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

The claim transition repeats these values as public inputs and removes the mapping entry after successful validation. Removal changes current state, but it does not erase the transaction from chain history.

### 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

An operator that needs a durable administrative history should archive state changes. `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 full `MintPositionRequest` is public:

* Pool
* Tick range
* Desired token amounts
* Minimum token amounts
* Tick insertion hints

The token program identifiers and resulting token ID are also public. The nonce and recipient are private inputs, and the PositionNFT is encrypted.

Finalization publishes the resulting liquidity and owed balances through the position and pool mappings.

### Increase liquidity

The following are public:

* Desired token amounts
* Minimum token amounts
* Token program identifiers
* Tick insertion hints
* Returned token ID

The replacement `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 public `tokens_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

The swap ID is a public output. Finalization exposes the exact output and remainder in `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

The route is public. Each hop's pool-state effect is public. The final output and per-hop remainders are public in the pending output mapping.

### 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

The resulting token records are encrypted to the signer. The public claim still reveals timing and confirms that a particular pending output was consumed.

## 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

It also creates correlation surfaces. A distinctive amount, narrow tick range, unusual route, or closely timed claim may be recognizable even when the wallet address remains confidential.

Market makers should assume competitors can observe executed size and route. Institutions should assume transaction economics are public. Compliance reviewers should treat the encrypted compliance record as an attribution layer over data that is already largely public.

## Current state is not complete history

Mappings are mutable state, not immutable event tables.

* `swap_outputs` is removed after claim.
* `positions` is removed after burn.
* `pending_admin` is removed after acceptance.
* `frozen_position` is removed on unfreeze.

Historical reconstruction requires transaction and state-diff indexing. A live mapping read alone cannot prove when prior values were set or removed.

The freeze block height illustrates the distinction. While a freeze is active, the mapping records the height at which it was set. Unfreeze removes that entry. The chain transaction remains available to an indexer, but the current mapping does not retain a permanent freeze stamp.

## Related pages

* [Confidentiality model](./model)
* [Confidential data](./confidential-data)
* [Confidential addresses](./confidential-addresses)
* [Confidential data limitations](../security/confidential-data-limitations)
