Ambient

Ambient limits are range boundaries that leave liquidity inactive

Ambient limits are the lower and upper price boundaries of a concentrated-liquidity position. Liquidity earns pool fees only while Ambient’s curve price sits inside that band; outside it, the position becomes inactive and its collateral rests in one token. A narrower band concentrates more liquidity around the chosen price, yet reaches inactivity sooner. Returning inside the band reactivates an ordinary concentrated position automatically, while moving the band requires an on-chain repositioning transaction.

The fee cost of an inactive range

An inactive Ambient range earns no concentrated-liquidity fee from swaps outside its boundaries, while moving the range costs network gas and adds a swap fee and price impact when tokens must be exchanged. Ambient concentrated liquidity earns no pool fee while the curve price sits below its lower limit or at or above its upper limit.

Ambient records a pool’s liquidity fee as an unsigned 16-bit integer, in increments of 0.0001 percentage point. That fixed encoding does not fix the active fee rate; the pool policy supplies the rate used for each swap. A repositioning bundle charges that pool fee only on the amount internally swapped. Burning old liquidity and minting replacement liquidity do not create swap notional. Ethereum gas covers the entire transaction, while price impact reflects the swap size against active pool liquidity. Those cost inputs deserve separate estimates.

Outside the band, the position’s new concentrated-fee accrual falls to 0% until price re-enters.

A tighter band therefore has an opportunity cost whenever the market trades elsewhere. Compare the expected in-range time with the gas and exchange needed to reset both endpoints, rather than treating the boundary crossing itself as a protocol charge.


Choosing lower and upper ticks before depositing

Choosing Ambient limits starts with the pool’s displayed price, token order and tick grid, because those three inputs determine valid boundaries and the deposit mix.

In that setup, Ambient sorts the pair by 160-bit token address, placing the lower address on the base side. Native ETH uses the zero address on Ethereum, while ERC-20 assets such as USDC, USDT and DAI retain their contract addresses. A wallet such as MetaMask shows human-readable symbols, but the curve works from this ordered pair. Confirm which token forms the quote before reading "lower" and "upper"; reversing the display inverts the apparent range.

A concentrated position has three identifying coordinates inside a pool: owner, lower tick and upper tick. The pool type index is a 256-bit value that selects parameters including the fee rate and tick size; Ambient’s standard pool type uses index 420. After selecting valid endpoints, the remaining mint inputs are liquidity or a token-denominated quantity, price limits for execution and the settlement route.

How wide should an Ambient range be?

An Ambient range should cover the price movement that the LP intends to service, because width trades capital concentration against the probability of remaining active.

Narrower boundaries support more active liquidity from the same collateral near the selected price. They also convert the position to one token after a smaller market move. Wider boundaries dilute that local concentration but tolerate a larger excursion before fee accrual stops. A correlated pair such as USDC and USDT invites a different range thesis from ETH and USDC because their price behavior differs. The correct comparison is expected fee-producing time against repositioning frequency, not width alone. Volatility, correlation, inventory preference and the cost of active management all feed the width decision directly over time.

Worked example with hypothetical inputs: a 10-tick grid, lower tick −100, upper tick +100, starting tick 0 and later tick +100. The position spans 200 ticks, so its upper-to-lower price ratio equals 1.0001 200 , or about 1.0202. That is roughly 2.02% of multiplicative coverage across the whole band. Tick 0 sits inside it. At tick +100, the upper endpoint is excluded, so the concentrated liquidity becomes inactive. A move back to tick +90 places it inside again.

Width is a monitoring commitment. A range that needs frequent resetting also needs enough activity to justify each reset.


Tick spacing turns prices into valid boundaries

At the other end, Ambient tick spacing restricts both limits to permitted grid points, so a displayed price selection resolves to lower and upper integer ticks before minting.

Across most deployments, Ambient maps tick T to a price factor of 1.0001 T , making one tick a 0.01% multiplicative price step. The contract stores tick indexes as signed 24-bit integers and stores a pool’s tick-size setting as an unsigned 16-bit integer. Both endpoints normally satisfy tick modulo tick size equals zero. Mathematically, 50 ticks span a price factor of about 1.005012, or 0.5012%, although a pool need not use 50-tick spacing.

