IOSG Insights: The Outlet and Challenges of AMM in the Era of Post-Liquidity Mining

IOSG Insights: The Outlet and Challenges of AMM in the Era of Post-Liquidity Mining

Loading

Simple design and easy understanding are the key advantages of Uniswap. On the other hand, emerging AMMs inevitably become more and more complex due to their attempts to improve capital efficiency.

Original Title: “IOSG In-Depth Research | Potential Risk Loss of AMM Agreement in the Era of Post-Liquidity Mining”
Written by: IOSG Ventures

In this article, we will mainly study the liquidity provider (LP) in the AMM protocol, especially in the post-liquidity mining era, as an LP may face potential losses. Most of Uniswap v2’s TVL (approximately US$2.3 billion) is concentrated in four fund pools built for liquid mining, which account for a large proportion of the entire platform. Currently Uniswap’s LPs don’t care much about losses, because they are compensated by valuable tokens and transaction costs that cannot be underestimated. However, as mining ceases, the potential loss as an LP will become a more concern for everyone.

The choice of the post-liquidity mining era-AMM?

Liquidity mining has been proven to be an effective incentive mechanism for the cold start protocol. Recently, we noticed one of the craziest liquidity mining events in DeFi’s not-long history: Uniswap has made several successful forks ( Such as Sushiswap), launched its own governance token. Every address that has ever called Uniswap v1 or v2 contracts is eligible to receive 400 UNI tokens, which also includes more than 12,000 addresses that have submitted failed transfers.

In addition, Uniswap’s liquidity mining was stopped on November 17, and UNI tokens were allocated to four pools: USDC/ETH, ETH/USDT, DAI/ETH and WBTC/ETH. The community gave an extremely enthusiastic response, and TVL (Total Value Locked) was pushed to 3 billion US dollars!

Uniswap v2 history TVL

IOSG in-depth research | potential risk loss of AMM protocol in the post-liquidity mining era

Based on the hype of UNI token mining, coupled with the impression that Uniswap is considered by the public as the backbone of the DeFi ecosystem , it has attracted billions of dollars in investment from investors. With the assistance of a huge amount of funds, Uniswap provides the most competitive price in large transactions. For example, if you sell 1,000 ETH, Uniswap will be one of the exchanges offering the best price .

On the other hand, the new automated market maker (AMM) solution is further promoting the development of this field. It is worth mentioning that on Uniswap, ETH/USDC liquidity exceeds 560 million US dollars. However, for the same trading portfolio, DODO, which has about US$8.6 million in liquidity, can provide the same competitive price as Uniswap. For example, if you exchange 1000 ETH for USDT, COFIX will provide a price similar to Uniswap, although the liquidity is several times smaller than Uniswap.

IOSG in-depth research | potential risk loss of AMM protocol in the post-liquidity mining eraSource: DeBank

It can be seen from the above that compared with Uniswap v2, the new AMM model is more capital efficient. For Uniswap v2 to remain competitive, it must maintain a higher capital than its competitors. However, once liquidity mining stops, can Uniswap v2 continue to maintain the status quo? Will the community make a choice in the future?

Uniswap v2, DODO, COFIX

IOSG in-depth research | potential risk loss of AMM protocol in the post-liquidity mining era

A framework for defining the impermanence loss of AMM liquidity providers

What kind of losses did Uniswap’s LP suffer? The widely used term used to describe this type of loss is: impermanent loss. It is “impermanent” because theoretically it will disappear (not happen often) in case the relative price between the provided tokens recovers. Impermanence loss usually refers to the value lost due to the provision of liquidity-the difference between the actual value of assuming that users hold tokens outside the pool and staking these tokens into the pool.

In more detail, price discovery often occurs in the external market, and Uniswap relies on arbitrage to converge AMM prices with market prices. However, arbitrage profits are at the expense of the liquidity provider’s interests. Unless the external price of a particular asset pair returns to the same ratio as when the LP entered the pool, he will not be able to recover from this loss.

example 1

Suppose the initial balance is an XYT/USDC pair of 10 XYT and 1,000 USDC (price 1XYT=100 USDC). At the same time, assume that individual investors hold wallets of 10 XYT and 1,000 USDC.

What happens if the XYT market price soars to 110 USDC?

