Algorithmic Liquidity Distributor
What is the ALD?
The ALD(Algorithmic Liquidity Distributor) is a fundamental component for automating On-chain Orderbook-based liquidity pools. It algorithmically automates market-making to facilitate smooth trading in the order book, effectively distributing liquidity across each tick. The ALD ensures that the order book adapts to market conditions in real-time, always optimizing liquidity placement for optimal efficiency. This allows for immediate execution of trades based on pre-prepared liquidity, without the need to wait for matching times in the On-chain order book, similar to traditional swaps.
This eliminates the need for LPs(Liquidity Providers) to ponder over the optimal allocation of liquidity to achieve the highest asset utilization efficiency. While some DEXs may offer options directly to LPs regarding liquidity allocation, what matters most to LPs is profitability, making tools that automatically maximize it far more valuable. Therefore, the ALD dynamically adjusts liquidity allocation based on market conditions and liquidity size, ensuring optimal asset management efficiency.
How it works?
The ALD distributes liquidity across price intervals based on the market price. It determines the quantity of liquidity to be allocated per tick regardless of the number of quote tokens (or base tokens in the case of buy orders) represented by the price.
[이미지 추가]
In a market consisting of a pair of two tokens, based on the current market price, for buy orders, the liquidity of base tokens is required at the market price and the price range above it. Conversely, for sell orders, the liquidity of quote tokens is required at the market price and the price range below it. In other words, the two tokens are divided into different up and down directions, requiring each different token as a liquidity to the above and below. So there is no section where both tokens are needed at the same time. As a result, the liquidity for each token is utilized separately on the bid and ask sides, and each side needs a different type of token.
To delve deeper into understanding ALD, it's necessary to examine the documentation regarding Tick Size. In Coinmeca's Orderbook, the tick size is automatically determined for each price and its unit. The determined tick size dictates specific intervals for different price ranges. Following the methodology outlined in the documentation, the fourth digit of the number representing the current price is fixed as the tick size. Consequently, there can only be a maximum of 10,000 ticks or fewer. For instance, if the current price is 150, the number consists of three digits, and the tick size is 0.1 as the fourth digit until the price number's digit changes. In this scenario, the tick range is 1500, meaning that trading at the current market price would exist 1500 ticks from the current price til before the next rebase.
Consequently, the algorithm calculates and determines the liquidity to be allocated per tick based on the determined tick size and tick range. As the price changes and the number of digits in the price changes, liquidity allocation is recalculated, resulting in the formation of cliff intervals in liquidity distribution. Thus, liquidity distribution groups are formed based on price numbers with the same digits, leading to the creation of distribution groups at larger intervals.
Distribution Groups
Assuming the current price is 150, with a tick size of 0.1 and a tick range of 1500, if the price drops to 99.9, the tick size becomes 0.01, and the tick range created at this point is 9999. The algorithm distributes the available liquidity into categories and ticks accordingly, depending on the category and tick sizes. As a result, intervals are formed based on the number of digits in the price amount, which are referred to as distribution groups.
[차트 이미지 추가]
Also, assuming a liquidity of 40,000, 17,072.32 liquidity is used for 1500 ticks, which represents approximately 42.68% of the total liquidity, roughly half. Similarly, half of the total liquidity is allocated to the first group, while the remaining 50% of the remaining liquidity is further distributed among the subsequent groups. As the distribution group level increases gradually, the liquidity allocated per tick decreases significantly.
Distribution Shapes
The distribution of liquidity is influenced by the correlation between liquidity size and tick range. If liquidity is abundant, price slippage occurs slowly even in regular swaps. This is because liquidity allocated to each tick in the order book is abundant, requiring many trades to move the tick. Conversely, if liquidity is scarce, ticks move rapidly. This results in significant price slippage in trades in pools with insufficient liquidity.
The ALD continuously rebases liquidity distribution to ensure smooth trading even in conditions of scarcity or excess liquidity, adjusting the distribution type according to market conditions. If liquidity is insufficient, distributing liquidity in a concentrated manner reduces price slippage by placing liquidity where it's most needed, while in cases of excessive liquidity, an inverted distribution ensures smooth trading by preventing ticks from being fixed due to excessive liquidity.
Concentrated Distribution
In cases where liquidity size falls below certain conditions, liquidity is distributed in a concentrated manner. This involves prioritizing liquidity placement near the market price, where trading occurs most frequently, to reduce price slippage and facilitate smoother trading even in conditions of scarcity.
Equalized Distribution
When liquidity exceeds a certain amount, a more evenly distributed form of liquidity distribution is provided from a concentrated distribution. This differs fundamentally from distributing equal liquidity across all price ranges in a typical swap. The distribution varies step by step for price intervals grouped by the same number of digits, ensuring uniform distribution of liquidity in specific price range categories.
Inverted Distribution
In cases of excessive liquidity, liquidity is distributed in an inverted form to allow ticks to move more smoothly. Distributing massive liquidity in a concentrated manner can lead to ticks being fixed at a specific price if significant trades do not occur. Therefore, an inverted distribution ensures that ticks move smoothly in accordance with market logic to reflect trader demand in the market price.
What is the difference?
vs Concentrated Liquidity
The ALD determines algorithmic liquidity distribution, relieving LPs of the need to contemplate the price ranges or distribution types for their liquidity. Additionally, in Coinmeca's ALD operating policy, LPs' liquidity is pooled and managed comprehensively, with no concept of liquidity loss occurring outside of price ranges. As a result, LPs experience reduced concerns and mitigated risks, leading to increased efficiency.
While some swaps allow LPs to directly select specific price ranges or distribution types for their liquidity, this feature poses a significant risk to LPs as liquidity loss may be maximized when token prices move outside these price intervals. This risk is particularly prevalent in liquidity pools for new tokens with low liquidity and high price volatility.
vs Legacy Swap
The ALD distributes liquidity in a manner that matches the liquidity size, providing optimal liquidity distribution based on current market conditions for smooth trading and maximal liquidity utilization. Increased liquidity usage leads to higher asset management efficiency.
In contrast, most swaps evenly distribute liquidity across all price ranges. Consequently, much of the liquidity is distributed even in intervals where no trades occur, leading to inefficient asset management.