Dynamic Liquidity on Solana: Introduction to Meteora DLMMs
How to think like a Market Maker with Meteora.
Just one month into 2024, the Solana ecosystem has seen two massive token launches, $WEN and $JUP. Powering Jupiter’s launchpad initiative, is Meteora’s Dynamic Liquidity Market Maker (DLMM) program.
The Concentrated Liquidity MM is an unoptimized model for blockchains that have difficulties due to scalability and performance reasons in executing traditional central limit order books (CLOBs) and is not very capital efficient. Meteora brings DLMMs to Solana, making a step towards higher capital efficiency for liquidity providers (LPs).
Advantages of DLMMs
DLMM comes with three key advantages that make it a strong candidate for the future of liquidity pools on Solana.
Bin-ification with Zero-Slippage within bins
Dynamic Fees
Flexible Liquidity Curves
The main advantages of DLMMs all support one goal: the pursuit of higher capital efficiency.
Higher Capital Efficiency
What is capital efficiency? Capital efficiency is how well your money is deployed to earn a return or yield. Your alpha could be chasing god candles, lending, providing liquidity, staking, or something completely different to put your money to work.
DLMMs specifically work to increase the capital efficiency for LPs by offering flexibility and incentives to the LPs that express the most accurate view on fair value and volatility through liquidity. DLMMs open up advanced strategies for LPs and grow the pie for everyone.
Prices have distributions and DLMMs allow LPs to optimize their capital allocation along the bin distribution to maximize gains. As an LP, it is critical to have a strong understanding of how expected value and volatility (mean and variance) shape and describe distributions. The most accurate LP will have the highest capital efficiency as the majority of their capital will maximize fees from the most trade volume if volatility is low or from dynamic fees at the best prices if volatility is high.
Bins Bins Bins
Let’s talk about bins first. In DLMMs, liquidity for the TokenX/TokenY pair is discretized into price bins. Bins are either the Active Bin, or not the Active Bin. The Active Bin is the only one that earns trading fees, contains both tokens, and there is only one at any point in time.
In the above image, the Active Bin is the only bin that contains both tokens. Suppose there’s 50 tokens each in the Active Bin. If someone comes along and wants to buy 10 Token X, they swap with the Active Bin, adding Token Y, and receiving 10 Token X in return for a price of 10 * P_14.
Slippage vs Price Impact
Slippage is the difference in price you expect vs price you execute due to the movement of the market. Price Impact is the change in market price by your order. If nothing is trading and you bid the market, there’s no slippage because the price impact was expected from your own trade. Slippage can occur in fast markets while you are trying to execute a trade.
This is what is meant by zero-slippage within bins. If the Active Bin is volatile, there may be slippage. If the Active Bin stays in place, orders that can be traded against the Active Bin liquidity will have zero-slippage.
Slippage is the change in price between the Active Bin before an order, and the Active Bin that your order executes in. If your order doesn’t change the Active Bin, there’s no price impact.
Dynamic Fees
Both Concentrated Liquidity Market Makers (CLMMs) and DLMMs have base fees which are earned when trades are made and you are providing corresponding liquidity. DLMMs also have variable fees, which change with market volatility and are measured by bins crossed and swap frequency. In times of high volatility, these variable fees help reduce impermanent loss.
Dynamic fees reduce impermanent loss for LPs who underestimate the volatility of the asset price.
Liquidity Curves
Finally, let’s dive into what may be the most interesting feature, flexible liquidity curves. Different shapes of curves represents different views on the fair value and volatility of a market.
Exercise: Suppose I had a market on the expected value of a six sided dice roll.
\(E[D_6] = $3.5, \sigma = 0\)If I were providing liquidity for this market, I would be able to be super tight and put all my liquidity into the 3.5 price bin because I am confident in the fair value. If my variance increased, I would concentrate liquidity further and further away from the expected value.
The gorillion-dollar question is how you want to distribute your liquidity to maximize either the time as Active Bin to earn more base fees, or to capture the top and bottom of the trading range in higher volatility environments. How you choose to distribute liquidity represents a view on both the fair value and volatility of the market.
Spot (no view on EV or variance)
If you have no view, you might opt for a uniform distribution around the current price. Meteora calls this shape “Spot”. This approximates what current AMMs do in constant product liquidity pools.
Curve (High Confidence EV, Low variance)
If the market is a stablecoin pair like USDC/USDT, you’ve seen they recommend this bell-shape called “Curve”.
This strategy should take advantage of the low volatility and predictable theoretical value and concentrate your liquidity to the bins that trade most often. Since your liquidity is more often in the Active Bin, you will more often earn base fees from trading. A stablecoin pair with low volatility is not expected to produce high variable fees.
Bid-Ask (Low confidence EV, high variance)
And finally, the half-pipe, known as the “bid-ask” strategy:
This is the other end of the spectrum, where liquidity is concentrated far from the active bin. This is for tokens where high volatility is expected, theoretical value is unpredictable, and aims to capitalize on the variable fee. This is because we are not confident that the token will continue to trade at the current price back and forth and when it does jump across bins like we believe, we want to earn a higher share of the variable fee.
Advanced Strategies
Meteora documentation includes a few advanced strategies made possible by the DLMM protocol. I will try to add color to each.
Ranged Limit Orders: A traditional limit order guarantees the price you want. For example, I want to buy SOL/USDC at $95. DLMM allows you to concentrate liquidity and buy SOL/USDC across a range like $90-$100 by depositing an uniform amount across the price range, effectively putting a limit buy for that range.
DCA while earning: You can provide liquidity symmetrically and concentrate extra liquidity across a time interval.
Sell/Buy Walls: By concentrating liquidity at certain price bins, you can ensure that there is a floor or ceiling as long as your liquidity suffices.
Gradual Ladder Orders: You can asymmetrically scale into and out of a position by concentrating more liquidity at predetermined price levels.
De-peg Bets: This applies to stablecoins where there would typically be a curve utilization. Allocating higher liquidity in bins away from the expected stable value of 1, would catch trades that depeg the price.
Conclusion
DLMMs provide you the flexibility to express opinions on the fair value and volatility of a token pair market, with base fees and variable fees as respective incentives. Rewarding LPs is key to bringing on more liquidity and value to DeFi.
For the intelligent liquidity provider, DLMMs unlock so much flexibility in being able to approximate a central limit order book on the blockchain. This allows for advanced strategies that highly optimize capital efficiency, bringing more liquidity, more capital, and more users to Solana.