The pool will provide an arbitrage opportunity because traders can withdraw the undervalued XYT from the pool until the price converges with the market price. Specifically, traders will withdraw approximately 0.47 XYT from the pool, so that the price of each XYT token will reach 110 USDC. Note that the amount required to move the price to a certain level is determined by the formula (curve) used by the pool. The new balance in the pool is about 1048.81 USDC and 9.53 XYT token. Considering the new price XYT=110 USDC, the total value is about 2,097 USD. On the other hand, an individual investor holding 10 XYT and 1,000 USDC in his/her wallet will have a portfolio value equal to US$2,100, which means an impermanence loss of approximately US$3.

IOSG in-depth research | potential risk loss of AMM protocol in the post-liquidity mining eraXYT/USDC-hypothetical pool

Introduction to impermanent loss:

  • Definition: the difference between passively holding tokens and providing liquidity to the pool
  • Reason: arbitrage adjusts the currency price of the fund pool

DODO and COFIX represent a new type of AMM, which does not rely on arbitrage to adjust the asset ratio in the asset pool, but directly obtains the price from the oracle. To be consistent, let’s see what happens if we put the above example in DODO/COFIX.

Example 2

Suppose the initial balance of XYT/USDC pair is 10 XYT and 1,000 USDC (price 1 XYT=100 USDC). At the same time, assume that individual investors hold wallets of 10 XYT and 1,000 USDC.

What happens if the XYT market price soars to 110 USDC?

The pool of funds will not provide arbitrage opportunities, because the predicted opportunity to adjust the price, the LP’s balance of payments will not change due to external price changes. The preference of token holders between providing liquidity to the pool and just holding the token in the wallet is indistinguishable (ignoring transaction fees).

Therefore, the new AMM model is not prone to impermanence loss, but this does not mean that we provide liquidity for the new AMM model without loss.

Loss characteristics of the new AMM model-COFIX example

Example 3

To illustrate, assume another example where XYT token is worth 100 USDC. Since COFIX does not depend on the ratio of tokens in the pool to determine the price, let us further assume that the token balance is equal to 10 XYT and 500 USDC, and assume the value of the fund pool is 1,500 USD.

If Alice deposits 5 XYT more, the pool value will jump to $2,000 and she will receive 25% ownership. Since Alice is the owner of the fund pool, she needs to bear the risks associated with the two tokens in the pool due to the particularity of the COFIX mechanism.

Assuming again that the price of XYT token rises to 110 USDC, the pool value will become:

15 XYT*110 USDC+500 USDC=2,150 USD

Alice owns 25% of the fund pool and now has:

0.25*2,150 USD=537.5 USD

However, if she has a single token exposure, she can exit the fund pool with $550. On the other hand, if the price of XYT token plummets, she will have some protection because she is exposed to the mixed pool between XYT and USDC, not just XYT token.

Example 4

In addition, a feature of the COFIX mechanism is that there is no bonding curve, and large transactions will not be penalized. Therefore, extreme situations may occur in situations where the dealer completely exhausts the supply of XYT before the price increases. Suppose again that the initial price XYT=100USDC, and the specific trader Bob who wants to get XYT token exposure. Bob can buy all XYT tokens for $1500, leaving the pool to 0XYT and 2,000 USDC. Later, if the price of XYT jumps to 110 USDC, Alice will have zero exposure to this increase.

Summary of COFIX risks:

  • COFIX does solve the problem of Uniswap’s impermanence
  • However, the risk of providing liquidity on COFIX is exposed in the capital pool, rather than a single token.
  • Similarly, the pool of funds can be completely exhausted from the rise of one of the tokens, because COFIX does not distinguish large transactions (that is, there is no joint curve).

Loss characteristics of the new AMM model-DODO example

DODO LP does not need to worry about the above risks, because DODO allows a single token exposure, not pool ownership.

However, it should be noted that due to the number and frequency of transaction activities, the number of tokens at any point in time may be different from the number of tokens initially deposited in the pool.

In order to rebalance the fund pool, DODO’s mechanism encourages traders to sell insufficient tokens to the fund pool by increasing the price above the market price.

As shown in the WBTC/USDC pool example, this mechanism can well reserve the principal for the liquidity providers on both sides of the pool and allow wbtc or usdc LP to passively earn market profits.

IOSG in-depth research | potential risk loss of AMM protocol in the post-liquidity mining eraWBTC/USDC pool, LP ownership,
Source: https://DODO-pool-tracker.vercel.app/

