Comment on page

Concentrated Liquidity

The core innovation of Seil is to allow concentrated liquidity, where users can add their liquidity within user-defined price ranges. In AMM protocols, which are used by most popular decentralised exchanges today, liquidity is distributed uniformly along the entire price curve (0, ∞).
The current AMM liquidity distribution makes trading available across the entire price interval between 0 and infinity in a simple deployment. However, in AMM pools, a significant portion of the liquidity has never been used by actual transactions, which to some extent represents a waste of the liquidity provided.
For example, the trading price of a stablecoin pair is usually constant. The liquidity outside the regular price range is rarely touched. In most mainstream stablecoin trading pools (AMM-based), less than 1% of their total liquidity is actually used. The rest of the available liquidity sits idle in the pools all the time.
It's reasonable for an LP to expect that the liquidity it provides is used as much as possible, so that it can earn more fees from it. This can be achieved through concentrated liquidity. Liquidity providers are able to concentrate their liquidity into their specified price ranges according to the most active price intervals of a particular trading pair. For example, an LP may choose to put all of its liquidity into the price range (0.995, 1.005) of a stablecoin trading pool. As trading is most active around the mid-price, these LPs can maximise their liquidity efficiency and earn higher fees for participating.
Liquidity concentration changes the price interval of a user's liquidity from infinite to finite. The liquidity that is concentrated into a finite price interval can be referred to as a position or liquidity position. An LP can create multiple positions in the same pool. By setting different price ranges, LPs can simulate different price curves to achieve their individual strategies.
Active liquidity
Because a user can set a finite price range for a position, if the asset price moves up and down in a volatile market period, the price may move out of the price range set for the position. In this case, the liquidity in that particular position will be inactive and will stop earning fees until the price re-enters the position's price range.
If the price of a pair rises or falls in one direction, liquidity providers will earn more of one token in their positions because it shows more demand for the other token from swappers. When the price reaches the upper or lower limit of their positions, all of their liquidity will consist of only one asset.
When the price re-enters the range, the liquidity within the position will be active and start earning fees again. The liquidity composition for an active position will be two tokens instead of one asset type.
LPs have very high flexibility in concentrated liquidity. They can open as many liquidity positions as they want and need with their custom price bands. The underlying algorithm of Concentrated Liquidity provides the mechanism that allows the actual market to decide the distribution of liquidity, as most liquidity providers will naturally concentrate their liquidity in the most active price bands according to market trends in order to earn more transaction fees.
Price ticks
In an AMM model, the price is continuous, while in a concentrated liquidity protocol it is somehow different. Prices in concentrated liquidity positions are discrete. The concentrated liquidity price curve is divided by a number of ticks. There is a discrete space between each tick and the tick next to it. If we move up and down by one tick, it will show a 0.01% increase or decrease (1 basis point) in price at any point in the price space.
We use ticks as the limit for each liquidity position. When a liquidity position is opened, it comes with an upper and lower price tick set by liquidity providers.
As the price continues to change as new swaps are executed, the smart contract tends to consume all the liquidity available in the current tick interval until the next price tick is reached, continuously exchanging the outgoing asset for the incoming. When a new price tick is reached, the pool contract immediately switches to the new tick and any dormant liquidity within the newly active tick intervals is activated.
Although each trading pool has the same number of price ticks in a concentrated liquidity protocol, in actual scenarios only a fraction of them will serve as active ticks. There is a certain correlation between the tick spacing and the swap fee tier in a concentrated liquidity smart contract. The lower the fee tier is set, the closer the two nearby active ticks can be. In other words, a higher fee tier can give the pool a wider tick space of potential active price ticks.
For trading pairs that require greater price granularity, such as stablecoin pairs, a relatively narrow tick space will be helpful. The price impact of swapping will be more moderate with the tighter tick spacing, which is exactly what a stablecoin pool needs.