The Paradigm Shift of AMMs: An In-depth Analysis of iZiSwap’s Discretized Liquidity Model

Since zkSync Era’s mainnet launch on March 24th, an intense battle of liquidity has raged on the network. A decentralized exchange (DEX) named iZiSwap has caught the attention of market participants by its rapid development. Within one month of its launch, its daily transaction volume has exceeded $15 million, and its total volume locked (TVL) has exceeded $40 million. iZiSwap is so fast-grown compared to its major competitors in the same sector of DEXes.

The trend of iZiSwap becoming the top DEX on zkSync Era is clear. Due to its uniquely-designed Discretized Liquidity AMM (or DL-AMM) model, iZiSwap by nature has the potential to compete for the first in terms of trading volume. Its achievements fully demonstrate the advantages of Discretized Liquidity AMM, making it a powerful participant in the highly competitive DEX market. The success of iZiSwap further proves the potential of zkSync in scaling Ethereum and optimizing decentralized financial services.

The History of iZiSwap and Discretized Liquidity AMM

iZiSwap is the continuation of the automated market maker (AMM) style DEX represented by Uniswap. Uniswap V2 has achieved great success with its simple interface and user-friendly functions, but the low capital efficiency of user funds represented by the constant product function AMM has become a significant drawback of the V2 paradigm of DEXes.

In 2021, Uniswap released the V3 upgrade and launched the Concentrated Liquidity model, which greatly improved capital efficiency. On the basis of Uniswap V3, iZiSwap introduces a new Discretized Liquidity design, greatly unchaining the potential of Uniswap V3’s Concentrated Liquidity model. This innovative design not only improves the capital efficiency of liquidity, but also enriches the user’s trading experience, making iZiSwap stand out in the competition of decentralized exchanges.

An in-depth analysis of Discretized Liquidity AMM and its high capital efficiency

  1. Discretized Price Ranges

In the design of iZiSwap, the price ranges are discretized into a series of points pi, which means being apart from these discrete points, the price has no other values. The formula for this design can be expressed as,

Among them, iZiSwap uses p0=1, d = 0.0001. The intentions of this design is based on the following considerations:

Firstly, in reality, prices are often expressed as discrete. When people describe prices such as “1 USDC = p ETH”, they are more used to p having a minimum increment interval rather than infinite subdivisions. This destined way of thinking is subtly integrated into the model design by iZiSwap.

Secondly, using an index increment of d=0.0001 is enough in most cases to accommodate traders’ price sensitivities. Especially for traders, they are more accustomed to using percentages to describe their returns. Therefore, the design of iZiSwap not only conforms to the habits of traders, but also meets the precision requirements of transactions.

Finally, the introduction of discrete prices facilitates the implementation of Limit Orders. By discretizing prices, traders can more easily set their Limit Orders and thus more precisely monitor their trading behaviour.

In conclusion, iZiSwap’s design of Discretized Liquidity undoubtedly enhances the practicability of its model and the user’s trading experience, further consolidating its competitive position in the DEX sector

2. Discretized Liquidity

In iZiSwap’s design, liquidity as an Automated Market Maker (AMM) is added in a unique and innovative way, which is only at pre-defined discrete price points. This design greatly improves the efficiency and accuracy of the model, and significantly improves the trading experience. The formula is as follows

In iZiSwap’s trading model, the constant sum formula (CSF, or x+y=k) is adopted as its core trading principle. Notably, this is the first time that CSF principles have been legitimately introduced into an Automated Market Maker (AMM) model. In the previous AMM models, this principle was not fully adopted, but the designers of iZiSwap keenly captured the superiority of this principle and successfully integrated it into their model.

By introducing CSF principles, iZiSwap’s model brings a series of high-quality features. First, the trading process is fairer, reducing the possibility of market manipulation. Second, this principle makes the outcome of transactions more predictable and improves the transparency of the market. Finally, the CSF principle also simplifies the calculation process of transactions and improves the efficiency of the system.

On the bilateral asset stock relationship diagram, this transaction behavior is manifested as a broken line (see figure (a) below).