However, looking at the YFI/USDC pool will reveal that not everything is perfect. In theory, if one side of the fund pool is below 1, the other side should be above 1. Both sides of the YFI/USDC pool are significantly lower than 1, which means that the liquidity providers of both pools have suffered losses.

IOSG in-depth research | potential risk loss of AMM protocol in the post-liquidity mining eraYFI/USDC pool, LP ownership, source: https://DODO-pool-tracker.vercel.app/

The main reason for these losses is that DODOs cannot rebalance the part of the pool that is in short supply in a timely manner. In order for the DODO mechanism to work as expected, a quick response to the incentives provided by DODO (ie, rapid rebalancing) is essential, especially for tokens with violent price fluctuations. Because the longer the token imbalance, the greater the chance of a major change in the market price. As shown below, changes in market prices during these periods may harm the value of LPs.

Example 5

Suppose again that there are 10 XYT and 500 USDC in the fund pool, and 1 XYT is 100 USDC. If the current balance of XYT token drops to 9 XYT, DODO’s goal is to rebalance the supply of XYT to 10. The way to do this is to increase the price of XYT to a level higher than the market price to encourage traders to sell XYT tokens. Back to the pool.

However, if XYT appreciates to $110 before rebalancing, it is impossible to increase the initial supply of XYT to $10 without extracting value from USDC LP.

1. Initial balance: 10 XYT &500 USDC

2. The balance after the first transaction: 9 XYT &600 USDC

The price of XYT jumped to $110 before rebalancing. At this time, DODO does not have enough resources to rebalance the XYT end of the pool. Therefore, it is possible to increase the total XYT to 10 only by sacrificing the usdc side of the pool.

3. Assuming that a trader carrying 1 XYT to the pool will result in a new balance of 1 0 XYT&488 USDC; in this case, USDC LP will lose ~12 USDC cumulatively. (Simplified calculation)

What usually happens is that the rebalancing occurs before the price rises. This will bring both sides of the pool close to the initial balance of 10 XYT and 500 USDC. On the other hand, before the rebalancing, the decline in the price of XYT will bring profits to the LP in the above scenario, because DODO will be able to restore the pool on the XYT side when the cost is less than 100 USDC, resulting in 10 XYT and >500 USDC Balance.

When the supply of a token in the pool is insufficient, DODO’s position is essentially a short position in the token , because it will cause losses as the price rises, and gains as the price depreciates.

Example 6

In addition, XYT LP may suffer losses in the following situations:

1. Initial balance: 10 XYT&500 USDC

2. The balance after the first transaction: 11 XYT&400 USDC

As mentioned earlier, having an undersupply USDC side in the pool is similar to having a short position in the USDC. Therefore, a drop in the price of XYT to 90 USDC will mean a relatively strong USDC and a loss of capital pool at the same time.

XYT=90 USD, DODO does not have enough resources to rebalance the USDC side of the pool. Therefore, only by sacrificing the XYT side of the pool can the total USDC reach 500.

3. Assuming that the trader brings 100USDC to the pool, a new balance will be generated. : ~9.86 XYT and 500 USDC, LP loss is ~0.14 XYT (simplified calculation)

In the same way, before rebalancing, the price increase of XYT will bring profit to LP in the above-mentioned situation, because it means the relative weakness of USDC.

As shown in the example above , effective rebalancing is essential to protect the value of LP and minimize risk. Otherwise, DODO itself has a short position on one side of the pool and may generate profits/losses based on market fluctuations. In contrast, when the pool is in equilibrium, DODO is market neutral.

Returning to the YFI/USDC pool, the reason for the loss was the inability to maintain a neutral position in the market, so the risk of large fluctuations in the YFI token was too large.

Another potential reason for the loss of YFI/USDC is that it is vulnerable to the vulnerability of oracle advance trading. Since DODO relies on Chainlink to feed prices, traders can observe that the price of a specific token in the oracle will rise in the next block, and a large number of tokens will be extracted from the pool, but they will be sold immediately after the update. This behavior will bring arbitrage to traders and loss to DODO LP.

Example 7

1. Preliminary balance: 10 XYT&500 USDC

The price of XYT will rise to $110 in the next block.

2. The trader trades ahead of the oracle and gets 1 XYT from the pool (for simplicity).

3. New balance: 9 XYT &600 USDC

