MLMM ๐
Last updated
Last updated
We designed a brand new AMM model called Margin Liquidity Market Maker (MLMM).
MLMM combines the CLMM with the concept of margin from traditional futures to create a pre-market AMM. It utilizes a dual-collateral model for margin management and includes functionalities for adding liquidity based on margins and opening and closing of positions.
In MLMM, liquidity exists in both directions below and above the current price. On the left side, there is liquidity for the quote token, and on the right side, there is liquidity for the vToken, such as points or pre-launch tokens.
For the liquidity of the quote token, LPs need to add the spot token, and for the liquidity of the vToken, LPs need to add spot as margin equal to the value of the vToken. This allows LPs to provide liquidity on both sides using a single token.
Since the price always falls within the liquidity of one side, the spot token provided by LPs can either provide liquidity on the left side or serve as margin to provide liquidity on the right side. This mechanism, called Recycling Liquidity, allows a single token to provide dual-side liquidity, resulting in higher capital efficiency compared to Uniswap.
Let me explain why MLMM is innovative and offers better capital efficiency with an example:
Bubblyโs MLMM uses the same AMM curve as Uniswap v3, allowing users to provide concentrated liquidity. However, unlike Uniswap v3, Bubbly LPs only need to provide the quote token when setting up liquidity.
At the start of the settlement period, sellers must deliver EIGEN to the LP; otherwise, their USDC collateral(margin) is forfeited. LPs will either receive EIGEN or the sellerโs USDC collateral, along with their initial investment.
Thus, Bubbly LPs experience the same impermanent losses as Uniswap v3 but benefit from better capital efficiency.
Assume an Liquidity Provider sets a liquidity range of for the EIGEN-USDC pair, with the initial price of EIGEN at , and wants to add liquidity worth EIGEN. According to the Uniswap v3 formula:
For the range , liquidity worth USDC is needed, which equals USDC. The represents the geometric mean price from to .
For the range, liquidity worth USDC is needed, which is USDC. Bubbly requires the liquidity provider deposits USDC as collateral (margin). The represents the geometric mean price from to .
Since the USDC provided by LPs can be used to buy EIGEN when the price is within and be used as margin to sell EIGEN when the price is within LPs only need USDC to provide liquidity for both ranges.
When the trading price is within LPs act as buyers, using USDC to buy EIGEN from sellers. The EIGEN sold by sellers is backed by USDC collateral (magin). For example, if a seller sells EIGEN worth USDC, they need to provide USDC as collateral (margin)
When the trading price is within , LPs act as sellers, deposit USDC as collateral(margin) to sell EIGEN. At the start of the settlement period, LPs must deliver the corresponding EIGEN to the buyer; otherwise, they will lose the equivalent USDC collateral.