Understanding Modes
This page explains the four Pool Modes available to LPs in Maverick AMM.
Last updated
This page explains the four Pool Modes available to LPs in Maverick AMM.
Last updated
Maverick AMM comes with four out-of-the box liquidity modes for you to choose from:
Each of these modes is designed to facilitate a particular kind of liquidity strategy, with the first three all relying on Maverick AMM’s intelligent liquidity-shifting technology to keep your liquidity active according to certain parameters.
All liquidity-shifting is performed natively by the Maverick AMM smart contract, which means that LPs using a movement mode never pay gas to move their liquidity.
Liquidity is moved based on the Time Weighted Average Price (TWAP) in a pool, which may be different from the current price in a pool. In order to keep things simpler, the explanations below do not make a distinction between TWAP and pool price. If you would like to learn more about how the TWAP works, please refer to the FAQ or the Whitepaper.
Let’s take a closer look at each of the modes in turn.
Mode Right functions as a kind of dynamic range order that follows the price in a pool if and when it moves to the right on the liquidity graph. A movement to the right would correspond to an increase in the price of one of the two assets in the pool (in this case, the "base" asset) as their ratio is changed by trading activity. One would expect this to happen if there was an increased demand for that asset, leading to more people coming to the pool to swap it out for the other asset.
For example, let’s imagine a ABC-XYZ pool, with XYZ being the asset on the right of the liquidity graph (i.e., the "base" asset) and ABC being the asset on the left (i.e., the "quote" asset). In a market where XYZ was performing well, we would expect more traders to be interested in swapping ANC for XYZ. As they visit the pool and make their swaps, the ratio between XYZ and ABC will change, since they will remove XYZ and replace it with ABC. This will cause the price line to move right on the chart, as the AMM accounts for the change in ratio by raising the price of XYZ (i.e., by increasing the amount of ABC required to obtain 1 XYZ).
Mode Right is designed to follow price movement in a single direction, allowing LPs to execute an active liquidity strategy that takes advantage of upward price trajectories. Mode Right allows an LP to add liquidity to the bin directly to the left of the current active bin (they can also add liquidity to the active bin if they want, although this will increase the risk of impermanent loss). If and when the price moves to the right and leaves the current active bin–basically swapping through all of the right asset in that bin–the LP’s liquidity is automatically moved one bin to the right to keep up with the overall movement.
TL;DR - a Mode Right LP uses the left/quote asset to profit from upward price movement of the right/base asset. The Mode Right LP wants to keep a bin of quote asset directly to the left of price as it moves right in the pool, ready to capture fee whenever price dips left again.
For example, let’s return to our ABC-XYZ pool and imagine an LP has opened a Mode Right consisting entirely of ABC, concentrated in the bin to the left of the current active bin. Suppose there is a bull run on XYZ. Traders come to our pool and swap ABC to receive XYZ. Eventually, they will empty the current active bin of all of its XYZ and the price will move right into the next bin, which at this point is composed entirely of XYZ .
In response to this, the AMM reconcentrates all of the LP’s liquidity one bin to the right—into what formerly was the active bin. Since that bin is now completely ABC, it can be freely mixed with the LP's ABC. Now the LP is once more concentrated in the bin to the left of the active bin.
The goal of this strategy is to generate fees for the LP without incurring much impermanent loss. Essentially, an LP uses Mode Right to make a bet on the value of one asset increasing against another. If their bet is correct, they can follow the price to the right and capture fees as it moves.
To be effective, this strategy relies on the fact that price movement is rarely linear. Instead, the price of a token pair experiences a range of micro-adjustments even as it moves in a discernible direction, thanks to the realities of markets and arbitrage. Even if the overall trend is to the right, the price line should frequently dip back to the left due to market corrections or arbitrage opportunities. All of this right-left movement generates trading fees for the LP, and since they are primarily exposed to only one asset in the pair their impermanent loss will be limited.
To continue our example, the LP’s position has now been reconcentrated into the bin to the immediate left of the current active bin. Although the price is trending to the right, the realities of arbitrage mean that we can expect traders will continue to sell XYZ to the pool any time its price moves out of step with the broader market. Any incoming XYZ will need to be swapped for ABC, which will be supplied from the LP’s bin, thus generating fees. The new XYZ in the LP’s bin will be the first to be sold back to traders, creating more fees for the LP.
It should be emphasized that Mode Right is not a guaranteed return: it is merely a tool designed to automate a particular active liquidity strategy for LPs. LPs should do their own research and will ultimately make their own decision about how the market will move. But an LP with good reason to feel bullish about a particular token can use this mode to generate fees without needing to monitor their liquidity position actively.
It is important to note that Mode Right only follows the price in one direction. Should market trends cause the price in the pool to move to the left instead, the AMM will leave the LP’s bins where they are. This could cause the LP to be swapped completely for the under-performing asset (i.e., the asset on the right/the quote asset) and expose them to impermanent loss.
Mode Left functions as a kind of dynamic range order that follows the price in a pool if and when it moves to the left on the liquidity graph. A movement to the left would correspond to an decrease in the price of one of the two assets in the pool (in this case, the "base" asset) as their ratio is changed by trading activity. One would expect this to happen if there was an decreased demand for that asset, leading to more people coming to the pool to swap it out for the other asset.
Mode Left essentially functions like Mode Right but in reverse: an LP can add liquidity to the bin immediately to the right of the current active bin (and also the active bin, if they are comfortable with the increased risk of impermanent loss). This is useful if they expect the right (or "base") asset to decrease in value compared to the left (or "quote") asset, resulting in a general trend to the left. If they are correct in their expectations, the price should move progressively to the left, and they should be able to collect fees from accompanying market volatility while experiencing relatively low impermanent loss.
TL;DR - a Mode Left LP uses the right/base asset to profit from upward price movement of the left/quote asset. The Mode Left LP wants to keep a bin of base asset directly to the right of price as it moves left in the pool, ready to capture fee whenever price dips right again.
For example, let’s return to our ABC-XYZ pool, but imagine an LP who foresees a bear market for XYZ . They choose Mode Left, adding some XYZ to the bin immediately to the right of the current active bin. Now let’s assume the LP’s expectation is correct, and XYZ begins to lose market value. Traders come to the AMM to swap their XYZ for ABC, and as the ratio of the assets in the pool changes the AMM moves the price to the left (effectively lowering the amount of ABC a trader will receive for 1 XYZ).
As the price moves left out of the active bin, that bin is completely swapped to XYZ. The AMM automatically reconcentrates all of our LP's XYZ into this bin, which now sits immediately to the right of the new active bin. As market volatility moves the price back and forth into this right bin, the LP earns fees from the swaps, and can continue to do so as long as the price stays there or moves further to the left.
Much like Mode Right, Mode Left only functions in one direction. If the price moves to the right, the AMM will not move the LP’s bins at all, and they risk being swapped entirely to the under-performing asset (i.e., the asset on the left/base asset) and becoming exposed to impermanent loss. Again, the modes do not guarantee a particular return–they are designed as a tool to facilitate an LP’s strategy based on their own assessment of market conditions.
Mode Both functions as a kind of dynamic range order that follows the price in a pool wherever it moves–right or left. In other words, it follows the pool price up and down. This is in contrast to Mode Right and Mode Left, which only move an LP’s liquidity when the price moves in a single direction.
Mode Both allows an LP to add liquidity to the current active bin and to either of the bins immediately to the left or right of the activer bin. If trading activity moves the price from the active bin into a new bin in either direction (e.g., to the right), the LP’s liquidity on the opposite side (in this case, the left) will be automatically reconcentrated into what was previously the active bin, making more of it available near the pool price.
For example, let’s use a ABC-XYZ pool again. We’ll imagine an LP who uses Mode Both to stake liquidity in the bin immediately to the left of the current active bin. This means their initial position consists entirely of ABC.
The market value of XYZ goes up, and traders come to the pool to swap it out for ABC. Eventually, these trades swap through all of the XYZ in the current active bin and the price moves right into the next bin, which is composed entirely of XYZ. The AMM now reconcentrates the LP’s liquidity into the bin directly to the left of the active bin, which is composed entirely of ABC. Up to this point, Mode Both has functioned like Mode Right.
If the price continues to move in the same direction into new bins, the AMM will continue to reconcentrate the LP’s liquidity to follow it. If the price should rebound in the other direction (e.g., from right to left), the AMM will first allow the LP to get swapped through completely and then begin reconcentrating the LP’s liquidity to follow price from the opposite side (in this case, from the right). The purpose of this mechanism is to keep the LP’s liquidity as close to the current price as possible at all times.
Continuing our example, let’s imagine that the previous price trend reverses, and the value of XYZ begins to fall. Trading activity sends the price back to the left, out of the current active bin and into the bin directly to the left, where our LP’s liquidity was recently reconcentrated. This means the LP's bin is now the current active bin.
The value of XYZ continues to fall, and the price moves through the active bin–swapping all the ABC in it for XYZ–and into the bin to its left. The LP is now staked in the bin directly to the right of the active bin, and their position consists entirely of XYZ. If the price continues trending to the left and moves into the bin to the left of the current active bin, the AMM will reconcentrate the LP's XYZ into the bin directly to the right of the new active bin (formerly the active bin).
Mode Both is designed to capture as much fee as possible by keeping all of the LP’s liquidity concentrated close to the price. Any time the price is moving through a bin in which the LP owns liquidity, they will collect fees.
As should be obvious from the example, however, the risk of impermanent loss with this mode is higher than either Mode Right or Mode Left, since the LP is exposed to it in both directions. Moreover, they are also subject to “permanent loss” by implicitly agreeing to sell underperforming assets at any point in time. Mode Both therefore carries a significant measure of risk, and users should think carefully before using it.
As the name suggests, Mode Static allows you to add liquidity without engaging any of Maverick AMM’s liquidity shifting mechanisms. It therefore behaves much like established Range AMMs, in that an LP adds liquidity to a bin or range of bins and that liquidity stays in those bins regardless of where the price moves. Since it doesn’t move liquidity to follow price, Mode Static is likely to be less capital efficient than the other Modes, but LPs may discover their own use cases for it.
Other Range AMMs allow LPs to pick a range over which their liquidity is evenly distributed. In Maverick AMM, an LP can customize their distribution bin by bin, unlocking the potential for more complex liquidity strategies.
When a user selects Mode Static, they get the option of three default distributions:
Exponential - starts with a concentration of liquidity around the current pool price and spreads the rest of your liquidity in exponentially decreasing amounts across the bins to the left and right.
Flat - distributes liquidity evenly across a range of bins, centered around the current pool price (similar to constant product AMMs).
Single Bin - distributes your liquidity only in the active bin.
For both Exponential and Flat, the user can also specify the percentage of the price range they wish to cover, and the UI will select the appropriate amount of bins based on the bin width of the current pool.
Maverick has provided the Exponential distribution as an out-of-the-box option based on the findings of this paper out of Harvard, which concludes that this is the most risk-optimized distribution for LPing in Range AMMs. Flat is available for users who want an LPing experience similar to Uniswap V2 and other constant product AMMs. Both of these distributions can also be customized bin by bin after they have been selected.
Now that we have reviewed the four Modes, we can walk through how to Add Liquidity to Maverick AMM.