Concentrated Liquidity AMM
Tick-based concentrated liquidity AMM with per-position price ranges, four fee tiers, and a native in-consensus precompile
Abstract
The concentrated liquidity AMM lets LPs allocate capital to a specific price range rather than the full (0, infinity) range of a constant-product pool (LP-9200). A position providing liquidity between prices $p_a$ and $p_b$ achieves up to 4000x capital efficiency compared to constant product for the same depth at the current price. The pool discretizes price into ticks, each representing a 0.01% price increment. LP-9000 §AMM Pools states the pool and position interfaces; this LP is the full tick, swap, fee-tier, oracle, and precompile specification behind them.
Motivation
In a constant-product pool most of the capital sits at prices that will never trade. Concentration is the direct fix: give the LP a range, charge fees only while the price is inside it, and the same depth at the mid costs orders of magnitude less capital. The cost is that liquidity becomes non-fungible — every position has its own bounds — which is why positions are NFTs rather than ERC-20 shares.
Specification
Tick System
Prices are discretized into ticks. Each tick i maps to price p(i) = 1.0001^i:
- Tick spacing: configurable per pool (1, 10, 60, or 200 ticks)
- Tick range: -887272 to +887272 (covers prices from ~1e-38 to ~1e38)
- Current tick: the tick corresponding to the current pool price
Positions
An LP position specifies a range [tickLower, tickUpper]:
struct Position {
uint128 liquidity; // concentrated liquidity units
int24 tickLower; // lower bound tick
int24 tickUpper; // upper bound tick
uint256 feeGrowthInside0; // accumulated fees, token0
uint256 feeGrowthInside1; // accumulated fees, token1
}
Liquidity is only active when the current tick is within the position's range.
Swap Mechanics
A swap moves the price across ticks:
- Compute how much of the input can be consumed at the current tick's liquidity
- If the input is exhausted, return the output
- If not, cross to the next initialized tick, update active liquidity, repeat
Each tick crossing adds/removes liquidity from positions whose boundaries align with that tick.
Fee Tiers
| Tier | Fee | Tick Spacing | Use Case |
|---|---|---|---|
| Stable | 0.01% | 1 | Stablecoin pairs |
| Low | 0.05% | 10 | Correlated pairs |
| Medium | 0.30% | 60 | Standard pairs |
| High | 1.00% | 200 | Exotic/volatile pairs |
Fees accrue per-tick and are claimable by position owners proportional to their liquidity share within the tick range.
Oracle
Pools store an array of (blockTimestamp, tickCumulative, liquidityCumulative) observations. Up to 65535 observations are stored, enabling TWAP queries over extended periods without external infrastructure.
Non-Fungible Positions
Unlike the fungible ERC-20 LP tokens of LP-9200, positions here are non-fungible (ERC-721) because each position has unique tick bounds. The NonfungiblePositionManager wraps positions as NFTs.
Native Precompile
The pool math is available as a native precompile at 0x90A1 (precompile/v3) — TickMath, SqrtPriceMath, SwapMath, and liquidity accounting run in-consensus as exact big.Int (deterministic, no float, no GPU), ABI-compatible with the SwapRouter / NonfungiblePositionManager so existing SDKs work unchanged. See LP-9015 for the address registry and LP-9061 for measured gas.
Rationale
1.0001 as the tick base makes each tick exactly one basis point of price, so a tick index is directly readable as a price in bps and the log-price arithmetic stays in int24. Tick spacing is per-pool because the cost of a swap grows with the number of initialized ticks it crosses: stable pairs want spacing 1 for precision, exotic pairs want 200 so a large move crosses few ticks.
Security Considerations
- Just-in-time liquidity: LPs can add liquidity for a single block to capture fees and withdraw. This is a feature, not a bug -- it increases competition among LPs.
- Tick crossing gas: swaps crossing many ticks consume proportionally more gas. Pools with sparse liquidity may have expensive swaps.
- Oracle manipulation: TWAP with sufficient observation window (30 minutes+) is resistant to single-block manipulation.
Reference
| Resource | Location |
|---|---|
| Pool contracts | github.com/luxfi/standard/contracts/amm/v3/ |
| Pool | LuxPool.sol |
| Position manager | NonfungiblePositionManager.sol |
| Native precompile | precompile/v3 (0x90A1) |
Related LPs
- LP-9000 — pool and position interfaces in the DEX core
- LP-9200 — constant-product pools
- LP-9202 — pegged-asset curve
- LP-9030 — hooks that gate pools holding security tokens
Copyright
Copyright (C) 2024-2026, Lux Industries Inc. All rights reserved.
Licensed under the MIT License.