Providing liquidity

Description of liquidity providing on WAGMI

Introduction

The central concept of WAGMI is focused liquidity, where liquidity is assigned within a specific price range. In traditional AMM exchanges, liquidity is spread evenly across the price curve from 0 to infinity. The uniform distribution allowed for trading across the entire price range (0, ∞) without liquidity loss. However, in numerous pools, a large portion of the liquidity remained unused.

Take stablecoin pairs, for instance, where the relative price of the two assets remains fairly stable. The liquidity outside a stablecoin pair's typical price range is seldom used. In the v2 DAI/USDC pair, approximately 0.50% of the total available capital is utilized for trading between $0.99 and $1.01, the price range where LPs expect the highest volume and, subsequently, the most fees.

WAGMI enables liquidity providers to concentrate their capital in narrower price ranges than (0, ∞). In a stablecoin/stablecoin pair, for example, an LP can allocate capital only to the 0.99 - 1.01 range. As a result, traders benefit from increased liquidity around the mid-price, and LPs earn more trading fees with their capital. We refer to liquidity concentrated within a limited range as a position. LPs can have multiple positions per pool, creating customized price curves that reflect each LP's preferences.

Active Liquidity​

When an asset's price rises or falls, it may go beyond the price limits that LPs have established in a position. If the price exits a position's range, the position's liquidity becomes inactive and stops earning fees. As the price moves in one direction, LPs accumulate more of one asset while swappers demand the other, until the liquidity is entirely made up of a single asset. (In v2, this behavior is rare because LPs infrequently reach the upper or lower price bound of two assets, i.e., 0 and ∞). If the price reenters the range, the liquidity is reactivated, and in-range LPs resume earning fees.

Notably, LPs can create as many positions as they want, each with its own price range. Concentrated liquidity serves as a tool that allows the market to determine a reasonable distribution of liquidity, as rational LPs are motivated to focus their liquidity while ensuring that it remains active.

To implement concentrated liquidity, the previously continuous price space spectrum has been divided using ticks. Ticks represent the borders between discrete areas in price space. They are spaced so that a 1-tick increase or decrease signifies a 0.01% change in price at any point in the price space.

Ticks serve as boundaries for liquidity positions. When creating a position, the provider must select the lower and upper tick to represent their position's limits. As the spot price varies during swapping, the pool contract continuously exchanges the outgoing asset for the incoming one, progressively utilizing all available liquidity within the current tick interval1 until the next tick is reached. At this point, the contract transitions to a new tick and activates any inactive liquidity within a position that has a boundary at the newly active tick.

Although each pool has the same number of underlying ticks, only a fraction of them can function as active ticks in practice. Due to the nature of the v3 smart contracts, tick spacing is directly related to the swap fee. Lower fee tiers permit closer potentially active ticks, while higher fees allow for a relatively broader spacing of potential active ticks.

Inactive ticks do not affect transaction costs during swaps, but crossing an active tick does increase the cost of the transaction in which it is crossed, as the tick crossing activates the liquidity within any new positions using that tick as a border.

In areas where capital efficiency is crucial, such as stablecoin pairs, narrower tick spacing enhances the granularity of liquidity provisioning and is likely to reduce price impact when swapping. This results in significantly improved prices for stablecoin swaps, where capital efficiency is of the utmost importance. By utilizing concentrated liquidity and ticks, WAGMI allows liquidity providers to optimize their capital allocation and earn more fees, while traders benefit from deeper liquidity and better pricing in their transactions.

Last updated