MLMM ๐ŸŒŠ

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.

Recycling Liquidity

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.

Example

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.

Assume an Liquidity Provider sets a liquidity range of [3,9] [3, 9] for the EIGEN-USDC pair, with the initial price of EIGEN at 6 6 , and wants to add liquidity worth 100100 EIGEN. According to the Uniswap v3 formula:

  • For the range [3,6] [3, 6], liquidity worth 100โˆ—sqrt(3โˆ—6)100*sqrt(3*6) USDC is needed, which equals 424.26424.26 USDC. The 100โˆ—sqrt(3โˆ—6)100*sqrt(3*6) represents the geometric mean price from 33 to 66.

  • For the range[6,9][6,9], liquidity worth 100โˆ—sqrt(6โˆ—9)100*sqrt(6*9) USDC is needed, which is 734.84734.84 USDC. Bubbly requires the liquidity provider deposits 734.84734.84 USDC as collateral (margin). The 100โˆ—sqrt(6โˆ—9)100*sqrt(6*9) represents the geometric mean price from 66 to 99.

Since the USDC provided by LPs can be used to buy EIGEN when the price is within [3,6][3,6] and be used as margin to sell EIGEN when the price is within [6,9][6,9] LPs only need 734.84734.84 USDC to provide liquidity for both ranges.

When the trading price is within [3,6][3,6] 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 100100 USDC, they need to provide 100100 USDC as collateral (margin)

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.

When the trading price is within [6,9][6,9], 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.

Thus, Bubbly LPs experience the same impermanent losses as Uniswap v3 but benefit from better capital efficiency.

Last updated