Pool creation
create_pool takes token IDs, fee, Q128.128 initial square-root price, spacing, and initial tick. It sorts the token IDs, returns the pool key and signer, and initializes the pool through its finalizer.
Position creation
mint takes a private nonce, two token records, a private owner recipient, a private immutable withdrawal address, a public MintPositionRequest, public token IDs, and three pairs of freezelist non-inclusion proofs. It returns a public token ID, a PositionNFT, two change records, a MintComplianceRecord, and a finalizer.
Position management
increase_liquidity consumes a PositionNFT and two token records. It returns a replacement NFT and two change records.
rebalance_position consumes the complete old position through the rebalance router. It creates a replacement with a new range and token ID.
The replacement keeps the pool and withdrawal address. The signer owns the new NFT, and the transaction emits another MintComplianceRecord.
decrease_liquidity consumes a PositionNFT. Principal becomes public tokens_owed accounting until collect.
collect consumes a PositionNFT, validates non-inclusion proofs for its owner and immutable withdrawal address, and sends two token records to that withdrawal address. The caller cannot select a new payout recipient.
burn requires zero liquidity, zero owed balances, and no active freeze. It removes the public position and consumes the NFT.
Trading
swap performs one pool swap. swap_multi_hop performs two or three connected pool swaps. Both use a fresh factor and public confidential address, create an investigator-owned compliance record, and write the same SwapOutput shape.
claim_swap_output settles both swap paths. It validates freezelist non-inclusion for the signer, sends the output and any remaining original input to encrypted token records, and removes the pending mapping entry.
Wrapped assets
Useshield_swap_router.aleo when a swap input, output, or refund crosses a wrapper boundary. Use shield_swap_lp_router.aleo for other wrapped LP actions.
Use shield_swap_rebalance_router.aleo for every Rebalance action. Read the deployment asset registry before you select a core or router function.
See Entry-point signatures for the current function inventory.