Understanding Liquidity Provision

This page explains the fundamental ideas behind liquidity provision in Maverick AMM.

LPs supply liquidity to a pool on Maverick for traders to swap against. In return, they receive trading fees charged to traders for each of their swaps.

Each pool consists of two tokens. In general, an LP supplies quantities of both tokens, although in some cases they may provide only one (sometimes called “single-sided liquidity”) and the actual ratio of the tokens depends on the distribution the LP selects (more on that below!).

An LP’s liquidity is distributed using a series of bins that correspond to different price ranges in a pool. Prices in a pool are a reflection of the ratio between the two tokens in that pool. The widths of the bins vary from pool to pool, and are set by the LP who initially deploys the pool. LPs add liquidity to particular bins in order to execute a particular liquidity strategy.

At any one time, only one bin in a pool is active. This means that swaps are actively occurring at that price point using the liquidity in that bin. As the ratio in the pool changes, the price will move to a new bin, making that the active bin. LPs only collect fees when they own liquidity in the currently active bin.

When a pool is first deployed on Maverick, the deploying LP chooses a fee tier in addition to bin width. The fee tier determines what percentage of the value of their swap a trader will be charged for swapping with the pool.

From an LP perspective, it is possible for multiple pools with different fee tiers and widths to be deployed for the same pair. Traders, however, do not choose between pools: they decide how much they want to swap, and the AMM intelligently routes their swap to the pool which will give them the best value at any given moment. Sometimes this means they will pay a higher fee in return for getting a better price. Ultimately, the market will decide what is the optimal fee tier and width for each token pair.

An LP collects fees based on their pro rata share of the current active bin. Any fees earned are auto-compounded back into the pool, and so the LP’s position in the pool grows proportionally. When an LP exits their position, they redeem their proportional share from the bins in which they are staked.

Pools vs. Positions

Positions are the foundation of Maverick’s uniquely flexible market making, which allows LPs to enjoy greater capital control and maximize their capital efficiency.

When a user deposits liquidity into a Maverick pool, they select from several options to open a specific position in that pool. Between the token pair, fee tier, bin width, liquidity mode, and liquidity distribution, each user’s position can be heavily parameterized and therefore very different from all other liquidity providers on Maverick. Even within the same pool, users might have their liquidity staked at different price points under different liquidity movement modes. All of these variables make up a user’s position in a pool, which is highly customizable and specific to them.

Risks

Before engaging in Liquidity Provision, it is important to familiarize yourself with the risks involved. Outlined below are some of the principal risks that all Maverick LPs should be aware of.

Impermanent Loss

Impermanent Loss or IL is a concept somewhat unique to DeFi, which is perhaps most simply understood as "loss versus holding." It has become a common metric used in estimating the profitability of providing liquidity to AMMs and is a general risk that comes with LPing using any protocol.

When a user provides liquidity to an AMM, they implicitly agree to accept any trades. This means that the balance of assets they supplied to the AMM is likely to change over time. For example, if an LP's initial position consisted of a 50-50 split between USDC and ETH, trading activity is likely to change that ratio.

IL is calculated by comparing the value of an LP's real-time position in the AMM to the value of their initial deposit if they had just held it. If the market value of ETH goes up, it is likely that traders will come to a USDC-ETH pool and buy ETH for USDC, changing the balance of our LP's 50-50 position (e.g., to 60-40 USDC/ETH). At this moment in time, they are subject to loss versus holding (i.e., IL), since a 50-50 position held outside the AMM would have retained more value during the ETH pump.

Of course, this loss is called "impermanent" for a good reason: as assets change in value, it is possible that the value of the LP's position will return to where it started, at which point they will essentially be back to zero loss versus holding. The loss doesn't become real until the LP removes their liquidity from the AMM, at which point any actual net loss versus holding can be calculated.

For more information on IL, see our Maverick 101 blog post.

Permanent Loss

Maverick uses Permanent Loss or PL to describe a kind of risk specific to Mode Both positions. It is different from Impermanent Loss in that it represents a real and immediate loss to LP's reserves, not a theoretical loss pending withdrawal.

PL can occur in Mode Both positions because the LP is agreeing to buy high and sell low as the liquidity is repositioned. If the price in a pool swings back and forth, the LP can end up buying high and then selling back low, thereby leaking value from their liquidity position. For pools with very wide bins, the risk is mitigated because it will take large price swings before PL becomes a factor.

PL is a by-product of Mode Both's high capital efficiency, as the Mode is designed to keep an LP's liquidity as close to price as possible. Mode Both should be used with caution because of the PL risk.

These docs include a detailed explanation of permanent loss.

Unwanted Movement Risk

In a well-functioning pool, there is a substantial amount of static liquidity that facilitates the movement of directional liquidity bins and makes arbitrage straightforward. This protects LPs in movement modes from bad actors who might otherwise try to manipulate the TWAP that governs liquidity movement in Maverick AMM. Simply put, with sufficient static liquidity it is very difficult to exploit the TWAP, as arbitrage should counteract any wild swings in the pool price. This is partly why Maverick requires users always start with static liquidity when deploying a new pool.

If a pool doesn’t have enough static liquidity, this can expose movement mode LPs to unwanted movement risk, which can lead to Permanent or Impermanent Loss. As an example, a malicious user could create a Mode Both Boosted Position in a pool without static liquidity, use incentives to attract users to that Boosted Position, and then manipulate the TWAP to enable them to purchase LPs’ liquidity at a discount. Without arbitrage to counteract this manipulation, they would only have to wait 3 hours for the TWAP to update and then be able to exploit the movement of the Boosted Position’s liquidity. This unwanted movement risk scales with bin width (i.e., the larger the bin width in the pool, the more risk of unwanted movement).

The best way for an LP to protect against this type of risk is to ensure there is sufficient static liquidity in the pool to which you are adding liquidity. So long as arbitrage can operate properly, it will be very difficult for anyone to manipulate the TWAP. The safest way to do this would be to add your own static liquidity to the pool before adding in a movement mode, since only you will be able to remove that static liquidity and you will effectively control your own security in the pool.

Last updated