Maverick AMM: The Revolutionary Dynamic Distribution AMM That Enables Directional LPing, Unlocking Greater Capital Control and Higher Capital Efficiency

Maverick Protocol
Maverick Protocol
Published in
14 min readSep 14, 2022

Maverick’s Dynamic Distribution AMM introduces the novel AMM concept of Directional LPing, which facilitates better capital control for liquidity providers and offers massive improvements in capital efficiency.

When LPing in any existing AMM in the DeFi universe, the LP is making an implicit bet that the price of the pair of assets in their pool will go sideways, enabling them to collect trading fees without the ratio of their deposited assets shifting significantly. If that bet is wrong–that is, if the price moves in any direction other than sideways–the LP will suffer impermanent loss that may exceed their fee income.

This is a huge limitation within the current AMM landscape, as many asset holders who would like to LP have a directional belief about the assets they hold. For example, if a user is bullish ETH, there is no existing LPing option that allows them to make a simple bet that the price of ETH will go up and collect trading fees from that bet. This mismatch between price belief and the tools available to bet that price belief leaves the DeFi ecosystem with thin markets and bad pricing.

Maverick AMM changes this dynamic. By allowing LPs to pick a direction and earn excess returns if they picked correctly, Maverick opens LPing to a whole new class of market participants.

Capital Efficiency and Concentrated Liquidity

A visualization of the progression in capital efficiency improvements across several generations of AMMs.

Ultimately, LPs want to put their capital to work–especially if that capital is in a risk position. Capital Efficiency is a measure of how much volume a given amount of capital generates for a given price movement. Fee collected by LPs is proportional to volume, so Capital Efficiency is really a direct proxy to how much fee a given amount of TVL can generate. The more efficiency, the better.

The AMM space and associated technology has grown quickly in the last few years. Uniswap was an early pioneer with their constant product (x * y = k) AMM. But constant product AMMs are not capital efficient by nature, because each LP’s capital is spread across all prices from zero to infinity, leaving only a very small amount of liquidity available at the current price.

Constant Product AMMs uniformly distribute an LP’s capital across a range from zero to infinity, resulting in low capital efficiency.

Thus, even a small trade will move the price significantly, causing slippage for the trader and leaving the LP with very little fee collected.

In attempts to solve this problem, various mechanisms have been developed to “concentrate liquidity” around a given price. Curve introduced the Stableswap AMM, which concentrates all pool liquidity around a given price (generally, price = 1). Uniswap v3, meanwhile, popularized the Range AMM, which allows LPs to choose where to concentrate their liquidity by “staking a range” of prices.

Range AMMs gave LPs a new degree of freedom to concentrate their liquidity in any price range of their choosing. If the range they choose contains the current price, the capital efficiency can be dramatically higher than in constant product AMMs. How much higher depends on how narrow of a range the LP stakes.

Comparison of the same amount of capital distributed over a 5% and 100% price range within a Range AMM. A 1% movement in price generates 12.2x more fee in the 5% range compared to the 100% range–a massive improvement in capital efficiency.

The result of liquidity concentration has been that LP capital is more efficient at generating fees and swappers get much better pricing: a win for both parties.

The problem with range positions is that as soon as the price moves outside the range, the LP goes from high efficiency to zero efficiency. The net result is that passive “set-it-and-forget-it” narrow LPing in a Range AMM like Uniswap v3 may have an aggregate efficiency that is even lower than a constant product LP position.

Range AMMs are extremely capital efficient when the price is within a range of concentration. Once the price moves outside of this range, capital efficiency drops to zero.

As any Uniswap v3 LP has experienced, when the price moves outside your range, your capital is no longer working at all and you are not collecting fees.

LPs have several options for mitigating out-of-range price in existing Range AMMs:

  • Option: Stake a wider range
  • Drawback: reduces your capital efficiency
  • Option: Do nothing and wait for the price to return to their narrow range
  • Drawback: low capital efficiency over time
  • Option: Continuously monitor and interact with the AMM smart contract to move the range in order to be near the current price
  • Drawback: labor and gas intensive

Basically, in order to increase the efficiency of a Range AMM, LPs need to shift their range continuously as the price moves. This requires effort, technical expertise to write contract integrations, and paying gas fees.

