System at a glance
The current frontend implements these boundaries behind its internal SDK layer. That internal API is application code, not a stable public package contract.
A trade is two transactions
swapconsumes an input token record and updates public AMM state. Finalization writes the output and any unspent input toswap_outputs.claimreads that pending output and returns output and refund token records to the signer.
A position has public economics and confidential ownership
The publicpositions mapping stores the range, liquidity, fee checkpoints, and owed tokens. A PositionNFT record proves authority over that position.
Increase, decrease, and collect consume the current PositionNFT and return a replacement. Burn consumes it permanently. A wallet must reconcile the latest ownership record with the latest public mapping state.
Read Liquidity provider workflow before building position management.
Rebalance a position
Use Rebalance to replace a complete position in one Shield transaction. Use Increase to keep the current range. Use Decrease to reduce liquidity. Rebalance keeps the same pool and withdrawal address. It removes the old position ID and creates a new position ID that the signer owns. The transaction can use recovered position funds and additional wallet funds. Unused wallet funds remain in the wallet. Recovered refunds go to the immutable withdrawal address. The operation is atomic. A failed transaction leaves the old position unchanged. The app requires another review when pool state changes. Read Rebalance a position for the complete app flow.What remains public
Public state exposes:- pool and token identifiers
- prices, ticks, liquidity, and fees
- trade amounts, routes, outputs, refunds, and timing
- position ranges and public accounting
- configuration and control actions