Overview
To achieve concentrated liquidity, the continuous spectrum of price space has been partitioned with price bins. Price bins are the boundaries between discrete areas in price space.
What Are Bins?
A bin is a container that holds liquidity at a specific price point within a pool. Think of it like a bucket sitting at one spot on a price ladder.
What can a bin hold?
One token only
Both tokens (only the active bin can hold both)
Empty (no tokens at all)
How swaps work with bins:
Swaps happen inside the active bin, exchanging one token for the other
Once all of one token is converted, the price moves to the next bin
Key benefit: Unlike classic AMMs where every trade moves the price, HODLMM's bin system lets trades execute at a fixed price within the active range
Zero price impact within the active bin
Within a single bin: Price is fixed. Trades execute at that exact price until the bin's liquidity is exhausted. This means zero price impact for trades that stay within the active bin.
β
βAcross multiple bins: When a trade is large enough to exhaust the active bin, it crosses into the next bin at a slightly different price. This creates some price impact β which is expected and normal.
π‘Want to learn more? Read more about Slippage & Price Impact.
What are Bin Steps?
A bin step is simply the difference in price between 2 consecutive bins. The bin step for any given pool is determined by basis points. Think of it like steps on a staircase β each step takes you to a slightly different price level.
How it works:
Bin steps are measured in basis points (1 basis point = 0.01%)
To find the next bin price: multiply the current price by (1 + basis points)
To find the previous bin price: divide instead
Quick examples:
1 bin step = 0.0001 (0.01%) between bins
10 bin step = 0.001 (0.10%) between bins
100 bin step = 0.01 (1%) between bins
Bin Mechanics
Price bins function as boundaries for liquidity positions. When a position is created, the provider must choose the bins that will represent their position's borders.
Bins are spaced such that each bin represents a specific price point. Unlike continuous curves, trades execute at the exact bin price when liquidity is available.
Bin Distribution
The spacing and distribution of bins depends on the selected strategy:
SPOT Strategy: Bins distributed uniformly across the selected range
CURVE Strategy: Bins concentrated near the current price with decreasing density at range edges
BID-ASK Strategy: Bins placed primarily at range boundaries
Custom Bin Layouts
Beyond the three pre-configured strategies, LPs can define custom bin layouts to implement specific market-making strategies. This allows for precise control over liquidity distribution.
Bin State
Each bin maintains:
Total liquidity available
Current price level
Number of active positions
Fee tier applicable