Price officially updated

At this time, DODO does not have enough resources to rebalance the XYT side of the pool. Therefore, it is only possible to increase the total XYT to 10 at the expense of the USDC side of the pool.

4. The trader exits the position after the update locks ~12 USD profit, new balance: 10 XYT &~488 USDC

USDC LP will lose ~12 USDC

Although the final results of Example 5 and Example 7 are the same, the latter is much more harmful to LP. The trader in Example 5 is likely to be classified as a random transaction flow and has no ability to predict the direction of the market. Therefore, it is acceptable to be the counterparty of this type of dealer. On the contrary, the trader in Example 7 is an information trader (arbitrageur) and will definitely cause losses to the liquidity provider. The YFI/USDC pool is significantly lower than 1 on both sides, which may mean that the cause is information traders (arbitrageurs) rather than random transaction flows.

Nevertheless, DODO does provide a single token exposure, and LP must pay attention to the characteristics of another token pool. . For example, theoretically, due to a single token exposure, if you are a USDC LP, you will not care whether the other tokens in the pool are WBTC or YFI. However, in practice, this difference is huge. The more unstable the other tokens in the pool, the greater the risk exposure.

Summary of DODO risks:

  • DODO solves Uniswap’s impermanent loss characteristics, and it is not susceptible to the same loss as COFIX, because it provides a single token exposure.
  • However, when DODO cannot effectively rebalance the token supply, LP will be indirectly exposed on the other side of the pool. In this case, DODO LP may make profits/incur losses based on market price changes.

  • Finally, DODO LP will definitely suffer losses if the arbitrageur succeeds in trading ahead of the price.

The losses of COFIX and DODO LP mentioned above are impermanent in nature, because if price changes are beneficial to market makers, they may disappear or even not necessarily exist. However, we cannot categorize them as impermanent losses according to the previously discussed definition, but can define them as market-making risks specific to each agreement.

Below we summarize the risk characteristics of each of the above platforms.

IOSG in-depth research | potential risk loss of AMM protocol in the post-liquidity mining era

Risk hedging-the key point of the sustainable development of the AMM agreement

Market making is not a risk-free activity, whether it is using the order model or the AMM agreement model. In any case, LP needs to be aware of potential losses in adverse circumstances. Without understanding the risks, the LP will not be able to accurately determine the expected rate of return of the mining funds, nor will it be able to properly hedge its positions.

In terms of hedging, the growth of the decentralized options market can provide AMM LP with more necessary tools to hedge its risks. For example, AMMS can automatically offset positions through specific token derivatives or derivatives of highly correlated assets. In Example 5, after the second step of the transaction (before the price increase), DODO LP may automatically make a call option on the XYT token to offset the risk exposure. Similarly, COFIX LP may wish to purchase call options on the XYT token in Example 4 to obtain positive exposure to the token. On the other hand, hedging can be costly, so hedging can unnecessarily squeeze profit margins.

The factors to be considered here include risk appetite, recent transaction size, characteristics of counterparties and underlying assets. Obviously, in the DODO example scenario, the more tokens in the pool are consumed, the more you need to hedge the risk of token upwards. Similarly, whether the transaction flow is random or the amount of information is large enough will also affect the demand for hedging. At present, AMM cannot classify transaction flows, but the introduction of machine learning to analyze historical order flows from specific addresses may enable AMM to obtain this information. Finally, if the underlying asset is relatively stable, the risk is less, and the need to offset the directional position is also less.

COFIX is the first company to provide hedging options for LPs.

Conclusion

Simple design and easy understanding are the key advantages of Uniswap, which has attracted a lot of LP and capital. On the other hand, emerging AMM solutions are inevitably becoming more and more complex due to attempts to improve capital efficiency. Nevertheless, in these AMM solutions, we believe that any market making activities will bring potential losses. LP must pay attention to these losses and analyze and hedge their risks according to their own risk appetite.

In such a fast-paced field, innovation is always one step ahead. With liquid mining incentives to complete its initial mission of guiding agreements and attracting early users, the real game has just begun. For the AMM agreement, we need more professional analysis and hedging frameworks and tools to promote its sustainable and extensive application.

Special thanks: DODO and Longhash for their valuable suggestions!

Disclaimer: DODO, 1inch, and Kyber are IOSG portfolios.

Source link: mp.weixin.qq.com