P be current Q128.128 square-root price. Let A < B be the lower and upper Q128.128 boundaries. Let L be liquidity. Amounts are native token base units.
Amounts from liquidity
Below the range:Liquidity cap
Pool creation calculates a net-liquidity-sum cap from the number of usable ticks and then selects the smaller value againstLIQ_AMOUNT_SAFE_CAP = 702075911466779181339691826086.
Read Slot.max_liquidity_per_tick from chain state. Do not reconstruct it from a legacy Q64 constant.
Mint and increase
The contract transfers the full desired amounts into public AMM custody, calculates the maximum supported liquidity, and then calculates the actual native base-unit amounts used. It creditsdesired - used to the position’s public tokens_owed balances. The returned token change records contain only input-record value above the desired transfer amounts.