iZiSwap & Discrete Liquidity Model: Revealing the Future Trends of AMM

TokenInsight
2023-05-26 17:02:37
Collection
What innovations have emerged in AMM, and are they as eye-catching as Uniswap v3 back in the day?

Written by: 0xAidan, TokenInsight

The History of AMM

At the end of 2018, Uniswap emerged, adopting the AMM Automated Market Maker model instead of an order book like other contemporaneous DEX. This was a response to a series of issues caused by the limitations of Ethereum, including slow transaction confirmation speeds. Uniswap repeatedly demonstrated the potential of AMM in practice, but the trade-offs in performance also led to various problems, such as inevitable slippage and impermanent loss, as well as criticism for low capital efficiency, occasional sandwich attacks, and a poor user experience due to a single order type.

In May 2020, Uniswap v2 was launched, adding token-to-token swaps and increasing the difficulty of price manipulation—this seemed more like a patch for v1 rather than an optimization of the AMM model. A year later, in May 2021, the Uniswap team launched Uniswap v3, introducing the well-known concentrated liquidity scheme.

Specifically, in v1 and v2, when LPs provided liquidity to a liquidity pool, the liquidity was distributed across all price ranges from (0, ∞). However, most assets only trade within a certain price range, meaning a large portion of the liquidity provided by LPs was never utilized, resulting in low capital efficiency. The concentrated liquidity scheme in v3 allows LPs to choose the price ranges in which they provide liquidity, and LPs can only earn transaction fee rewards when assets trade within the price ranges they selected. This scheme significantly increased the capital efficiency of AMM. Correspondingly, slippage and impermanent loss were also somewhat alleviated.

Although Uniswap v3 addressed the major capital efficiency issues of AMM, there are still other problems waiting to be solved. Two years have passed since the launch of Uniswap v3, and we have reason to question whether the Uniswap team is preparing for Uniswap v4. While looking forward to Uniswap v4, let’s take this opportunity to review the remarkable innovations that have emerged in AMM over the past two years.

iZiSwap's Solution

DLAMM Model

In May 2022, iZUMi Finance launched its DEX product iZiSwap, proposing a new AMM model—Discretized-Liquidity-AMM (DLAMM).

The mathematical formula used in DLAMM, Source: iZiSwap Whitepaper

Specifically, DLAMM discretizes the continuous price curve into countless price points based on the constant product model. Aside from these points, the trading price of the trading pair will not take on other values during fluctuations. Liquidity providers can only provide liquidity at these price points, and traders can only trade at these price points.

Price points in the DLAMM model, Source: iZiSwap Whitepaper

In DLAMM, the market price will only exist at a discrete price point. The liquidity pool at the market price point contains both tokens, while the liquidity pools above the market price point contain only one asset, and those below the market price contain the other asset. Trades at any price point will directly affect the ratio of the liquidity pool at that price point, but the trading price remains unchanged until the liquidity at that price point is traded down to just one asset, at which point the market price will move to the adjacent price point and continue the process.

Advantages of the DLAMM Model

Upon closer inspection, we can see that the underlying logic of the DLAMM model is quite similar to that of the order book model, which we believe is one of the future development trends for DEX. The introduction of the AMM model by Uniswap was a result of the performance trade-offs of Ethereum at the time, providing convenient services for traders while also bringing various problems. As infrastructure networks develop and iterate, the inherent flaws of the AMM model will gradually be optimized, and DEX will slowly converge towards the order book model. In November 2022, Trader Joe v2 was launched, and Trader Joe also adopted a similar AMM model to DLAMM in v2.