The intentions this design include the following considerations,

  • Transactions are at fixed discrete points, which can strictly meet zero slippages, improving the accuracy and efficiency of the transaction.
  • When adding a price range to a liquidity, the integral summation brought about by converting continuous prices to discrete prices can be replaced by proportional summation, which can also be done efficiently in O(1) time, greatly improving the efficiency of the system.
  • The positioning of the same liquidity range for a single segment during the transaction process, the calculation of trading fees, etc., can also be maintained in O(1) time using a mechanism similar to Uniswap V3’s Concentrated Liquidity, which ensures a fast response of the system.
  • During the transaction, AMM liquidity is fully compatible with Limit Order. This design can uniformly handle the liquidity of the two, and realize the perfect integration of the two trading methods (see figure (b)).

Most importantly, iZiSwap’s innovative design such as discretized price ranges, discretized liquidity, and CSF trading principles have been adopted by successful decentralized exchanges (DEX) such as Trader Joe, and have gradually taken over an important position in the mainstream market. It not only verifies the advanced design idea of iZiSwap, but also further promotes the development of the entire DEX sector. We look forward to more innovations and technical breakthroughs brought by iZiSwap and other DEXes with the same design concepts in the future.

3. Limit Order

In the current DEX environment, Limit Orders do not completely rely on on-chain custody funds, but use a semi-centralized repeater processing method. Although such a processing method can provide a certain degree of efficiency, it brings a risk of centralization. In this context, iZiSwap introduces an innovative solution for fully on-chain fund custody, aiming to provide users with a safer and more efficient trading environment.

The biggest challenge of integrating limit orders into DEXes is that it needs to complete the transaction at a price point in O(1) time. This is possible under the traditional matching engine, but it faces great difficulties in the on-chain environment. In order to solve this problem, iZiSwap has designed a sophisticated limit order management method.

First of all, iZiSwap adopts the method of single-point aggregation limit order. During the trading process, all limit orders on a single point are treated as a whole. This method can greatly improve the efficiency of the transaction and ensure that the transaction is completed in O(1) time.

Second, whenever the price crosses a price point, the filled order volume is transferred to a separate storage space called legacy. This design enables the system to clearly distinguish the sequence of orders, thereby ensuring the accuracy of transactions.

Finally, users need to claim the transacted assets by themselves. This is a necessary restriction as it ensures that users have full control over their assets and avoids security issues that may arise due to automatic asset transfers.

Such a design brings a series of properties. First of all, since the limit order on a single point as a whole can complete the transaction in O(1) time, it can greatly improve the efficiency of the transaction. Secondly, when the price passes through the target price (time point A) and then falls back (or crosses) the target price (time point B), the limit order after time point B will not be recorded as a transaction status. This guarantees the correctness of the transaction. Finally, when the price of a limit order is at the target price, the part of the transaction will be obtained by the user who initiated to claim first, which ensures fairness in the sense of first-come-first-served.

In general, iZiSwap’s innovative limit order method has brought significant improvements in terms of security, efficiency, and fairness, providing users with a more decentralized trading environment.

With the limit order function, iZiSwap’s user interface (UI) design can become more flexible and diverse. This means that users can choose different trading methods according to their needs and habits. Especially those users who are accustomed to centralized exchanges, they can achieve a close or even the same user experience on iZiSwap.

In addition, the flexible UI design not only makes the transaction process smoother, but also greatly improves the user’s transaction efficiency. Whether you are a novice or an experienced trader, you can quickly find the functions you need on the iZiSwap’s interface for convenient and efficient transactions.

More importantly, with the implementation of EIP-4844, the gas fee of Ethereum Layer 2s has been further reduced. This improvement proposal optimizes the transaction processing mechanism of the Ethereum network, so that the gas fee required for each transaction is greatly reduced. This makes users no longer need to worry about additional cost loss when placing and canceling orders.

In general, iZiSwap’s limit order function, combined with its flexible UI design and the optimization of the Ethereum network, provides users with a convenient and cost-friendly trading environment. Whether you are a novice just getting started or an experienced trader, you can find a trading method that meets your needs on iZiSwap.

4. Flexible Liquidity Mining Methods

The original liquidity mining scheme of Uniswap V3 is mainly to subsidize active liquidity providers. However, this strategy may cause some problems in practice, especially for users who do not know much about Concentrated Liquidity.

These users, in order to pursue liquidity rewards, may place a large amount of liquidity around the traded market price. Doing so would boost their trading fee income, but it would also have implications for market stability. In this case, small price fluctuations in the market may result in a large amount of impermanent losses. The impermanent losses not only directly affect the interests of liquidity providers, but also indirectly undermine the stability of the market.