Protocol governance can revise a pool’s grid size. An existing position on the former grid remains removable, while every new mint must fit the revised spacing. Ambient also has off-grid price improvement for orders that meet token-level collateral and distance thresholds. That facility does not make arbitrary endpoints universal; the configured threshold, off-grid tick count and distance from curve price still control eligibility.

Boundary crossings turn concentrated collateral single-sided

Crossing an Ambient range boundary removes that position’s concentrated liquidity from the active curve and leaves its concentrated collateral represented entirely by one token side.

The curve follows constant-product mathematics with liquidity expressed as the square root of the virtual base and quote reserves. As price crosses a lower or upper tick, Ambient applies the liquidity change stored at that bump point to the pool’s active total. The position stays recorded; only its contribution to executable depth changes. Below one edge the principal rests on one side of the pair, and above the other edge it rests on the opposite side.

Low-level storage adds another limit. Pool liquidity uses an unsigned 128-bit value, while tick-indexed bid and ask totals use unsigned 96-bit lots. One lot equals 1 024 liquidity units. Ordinary resting liquidity uses even lot counts, so its rounding helpers align additions to 2 048-unit increments. These integer rules affect very small raw quantities long before they change the economic meaning of a normal-sized range.


Re-entry resumes activity without a new mint

Re-entering an Ambient range automatically reactivates its concentrated liquidity at the boundary, so the position resumes participating without another mint transaction from the owner. Tick accounting includes the lower bound and excludes the upper bound: activity covers lower tick ≤ price tick < upper tick. A return from above the upper tick to a tick just below it resumes fee participation automatically. The original owner, liquidity amount and two limits remain unchanged.

Repositioning replaces both endpoints in one transaction

Repositioning an Ambient range burns the old liquidity, swaps the required token balance and mints new boundaries within one composed transaction on chain.

The internal swap restores the token ratio required at the destination band. Its amount follows the old position’s single-sided composition, the new lower and upper ticks and the curve price at execution. A maximum-slippage setting constrains the bundle. If execution moves beyond that protection, the whole transaction reverts instead of leaving a partial replacement.

Waiting preserves the original limits and avoids a reset transaction, but concentrated fee accrual stays paused while price remains outside.

The contract interface reserves callpath 2 for simple LP operations. Within that path, code 1 mints concentrated liquidity, code 2 burns it and code 5 harvests accumulated fees; codes 11 and 12 express mints fixed in base or quote quantity. Composed orders can place burn, swap and mint directives together. The owner’s decision is whether the old band still expresses the intended market zone or whether new endpoints now justify the transaction inputs (detailed in Ambient walkthrough ).


Earned fees remain ambient after the range switches off

Alongside that, Ambient sends fees earned by concentrated liquidity into ambient liquidity, so prior rewards follow a different activity path from the range that produced them.

During an in-range swap, the concentrated position receives its pro-rata share of the pool fee based on active liquidity. Ambient assimilates that reward into the curve as ambient liquidity rather than leaving two idle token balances. At pool initialization, 1 ambient seed converts to exactly 1 liquidity unit. Fee growth later changes that seed-to-liquidity relationship. A concentrated position tracks its accumulated share with a 64-bit reward odometer, while the global growth representation uses Q16.48 fixed-point arithmetic with 48 fractional bits. Because ambient rewards stay active across prices, their accounting no longer follows the original two endpoints after accrual.

That distinction matters after a crossing. Previously earned ambient rewards remain active even when the original concentrated principal sits outside its band.

A harvest operation realizes accumulated concentrated rewards without moving the two price limits or reactivating the principal. The Q16.48 representation has 2 −48 growth granularity and a 2 16 cumulative-growth ceiling. Those are accounting bounds, not quoted yields. The next operational choice concerns the inactive principal: leave its limits in place for a return or replace them through repositioning.


Raw price encoding makes token order material

Day to day, Ambient encodes range limits from raw token units and square-root price, so token decimals and base-versus-quote order materially change the human-readable boundary.

