Skip to main content

Price and tick domain

Pool creation accepts initial_tick >= MIN_TICK and initial_tick < MAX_TICK. A position upper tick can equal MAX_TICK.

Swap execution

After the fixed tick-walk loop, view_bounded_partial can fill only as far as the nearer next initialized tick or price limit. It returns unconsumed input in amount_remaining.

Fees

The pool fee is a u16 count of parts per million. Bootstrap registers 100, 500, 3000, and 10000 and binds them to tick spacings 1, 10, 60, and 200. fee_protocol is zero or an integer from 4 through 10. The protocol share is fee_protocol / 16 of the swap fee. New pools use DEFAULT_FEE_PROTOCOL = 5.

Proof limits

MerkleProof.siblings has 16 fields. MAX_MERKLE_TREE_DEPTH is 15. Mint validates signer, owner recipient, and withdrawal non-inclusion. Collect validates NFT owner and withdrawal. Claim validates the signer.

Integer types

Token amounts, liquidity, owed balances, and protocol fees use u128. Square-root prices and fee growth use u256::U256. Signed liquidity net uses i128. Swap deadlines use Aleo block heights in u32. Swap nonces use u64. Mint nonces use field. The AMM uses native token base units directly. It has no on-chain decimal scale or normalization registry.