Maverick automates the liquidity movement by letting LPs choose to have their capital move with the price–saving them all three.

Maverick AMM shifts liquidity as the price moves in order to maintain capital efficiency.

Maverick thus introduces a new dimension to liquidity concentration that is not present in existing AMMs. Specifically, Maverick is a Dynamic Distribution AMM where LPs can both stake a range and specify how that liquidity should move as price moves. The Maverick AMM smart contract natively shifts liquidity as often as each swap so that LPs can keep their capital working regardless of the price.

LPing in Maverick

Each Maverick pool is defined by a set of parameters:

  • Pair of assets
  • Bin width
  • Fee rate

LPs choose the pool they want to add liquidity to and then choose how they want to distribute their liquidity across the price range. The smallest unit of price range is a “bin” and LPs can choose to stake liquidity in one or more bins.

When a pool is initiated, the initiating user will have the option to specify the bin width for that pool. For volatile assets, a bin width of 2% is suggested; that is, the upper price of the bin will be 2% more than the lower price of the bin. For stable pairs, a bin width of 0.02 to 0.05% is suggested. The bin width dictates when each bin becomes active as the price moves: in a pool with 2% bins, a new bin will become active whenever the price moves by 2% in either direction; in a pool with 0.02% bins, the active bin will change more quickly.

In addition to dynamic liquidity movement, another feature unique to Maverick is that an LP’s positions can be any arbitrary distribution of liquidity across price. This is in contrast to existing range AMMs, where an LP has to LP a “range” with uniform liquidity over that range.

LPing a non-uniform distribution is useful, for example, for implementing risk-optimized LP positions like the exponential distribution described in this paper out of Harvard. That paper showed how, given certain assumptions about price movement, a rational LP should balance their IL risk with their fee reward by LPing an exponential distribution of liquidity across price. If the LP wants to operate in the high-risk high-reward regime, they should use a narrow exponential distribution. Conversely, if they want to operate in a low-risk low-reward regime, they should use a broad exponential distribution.

Directional LPing with Maverick Staking Modes

The major innovation in Maverick is that LPs can choose to have the AMM move their liquidity as the price in the AMM shifts. By moving liquidity, an LP can dramatically increase their capital efficiency and can also express directional price beliefs.

For each position they open in a pool, an LP can choose to stake one of four modes. The mode choice dictates how their bins and the associated liquidity move with price. The modes are:

  • Mode Static — Bins do not move with price and is essentially the same as existing range AMM LPing
  • Mode Right — Bins move right as price increases and does not move when price decreases
  • Mode Left — Bins move left as price decreases and does not move when price increases
  • Mode Both — Bins move with price in both directions

Mode Right is a bullish bet on price while Mode Left is a bearish bet; in other words, an LP would use Mode Right to make a bet that an asset will increase in price and Mode Left to bet that it will decrease in price.

In order to stake Mode Right or Mode Left, the LP is generally expected to add liquidity to the bin immediately to the left or the right of the current active bin, respectively. So an LP using Mode Right to make a bullish bet would stake the bin immediately to the left of the active bin, and vice versa.

Assuming their bet is correct, as the price swaps past the edge of the active bin, that bin will go from being a mix of both assets to holding only one asset: either all base token or all quote token. In this state, the liquidity in that bin can be moved freely to a new bin that is closer to the price or intermingled with other single-asset bins, such as the LP’s.

Continuing with the Mode Right example, a bullish LP would stake the bin immediately to the left of the active bin, meaning that their stake would consist entirely of quote asset at the outset. Assuming their bet is correct and the value of the base asset goes up, traders would swap base asset out of the active bin until there is none remaining, moving the price to the right and thus past the edge of that bin and into the next bin.

At this point, the AMM can reconcentrate the LP’s stake into the formerly active bin, since both are now composed entirely of quote asset. All this liquidity–including the LP’s–now sits in the bin directly to the left of the active bin, and can collect fees whenever price volatility moves the price left into this bin again. This process of reconcentration will repeat as long as the LP remains staked and the price continues to move right through the bins in the pool.

This video demonstrates Mode Right in operation over time with historical price data for ETH/USDC.