Compared to current DEXs, the main advantages of the DLAMM model are as follows: DLAMM vs. Constant Product AMM, Source: iZiSwap

  • Compared to the price curve of the constant product model, the price points of DLAMM are more accurate. The price curve of the constant product model is a continuous smooth curve, but the impact of any trading pair's price is not smooth. The constant product model can only determine the prices before and after a trade based on the ratios of the liquidity pools before and after the trade, while the actual execution price of each trade needs to be calculated based on the changes in the liquidity pool after the actual transaction. For example, when trading on Uniswap, traders need to set the size of the trade and the maximum slippage they can tolerate before the trade. Uniswap will estimate a rough execution price based on the information submitted by the user. In cases of insufficient liquidity, this estimated price may differ significantly from the actual execution price. However, on iZiSwap, these price points are determined through a discrete price formula, where p represents the relative price of the two tokens in a trading pair. This makes the execution price more predictable and improves the transparency of the trade.

The formula for determining relative price points in DLAMM, Source: iZiSwap Whitepaper

  • While meeting traders' demands for price precision, DLAMM further enhances capital utilization efficiency. In real life, when people describe the price of a token, they often do not describe it very precisely but rather tend to have a minimum incremental interval. For example, when the price of $ETH is $1,817.26, it is often sufficient to round to the nearest dollar, $1,817, or sometimes even to the nearest ten, $1,820. Therefore, using a relative minimum price increment of 1‱ is sufficient to accommodate traders' sensitivity to price in most cases. At the same time, this design gathers liquidity around nearby price points, further improving capital utilization. Trades within a certain price point conform to the constant product model, meaning that in cases of sufficient liquidity, trades within a single price point may not even incur slippage.
  • Fully compatible with limit orders. Since DLAMM determines the tradable price points in advance, it also makes limit orders feasible. In December 2022, iZiSwap launched the new version of iZiSwap Pro. In this new version, iZiSwap offers on-chain limit orders. The limit orders submitted by traders will be added to the liquidity pool at the price point in a counteracting liquidity manner. When the market price fluctuates into the trader's order range, this portion of liquidity will hedge against the liquidity provided by LPs to execute the limit order trade. Along with the limit orders, iZiSwap also launched a user interface compatible with limit order trading. Users can switch between the classic AMM DEX trading interface and the limit order trading interface at any time, allowing both traders accustomed to AMM DEX and those from centralized exchanges to complete trades smoothly on iZiSwap.

The UI interface for limit order mode in iZiSwap Pro, Source: iZiSwap

  • Compared to current order book DEXs, limit order DLAMM is safer. This is because current order book DEXs still rely on off-chain trading matching engines and on-chain transaction records. For example, to trade on dYdX, traders need to deposit funds onto dYdX first. Although this deposit transaction is recorded on the blockchain, and every transaction on dYdX is sent back to the Ethereum mainnet in a Rollup format with accompanying zero-knowledge proofs. However, DLAMM remains an AMM, where traders only interact with the liquidity pool without needing a counterparty, thus eliminating the need for a centralized trading matching engine. Traders simply place orders and wait for the market price to reach the order price for execution. On iZiSwap, user interactions do not require deposits or withdrawals, eliminating the risks associated with fund custody.

Final Thoughts

Since its launch in May 2022, iZiSwap has undergone a year of development and practice, and DLAMM has stood the test of traders. At the same time, iZiSwap continues to update and provide users with a better trading experience. These user-friendly innovations have indeed been recognized by users. After the launch of zkSync Era, iZiSwap's TVL rapidly surged to over $100 million.

iZiSwap trading data, Source: iZiSwap

We believe that innovations based on AMM will not stagnate. When will the era of Uniswap v4 arrive? Will it bring us even greater surprises? It's hard to say, but iZiSwap has already laid another solid foundation on the path of AMM innovation, making the future of AMM even more promising.

ChainCatcher reminds readers to view blockchain rationally, enhance risk awareness, and be cautious of various virtual token issuances and speculations. All content on this site is solely market information or related party opinions, and does not constitute any form of investment advice. If you find sensitive information in the content, please click "Report", and we will handle it promptly.
ChainCatcher Building the Web3 world with innovators