KMM utilizes capital 40 times better than the Constant product model

#dev DeFi
3 min readNov 10, 2021

Presented in our previous article: Motivation to build KMM Swap, KMM Swap aims to solve the current pitfall of the Constant product model: x*y=k. The swap leverages on Chainlink decentralized price oracle and a new capital distribution model to provide:
1. High capital efficiency to liquidity providers,
2. Low impermanent loss to liquidity providers,
3. Low slippage to traders.

In this article, we will explain how KMM can provide a 40x capital efficiency compared to the Constant product model.

If you understand how the Constant product model works, you will know that liquidity is distributed evenly along an x*y=k price curve. Although the model reserved liquidity for all prices between 0 and infinity, it only utilizes less than 1% of the total liquidity provided. Most of the liquidity will never be used for trading, and that’s such a waste.

Uniswap once mentioned this in one of their articles, and took an example of DAI/USDC pair: the v2 DAI/USDC pair reserves just ~0.50% of capital for trading between $0.99 and $1.01, the price range in which LPs would expect to see the most volume and consequently earn the most fees.

This means in the Constant product model, only 0.5% of provided liquidity is traded in the price range of 1% from the market price.

KMM utilizes capital 40 times better than the Constant product model

By concentrating all liquidity at the market price plus some predetermined maxSlippage, KMM enables extremely high capital efficiency for liquidity providers.

Following the model of KMM Swap, we describe the liquidity density function on the below chart.

KMM reserves liquidity for prices between marketPrice and marketPrice*(1 + 2*maxSlippage)

With the default value for maxSlippage being 5%, we can add more details to the Liquidity density function chart. The model of KMM Swap will reserve liquidity for prices between [market price] and [market price × 1.1].

Liquidity density function with maxSlippage = 5%

As the provided liquidity will be traded within the active price range of 1% from the market price, it corresponds to the price range of [market price] and [market price × 1.02] (in the range of price change from 0–2%, the average price change is 1%).

This means KMM Swap enables 20% of the provided liquidity to be actively traded within the active price range of 1% from the market price — a 40x capital efficiency compared to 0.5% of the original constant product model.

However, the actual value for each pool is determined by the pool’s liquidity providers. Lower maxSlippage concentrates greater liquidity at the market price while higher maxSlippage gives liquidity providers more profit from each trade.

--

--

#dev DeFi

#dev DeFi is an aggregate lending and borrowing protocol on the Binance Smart Chain (BSC). https://devdefi.finance/#/