Zou Chuanwei: In-depth Analysis of AMM Conditional Liquidity Logic and Potential Impact
This article is from Chain News, authored by Zou Chuanwei
Uniswap v3 adds granularity control features based on the constant product curve x*y=k (see “Research on Uniswap v3” (2021, Issue 33)). Liquidity providers (LPs) can choose to concentrate their funds in the most frequently traded ranges to achieve concentrated liquidity and improve capital efficiency, while Uniswap v3 creates ERC-721 contracts for the positions of liquidity providers.
I refer to this approach of Uniswap v3 as Conditional Liquidity, which is liquidity that exists only under certain conditions. Conditional liquidity does not exist in traditional finance. So, why can AMMs support conditional liquidity? What impact does conditional liquidity have on AMMs and the broader DeFi space? Studying these two questions helps us gain a deeper understanding of the essence of AMMs and liquidity.
The Intrinsic Logic of AMMs
The “General Theory of AMMs” (2021, Issue 31) studies the general form of AMMs. Like this article, it also focuses on AMMs for two types of crypto assets, referred to as X and Y, using crypto asset X as the unit of account, meaning all prices and market values are denominated in crypto asset X.
The state of an AMM is represented by the quantities of the two crypto assets in the liquidity pool, assumed to be (x,y) at a certain moment. In the general form of AMMs, regardless of how the two crypto assets are traded (ignoring the impact of transaction fees), the liquidity pool always satisfies
where f is a monotonically decreasing convex function of x.
Assuming an investor exchanges an amount of crypto asset X, denoted as △x, for an amount of crypto asset Y, denoted as △y, from the AMM. After this transaction, the state of the liquidity pool changes to (x+△x,y-△y), and it satisfies. This is equivalent to
When the liquidity pool is in the state (x,y), the instantaneous price of one unit of crypto asset is
The above (1)-(3) are the three most fundamental relationships for understanding AMMs from the perspective of the liquidity pool state. AMMs can also be understood from two other perspectives, both of which provide new insights into the intrinsic logic of AMMs.
First, from the investor's perspective. Investors can view AMMs as a "black box," primarily concerned with how much crypto asset Y they can obtain by exchanging an amount of crypto asset X, denoted as △x, with the AMM. If two AMMs can provide the same amount of crypto asset Y for the same amount of crypto asset X, then from the investor's perspective, these two AMMs are equivalent.
Figure 1: Uniswap v3 Liquidity Pool
Second, from the liquidity provider's perspective. The concern for liquidity providers is how much liquidity needs to be provided at a certain price level to support AMM activities. From (1) and (3), it can be seen that the liquidity pool can be expressed as a function of the instantaneous price p(x):
However, optimizing liquidity usage also comes with costs, primarily reflected in the fact that Uniswap v3 relies on specific ranges. Only within these ranges do investors experience consistency. Besides instantaneous price and average price, another important indicator for investors is the impact of the trading pair's instantaneous price, defined as the slippage function:
It can be proven that for both and Uniswap v3, the slippage function equals
The Significance of Conditional Liquidity for AMMs and DeFi
The support of AMMs for conditional liquidity comes from two aspects.
First, the prices of crypto assets change continuously, and transactions only occur within local price ranges during any time period. Liquidity providers only need to provide liquidity within these ranges to support AMM operations. If AMMs used global liquidity, there would inevitably be "dead inventory" in any price range, reducing the efficiency of liquidity usage. Uniswap v3 alleviates the burden on liquidity providers by clearing "dead inventory," while providing investors with the same trading functionality within local price ranges, thus representing a Pareto improvement.
Second, the application of smart contracts allows liquidity providers to offer liquidity differentially based on potential future scenarios. If liquidity providers are sufficiently rational, the distribution of liquidity across different price ranges will effectively reflect the market's expectations for price movements. More liquidity will gather in those price ranges with higher probabilities. According to (10), this will reduce the slippage function (k increases, s decreases), thereby providing investors with a better trading experience.
Liquidity providers who choose these price ranges will share more transaction fees generated from trading. In contrast, in those price ranges with lower probabilities, liquidity providers effectively provide investors with tail insurance. Thus, the market mechanism drives the supply of liquidity, maximizing the efficiency of liquidity allocation. Of course, this process is also accompanied by complex games among liquidity providers.
A similar logic applies to other areas of DeFi. DeFi projects use over-collateralization to manage credit risk in decentralized, trustless environments, transforming credit risk into liquidity risk caused by over-locked collateral, and dynamically monitoring the sufficiency of collateral based on changes in crypto asset prices.
However, over-collateralization primarily addresses situations where crypto asset prices drop significantly. In cases where crypto asset prices rise, credit risk is low. Therefore, it may be considered to introduce conditional collateral in DeFi projects that use over-collateralization through smart contracts. For example, collateral could only be used when the price of the crypto asset falls to a certain level, allowing for free use at other times. This would improve the efficiency of collateral usage. Conditional collateral essentially provides tail insurance for significant drops in crypto asset prices.
In summary, in the DeFi space, smart contracts can allow the same crypto asset to serve different roles under different future scenarios. For instance, an ETH holder can commit to providing liquidity for an AMM within a certain price range while also committing to providing collateral for a decentralized lending platform when the price of ETH drops to a certain level. As long as these two scenarios do not occur simultaneously, this "dual-use" approach is valid. Essentially, this is the application of Arrow-Debreu securities thinking in the DeFi space, which will bring new innovation opportunities to DeFi.
Original link: https://www.chainnews.com/articles/721808679213.htm