In Maverick, the AMM smart contract tracks the time-weighted average price (TWAP) with a configurable lookback period (the default choice is a 3 hour lookback, but anyone can start a pool with an arbitrary lookback). As trades happen, the price–and thus the TWAP–changes. When the TWAP moves through a bin edge up, Mode Right and Mode Both bins will move up to the next bin too. Likewise, as the TWAP moves down through a bin edge, Mode Left and Mode Both bins will shift down one bin.

Single-Sided LPing

In static-liquidity AMMs, it is advantageous to LP with a two-sided asset distribution so that the LP can be immediately exposed to trade volume and therefore collect fees. As we explore below, however, two-sided LPing will increase the likelihood of impermanent loss.

In constant product AMMs, single-sided LPing is not even supported. In existing range AMMs like Uniswap v3, one-sided LPing is possible, but by LPing one-sided you risk your capital being left stagnant as the AMM price moves away from your range. Without a built-in mechanism to move their liquidity close to the price, a single-sided LP will have low capital efficiency.

In Maverick, directional LPs can provide liquidity with one asset while still maintaining high capital efficiency, due to the underlying Maverick liquidity shifting mechanisms.

Impermanent Loss Considerations

Impermanent loss (IL) is a byproduct of LPing in an AMM that occurs when the price moves from the price at which the LP entered the pool. IL happens because, as the price moves, the AMM (and thus the LP) sells the more-valuable asset for the less-valuable asset, leaving the LP with a net loss. IL can be dealt with in a number of ways. For high volume pools, with little net price movement, it may be that the fees collected outpace the IL, which keeps the LP position profitable. It is also possible to hedge against IL in order to limit downside risk.

In constant product AMMs, the IL is nonlinear and is therefore difficult to hedge. The IL is also bi-directional, in that a price movement in either direction–up or down–will result in loss.

Impermanent loss in a constant product AMM is bi-directional, meaning that the LP experiences IL as the price moves in either direction within the pool. The hope is that fee will offset IL, but at a certain point in either direction IL will outstrip the gain made from trading fees.

In contrast, directional LPs (i.e., LPs using Mode Right or Mode Left) in Maverick that LP with a single asset are only exposed to IL in one direction. If the LP has selected the movement mode that corresponds to the price movement (e.g. the LP is in Mode Right and the price moved up), the LP will not experience IL. In this way, the IL is only one-sided, i.e., the LP is only at risk from price movements in one direction, not both.

Impermanent loss in a directional LP position is one-sided and linear.

Moveover, the IL resulting from a Mode Right or Mode Left position is linear once the price moves beyond the LP’s range and is thus much easier to hedge. For example, a put option return is the inverse of a directional Maverick position and is thus one mechanism that could be used for hedging.

In contrast to static or single-direction liquidity movement, bi-directional liquidity reconcentration (i.e., Mode Both) moves liquidity with price in both directions. This leads to extremely high capital efficiency, but it also exposes the LP to “permanent loss(PL), due to the fact that the LP is agreeing to buy high and sell low as the liquidity is repositioned. This mode should be used with caution because of the PL risk. For pools with very wide bins, the risk is mitigated because it will take large price swings before PL becomes a factor. Bi-directional reconcentration is what has held back previous attempts to reconcentrate liquidity through Curve v2 or vaults like Arrakis. When used naively, bi-directional reconcentration tends to leak liquidity to traders faster than LPs can make up for the leak with fees.

LP Positions

Maverick LP positions within a bin are fungible. That is, the pro rata share of a bin’s assets that an LP can claim is represented by an LP token balance. But, due to the large number of bins that are possible and the gas associated with minting ERC20 tokens, the Maverick AMM tracks bin positions as part of an NFT that stores each bin LP balance.

Each NFT is identified by its ID number and the typical usage is that a user will have one NFT that is reused as the user enters and exits bin LP positions. However, a user can choose to mint a new NFT at any point. Maverick position NFTs are free to mint.

Maverick AMM automatically compounds trading fees back into the bin where it was collected, increasing capital efficiency while saving LPs gas fees.

Unlike other range AMMs, the fee collected by a position in Maverick compounds back into the bin where it was collected. In other AMMs like Uniswap v3, the fee is held out separate from the liquidity in the pool and is not earning fees. In Maverick this fee income is auto-revinested, thereby increasing capital efficiency while saving the LP gas fees. The fee reinvestment and position tracking mechanisms are similar to constant product AMM designs, except each bin has its own LP balance and fee accumulation.

