Core Concepts
Discrete Price Bins
In Ferra's DLMM, liquidity is organized into discrete price bins, each representing a specific price level for a token pair, such as SUI/USDC at 2.5, 2.51, 2.52 USDC per SUI, up to 4.1. This approach differs significantly from traditional Automated Market Makers (AMMs) like Uniswap V2, where liquidity is distributed continuously across all prices from 0 to infinity using the constant product formula . This continuous distribution often leads to high slippage for large trades and inefficient capital use, as liquidity is spread thinly across unused price ranges.
Concentrated Liquidity Market Makers (CLMMs), such as Uniswap V3, improve on this by allowing LPs to concentrate liquidity within user-defined price ranges, enhancing capital efficiency. However, within these ranges, the price still changes continuously based on the ratio of reserves, following a piecewise linear function. In contrast, DLMM's discrete bins, inspired by Trader Joe's Liquidity Book, operate at fixed price points, each bin acting as an independent mini-market. This allows LPs to allocate funds precisely, potentially maximizing fee earnings by focusing liquidity where trading activity is expected.
The image below illustrates the distribution of liquidity across price bins for the SUI/USDC pair.

Zero-Slippage Swaps
Zero-slippage swaps are a hallmark of Ferra's DLMM, enabled by the discrete bin structure. Within each bin, trades occur at a fixed price without price impact, as long as the trade size does not exceed the bin's liquidity. This is a significant departure from traditional AMMs, where the price changes continuously with each trade due to the constant product formula, and from CLMMs, where price changes smoothly within tick ranges
In DLMM, each bin operates as a constant sum market maker within its price, meaning trades within the bin maintain a fixed exchange rate. For example, if the active bin for SUI/USDC is at 3.00 USDC per SUI, with 1000 SUI and 3000 USDC, a trader buying 100 SUI pays exactly 300 USDC, experiencing zero slippage, as the price remains 3.00 throughout the trade within the bin's capacity. This is because within a bin, you can add X tokens and take out Y tokens (or vice versa) at the fixed price until one token is depleted, aligning with the constant sum invariant
Mathematically, if a bin has reserves and , and the price is , a trade to buy would cost , as long as . The price remains , ensuring zero slippage. Only when does the trade move to the next bin, say at price , introducing slippage for the remaining amount.
Example Calculation
Consider a SUI/USDC pool with:
Current Bin: Price USDC per SUI, with reserves SUI and USDC
Next Bin: Price USDC per SUI.
Trade: Buy SUI
Step-by-Step Calculation:
First Bin (P = 3.00):
The bin supplies up to SUI.
Cost: USDC.
Remaining: SUI.
Next Bin (P' = 3.01):
Cost: USDC.
Total Cost:
Total: USDC.
Slippage:
Expected cost at : USDC.
Actual cost: USDC.
Slippage: USDC.
Dynamic Fee
Ferra’s DLMM utilizes a dynamic fee mechanism to optimize returns for liquidity providers (LPs). Each swap incurs a total fee that consists of two components:
A fixed base fee, determined by the pool creator.
A variable fee, which increases in response to market volatility.
This dynamic fee structure is designed to reward LPs more during periods of high trading activity, compensating them for the increased risk associated with price fluctuations.
To learn more about how the dynamic fee mechanism works and its technical implementation in Ferra’s DLMM, please refer to the detailed explanation in Ferra's Dynamic Fee session
Liquidity Shapes and Strategies
Ferra’s DLMM on the SUI network revolutionizes liquidity provision by offering LPs flexible liquidity shapes and corresponding strategies to optimize fee earnings and manage risk.
Ferra provides three primary liquidity shapes: Spot, Curve, and Bid-Ask. Each defining how liquidity is distributed across discrete price bins. These shapes align with volatility strategies tailored to different market conditions, from stablecoin pairs to volatile memecoins.
In addition, Ferra supports single-sided liquidity and custom liquidity distributions, making it well-suited for token launches with limited initial liquidity.
Please refer to the Shapes & Strategies section below for more detailed information.
Last updated