On the operational side, Ambient stores the square root of the raw-token exchange rate as a Q64.64 value inside an unsigned 128-bit integer. Token quantities also use signed or unsigned 128-bit integers and do not normalize ERC-20 decimals. USDC uses 6 decimals while DAI uses 18, creating a 10 12 raw-unit difference before display conversion. The lower 160-bit address becomes base and the higher becomes quote. Range selection software must apply both decimal scaling and any requested price inversion before converting visible limits into ticks.

Ambient and knockout liquidity treat endpoints differently

Where it matters, Ambient offers concentrated, ambient and knockout liquidity on one curve, and each form treats a crossed price boundary in a materially different way.

Ordinary concentrated liquidity becomes inactive outside its chosen band and reactivates after re-entry. Native ambient liquidity covers the full price domain from zero toward infinity, so it has no user-selected inactivity boundary. Knockout liquidity acts like a range until price travels completely through its designated edge. The protocol then permanently removes that liquidity from the curve and locks the directional conversion. A later reversal does not restore a fully knocked-out position, although a partly traversed knockout range remains reversible until completion.

These endpoint rules define the decision. Continuous participation points to native ambient liquidity, a reusable price band points to concentrated liquidity and a one-way completed conversion points to knockout liquidity.

CrocSwap’s design explains the range constraints

On a first pass, Ambient inherited its range mathematics from the CrocSwap design, combining Uniswap v3-style concentration with native full-range liquidity inside a single-contract exchange on Ethereum.

Uniswap v3 established the familiar lower-tick and upper-tick model. CrocSwap extended that framework by placing concentrated, ambient and knockout positions on one constant-product curve. Its ambient side resembles the continuous range associated with Uniswap v2 and SushiSwap, while retaining separate accounting for active concentrated liquidity. Ambient stores ordinary concentrated positions as native records keyed by owner and ticks; native ambient positions can also support ERC-20 LP tokens. The lasting boundary trade-off remains mechanical: more concentration inside a smaller interval creates less tolerance for price movement outside it.

Helpful answers about Ambient limits

Does an Ambient position expire after remaining outside its range?

An Ambient concentrated-liquidity position does not expire after price leaves its band. Inactivity creates no timer and leaves the position recorded at its ticks. Its concentrated principal stops contributing to active depth and stops earning new range fees. If price later returns between the lower-inclusive and upper-exclusive ticks, participation resumes automatically. The owner can also burn or reposition it through an on-chain transaction.

When does the minimum holding period block a range withdrawal?

The minimum holding period comes from the pool’s just-in-time (JIT) threshold, not from the range boundaries themselves. Ambient stores that threshold in an 8-bit field measured in 10-second units. A value of 5 therefore means 50 seconds, while zero permits minting and burning in the same block. Increasing liquidity resets the position timestamp. The active pool setting determines when a partial or complete burn becomes valid for that position under the pool’s configured anti-JIT timing rule.

Why can the wallet value change while the range earns no new fees?

An inactive range still changes value because its token composition shifted as the curve travelled through the band. At one outer edge, the concentrated principal is single-sided. Its market value then follows that token, while previously earned ambient rewards remain active separately. The absence of new concentrated fees does not freeze collateral value, erase earlier rewards or restore the original deposit ratio.

Could two Ambient positions share one boundary tick?

Two Ambient concentrated positions can share a lower or upper boundary tick. The protocol aggregates their liquidity change at that bump point, while ownership and the opposite boundary keep each position record distinct. During a crossing, the curve applies the combined active-liquidity change for the shared tick. Fee accounting still follows each position’s own lower-to-upper interval and reward checkpoint, so a shared endpoint does not merge the underlying positions or transfer control between their owners.

Where can removed range collateral settle after a burn?

Removed collateral can settle directly to the owner’s wallet or into surplus collateral held at the Ambient exchange. The settlement choice does not change the old range boundaries or the burn calculation. Ambient represents settlement preferences with an 8-bit flag: 0x1 selects surplus collateral for the base side and 0x2 selects it for the quote side. Unset sides settle through ordinary token transfer.

Last updated