Additionally, this practice will negatively impact the experience of other liquidity providers. This is because a large amount of liquidity is concentrated around the market price, greatly reducing the influence of other liquidity providers in the market, thereby reducing their user experience.

This problem is particularly evident in PancakeSwap V3, a fork product of Uniswap V3. Pancake V3 did not make effective improvements on this issue, but directly copied Uniswap V3’s liquidity mining method. This method obviously cannot solve the problem, but may aggravate the seriousness of it. This practice also makes people question the genuinity of its innovation and originality. Hopefully in the future development, PancakeSwap V3 can eventually develop its own uniqueness, instead of just imitating and copying other products.

To solve the problem, iZiSwap has designed more flexible liquidity mining methods,

1. Fixed Range

This method is able to distribute liquidity mining incentive tokens in certain price ranges, e.g., [0.95,1.05], to keep the price stable for stablecoin or pegged-assets.

Each block in the (0.95p,1.05p) price range earns 10 tokens from the stablecoin and pegged-asset issuer. izumi evaluates the total effective liquidity in the (0.95p,1.05p) price range and assigns incentive linearly according to the proportion held by each LP. The incentives attract liquidity to this price range, that achieves minimum slippage.

2. One Side

This method allows liquidity mining incentive tokens in the current price range to compensate for the impermanent loss caused by price change within the corresponding time interval.

Similar to the traditional xy=k model, the LP also puts half the value of the USDC and half the value of the project tokens to start liquidity mining with one click.

However, in order to avoid the “Pool 2 dilemma” caused by the traditional xy=k model (i.e. LP puts all USDCs as potential buy orders and project tokens as potential sell orders into the liquidity pool of the trading pair, causing LPs to passively sell their project tokens and suffer from impermanent losses when the price goes up. It also increases passive selling pressure on the project side, preventing price increase and creating a “lose-lose” situation.

iZiSwap innovated the “one-sided non-impermanent loss” model based on Uniswap V3, which puts the LP’s USDC into the (Pa,Pc), just below the current price Pc, and puts the LP’s project tokens into the staking mining instead of into the trading pool (i.e. above Pc as potential sellers), thus creating a model of “stronger buying than selling”, which is more conducive to price increase.

3. Dynamic Range

In the “Dynamic Range” method, users participate in liquidity mining by providing liquidity within the value range of (0.25Pc, 4Pc) of the current price (Pc). The width of the price range can also be set by the project party, such as (0.5Pc, 2Pc), which will also provide more concentrated liquidity. After the user provides liquidity to the currency pair at a set price range through iZiSwap, the LP provider will automatically participate in mining and start receiving rewards from liquidity mining.

In addition, LP providers will also receive iZiSwap transaction fee income, because the value range set by liquidity providers includes the current token price. The combination of these two incomes will significantly increase the expected return of liquidity providers.

Discussions

First of all, let’s talk about the high gas fees. The complexity of the iZiSwap model does surpass the traditional model, which also means that in certain operations, such as placing and withdrawing limit orders, the gas fee has significantly increased. However, iZiSwap ensures that there is almost no gas fee gap between swap and V2 in a small range through a unique gas optimization strategy. Moreover, with the upcoming EIP-4844, it is expected that the gas fees on Ethereum Layer 2s will be further reduced, which will greatly help with the transaction costs. This trade-off reflects iZiSwap’s balance between pursuing efficiency and cost control.

Second, on the issue of user experience. In operations such as placing and withdrawing limit orders, each operation requires a wallet signature to send the transaction, which has a certain gap with CEXes in terms of user experience. However, through cooperation with Unipass and other Account Abstraction providers, iZiSwap adopts the session key transfer authorization mechanism, and through the relay network, realizes the seamless feeling of a single click on the user perception level. This not only greatly improves the user experience, but also ensures the security and efficiency of transactions.

To conclude, iZiSwap not only accepts trade-offs when facing challenges, but also successfully finds the balance between efficiency, cost and user experience through innovation and cooperation with other blockchain projects. This not only demonstrates the advantages of iZiSwap, but also fully proves its leading position in the DeFi field.

Reference

iZiSwap: Building Decentralized Exchange with Discretized Concentrated Liquidity and Limit Order https://assets.izumi.finance/paper/dswap.pdf

DefiLlama: zkSync Era https://defillama.com/chain/zkSync%20Era?tvl=true