Fee Structure

When a pool is initialized, the initiating LP chooses the fee tier for the pool. Any future LP is agreeing to LP their assets at that fee rate. Fee selection is a critical consideration for an LP. If the fee is too low and the asset is very volatile, the LP’s IL risk will outweigh their expected fee return. If the fee is too high, then LPs in other, lower-fee pools will get the majority of trade flow and fees. Each LP needs to weigh these tensions as they choose which fee tier to LP in.

Given that the optimal fee selection depends not only on the LP’s risk profile, but also the fees charged by other LPs in Maverick and in other markets, it is impossible to say a fee level is optimal. Attempts by other platforms to fix a fee for all LPs or to dynamically converge on a fee based on some market metric are misguided, and ignore the fact that LPs have different risk profiles and price trajectory beliefs. Accordingly, Maverick pools can be initialized with any one of a range of fee rates. This allows LPs to choose the fee tier that suits the current market conditions and the LP’s risk profile. While additional fee tiers will somewhat fragment liquidity, that is not a concern in the modern DeFi ecosystem since smart routers, through aggregators, routinely swap through multiple contracts in order to give traders the best price.

Maverick AMM supports initializing pools with arbitrary fee rates, but it is expected that LPs will choose from one of the following “standard” fee rates:

  • 0.01%
  • 0.04%
  • 0.06%
  • 0.10%
  • 0.25%
  • 0.35%
  • 0.50%
  • 1.00%
  • 2.00%
  • 3.00%

Maverick pools have a mechanism to collect a protocol fee as well.

Try your strategy on Maverick today: https://app.mav.xyz/

Audits and Bug Bounty

Maverick’s smart contract code has been audited by three audit firms: Zellic, Certik, and ADBK. You can read the audit reports here. Additionally, the code has been externally audited by professional smart contract developers at firms that invested in Maverick.

Launch Details

Maverick AMM is an EVM-smart contract and will initially be launched on Ethereum L1 in Q1 2023. Shortly thereafter, Maverick will be launched on other EVM compatible L1s and L2s.

Community

Maverick is building a community to match our brand values: one that is intelligent, innovative, and inclusive. Based on these core values, we’ve welcomed over 54,000 community members with a variety of backgrounds, from institutional DeFi users to complete DeFi beginners.

Our community features:

Meanwhile, we believe in nurturing the talents of our growing community and we are activating a variety of events to leverage those talents, including a Global Ambassador program and more coming very soon!

Join our community on Discord and Telegram. Follow our official Twitter Account to stay tuned for the latest news!

DISCLAIMER: The information provided in this Medium Post pertaining to Maverick Protocol (the “Project”), its crypto-assets, business assets, strategy, and operations, is for general informational purposes only and is not a formal offer to sell or a solicitation of an offer to buy any securities, options, futures, or other derivatives related to securities in any jurisdiction and its content is not prescribed by securities laws. Information contained in this Medium Post should not be relied upon as advice to buy or sell or hold such securities or as an offer to sell such securities. This Medium Post does not take into account nor does it provide any tax, legal or investment advice or opinion regarding the specific investment objectives or financial situation of any person. The Project and its agents, advisors, directors, officers, employees and shareholders make no representation or warranties, expressed or implied, as to the accuracy of such information and the Project expressly disclaims any and all liability that may be based on such information or errors or omissions thereof. The Project reserves the right to amend or replace the information contained herein, in part or entirely, at any time, and undertakes no obligation to provide the recipient with access to the amended information or to notify the recipient thereof. The information contained in this Medium Post supersedes any prior Medium Post or conversation concerning the same, similar or related information. Any information, representations or statements not contained herein shall not be relied upon for any purpose. Neither the Project nor any of its representatives shall have any liability whatsoever, under contract, tort, trust or otherwise, to you or any person resulting from the use of the information in this Medium Post by you or any of your representatives or for omissions from the information in this Medium Post. Additionally, the Company undertakes no obligation to comment on the expectations of, or statements made by, third parties in respect of the matters discussed in this Medium Post.

--

--

Maverick Protocol
Maverick Protocol

Maverick is a leading infrastructure provider in DeFi, enabling projects to customize, automate, and incentivize liquidity effectively. Website: https://mav.xyz