IOSG Deep Research: Potential Risk Losses of AMM Protocols in the Post-Liquidity Mining Era

IOSG Ventures
2021-01-05 17:30:12
Collection
This article will mainly study liquidity providers (LP) in AMM protocols, especially the potential losses that an LP may face in the post-liquidity mining era.

This article was published on November 21, 2020, on the IOSG WeChat official account.

Building a new world, the bridge of the time.

Introduction

In this article, we will primarily study liquidity providers (LP) in AMM protocols, especially the potential losses that an LP may face in the post-liquidity mining era. Most of Uniswap v2's TVL (approximately $2.3 billion) is concentrated in four liquidity pools built for liquidity mining, which account for a significant portion of the entire platform. Currently, Uniswap's LPs are not very concerned about losses because they are compensated with valuable tokens and considerable trading fees. However, as mining stops, the potential losses for LPs will become a more pressing issue.

1. Choices in the Post-Liquidity Mining Era - AMM?

Liquidity mining has proven to be an effective incentive mechanism for cold-start protocols. Recently, we noticed one of the craziest liquidity mining events in the relatively short history of DeFi: after several successful forks (such as Sushiswap), Uniswap launched its own governance token. Every address that had ever called the Uniswap v1 or v2 contract was eligible to receive 400 UNI tokens, including over 12,000 addresses that had submitted failed transfers.

Additionally, Uniswap's liquidity mining stopped on November 17, distributing UNI tokens to four pools: USDC/ETH, ETH/USDT, DAI/ETH, and WBTC/ETH. The community responded enthusiastically, pushing the TVL (Total Value Locked) to $3 billion!

IOSG Deep Dive: Potential Risk Losses of AMM Protocols in the Post-Liquidity Mining Era

Historical TVL of Uniswap v2

Based on the hype around UNI token mining, combined with the perception of Uniswap as a pillar of the DeFi ecosystem, it attracted billions of dollars in investment. With such a large amount of capital, Uniswap provided some of the most competitive prices for large transactions. For example, if you sell 1,000 ETH, Uniswap would be one of the exchanges offering the best price.

On the other hand, new automated market maker (AMM) solutions are further driving the development of this field. Notably, on Uniswap, the liquidity for ETH/USDC exceeds $560 million. However, for the same trading pair, DODO, with approximately $8.6 million in liquidity, can offer competitive prices similar to Uniswap. For instance, if you exchange 1,000 ETH for USDT, COFIX would provide a price similar to Uniswap, even though its liquidity is several times smaller.

IOSG Deep Dive: Potential Risk Losses of AMM Protocols in the Post-Liquidity Mining Era

Source: DeBank

From the above, it can be seen that the new AMM models have higher capital efficiency compared to Uniswap v2. To remain competitive, Uniswap v2 must maintain a higher capital base relative to its competitors. However, once liquidity mining stops, can Uniswap v2 continue to maintain its status? Will the community make a choice in the future?

2. Uniswap v2, DODO, COFIX

IOSG Deep Dive: Potential Risk Losses of AMM Protocols in the Post-Liquidity Mining EraDefinition Framework for Impermanent Loss for AMM Liquidity Providers

What kind of losses do Uniswap LPs actually suffer? The widely used term to describe such losses is: impermanent loss. It is "impermanent" because theoretically, it will disappear (it does not happen frequently), provided that the relative prices of the tokens provided return to their original rates. Impermanent loss usually refers to the value lost due to providing liquidity—specifically, the difference between the value of holding tokens outside the pool and the actual value of those tokens when staked in the pool.

More specifically, price discovery often occurs in external markets, and Uniswap relies on arbitrage to converge AMM prices with market prices. However, arbitrage profits come at the expense of liquidity providers, and unless the external price of a specific asset pair returns to the same ratio as when the LP entered the pool, they will not be able to recover from this loss.

Example 1:

Assume an initial balance of 10 XYT and 1,000 USDC in the XYT/USDC pair (price 1 XYT = 100 USDC). At the same time, assume that an individual investor holds 10 XYT and 1,000 USDC in their wallet.

What happens if the market price of XYT skyrockets to 110 USDC?

The pool will provide an arbitrage opportunity because traders can extract the undervalued XYT from the pool until the price converges with the market price. Specifically, traders will extract approximately 0.47 XYT from the pool, bringing the price of each XYT token to 110 USDC. Note that the amount required to move the price to a specific level is determined by the formula (curve) used by the pool. The new balance in the pool will be approximately 1,048.81 USDC and 9.53 XYT tokens, considering the new price of XYT = 110 USDC, resulting in a total value of approximately $2,097. On the other hand, the individual investor holding 10 XYT and 1,000 USDC in their wallet will have a portfolio value of $2,100, which means the impermanent loss is approximately $3.

IOSG Deep Dive: Potential Risk Losses of AMM Protocols in the Post-Liquidity Mining Era

XYT/USDC - Hypothetical Pool

Introduction to Impermanent Loss:

Ø Definition: The difference between passively holding tokens and providing liquidity to the pool

Ø Reason: Arbitrage adjusts the price of the tokens in the pool

DODO and COFIX represent a new type of AMM that does not rely on arbitrage to adjust the asset ratios in the pool but instead directly obtains prices from oracles. To maintain consistency, let’s see what would happen if we applied the above example to DODO/COFIX.

Example 2

Assume an XYT/USDC pair with an initial balance of 10 XYT and 1,000 USDC (price 1 XYT = 100 USDC). At the same time, assume that an individual investor holds 10 XYT and 1,000 USDC in their wallet.

What happens if the market price of XYT skyrockets to 110 USDC?

The liquidity pool will not provide an arbitrage opportunity because the oracle adjusts the price, and the LP's balance will not change due to external price fluctuations. Token holders have no preference between providing liquidity to the pool and simply holding tokens in their wallet (ignoring transaction fees).

Thus, the new AMM model is less likely to experience impermanent loss, but this does not mean that providing liquidity to the new AMM model is without losses.

3. Loss Characteristics of the New AMM Model - COFIX Example

Example 3

To illustrate, let’s assume another example where the XYT token is valued at 100 USDC. Since COFIX does not rely on the ratio of tokens in the pool to determine prices, let’s further assume that the token balance equals 10 XYT and 500 USDC, and that the pool value is $1,500.

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

Again, assuming the price of the XYT token rises to 110 USDC, the pool value will become:

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

Alice owns 25% of the pool, now worth:

0.25 * 2,150 USD = 537.5 USD

However, if she had a single token exposure, she could exit the pool with $550. On the other hand, if the price of the XYT token plummets, she will have some protection because she is exposed to a mixed pool of XYT and USDC, rather than just the XYT token.

Example 4

Additionally, a feature of the COFIX mechanism is that there is no bonding curve, and large trades are not penalized. Therefore, extreme situations may occur if traders completely exhaust the supply of XYT before the price rises. Again, assume the initial price of XYT = 100 USDC, and a specific trader, Bob, wants exposure to XYT tokens. Bob can buy all the XYT tokens for $1,500, leaving the pool with 0 XYT and 2,000 USDC. Afterwards, if the price of XYT rises to 110 USDC, Alice will have zero exposure to this price increase.

COFIX Risk Summary:

Ø COFIX indeed addresses the impermanent loss issue of Uniswap.

Ø However, the risk of providing liquidity on COFIX is exposed to the pool rather than a single token.

Ø Similarly, the pool can be completely exhausted from one token's increase because COFIX does not differentiate between large trades (i.e., no bonding curve).

4. Loss Characteristics of the New AMM Model - DODO Example

DODO LPs do not need to worry about the above risks because DODO allows for single token exposure rather than pool ownership.

However, it is important to note that due to the number and frequency of trading activities, the number of tokens at any given time may differ from the initial number deposited into the pool.

To rebalance the pool, DODO's mechanism incentivizes traders to sell tokens that are in short supply to the pool by raising the price above the market price.

As shown in the WBTC/USDC pool example, this mechanism effectively preserves the principal for liquidity providers on both sides of the pool and allows WBTC or USDC LPs to passively earn market profits.

WBTC/USDC Pool, LP Ownership

IOSG Deep Dive: Potential Risk Losses of AMM Protocols in the Post-Liquidity Mining EraSource: https://DODO-pool-tracker.vercel.app/

However, looking at the YFI/USDC pool reveals that not everything is perfect. Theoretically, if one side of the pool is below 1, the other side should be above 1. Both sides of the YFI/USDC pool are significantly below 1, indicating that both liquidity providers in the pool have suffered losses.

YFI/USDC Pool, LP Ownership

IOSG Deep Dive: Potential Risk Losses of AMM Protocols in the Post-Liquidity Mining EraSource: https://DODO-pool-tracker.vercel.app/

The main reason for these losses is that DODOs cannot timely rebalance the undersupplied portion of the pool. For DODO's mechanism to operate as expected, a quick response to the incentives provided by DODO (i.e., rapid rebalancing) is crucial, especially for tokens with high price volatility. The longer the tokens remain unbalanced, the greater the chance of significant changes in market prices. As shown below, changes in market prices during these periods can harm LP value.

Example 5

Again, assume there are 10 XYT and 500 USDC in the pool, with 1 XYT valued at 100 USDC. If the current balance of XYT drops to 9 XYT, DODO's goal is to rebalance the supply of XYT back to 10, which is done by raising the price of XYT above the market price to encourage traders to sell XYT tokens back to the pool.

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

  1. Initial balance: 10 XYT & 500 USDC

  2. Balance after the first trade: 9 XYT & 600 USDC

The price of XYT skyrockets to $110 before rebalancing. At this point, DODO does not have enough resources to rebalance the XYT side of the pool, so it will only be possible to increase the total amount of XYT to 10 by sacrificing the USDC side of the pool.

  1. Assuming a trader brings 1 XYT to the pool, it will result in a new balance of 10 XYT & 488 USDC; in this case, the USDC LP will incur a loss of approximately ~12 USDC (simplified calculation).

What typically happens is that rebalancing occurs before the price appreciates. This would bring both sides of the pool closer to the initial balance of 10 XYT and 500 USDC. On the other hand, a price drop in XYT before rebalancing would yield profits for the LP in the above scenario, as DODO would be able to restore the XYT side of the pool for less than 100 USDC, resulting in a balance of 10 XYT and >500 USDC.

When a token in the pool is undersupplied, DODO's position is essentially a short position in that token, as it incurs losses with rising prices while generating profits with falling prices.

Example 6

Additionally, XYT LPs may incur losses in the following scenario:

  1. Initial balance: 10 XYT & 500 USDC

  2. Balance after the first trade: 11 XYT & 400 USDC

As mentioned earlier, having an undersupplied USDC side in the pool is similar to having a short position in USDC. Therefore, if the price of XYT drops to 90 USDC, it will mean a relatively strong USDC and simultaneous losses for the pool.

XYT = 90 USD, DODO does not have enough resources to rebalance the USDC side of the pool, so it will only be possible to increase the total amount of USDC to 500 by sacrificing the XYT side of the pool.

  1. Assuming a trader brings 100 USDC to the pool, it will result in a new balance: ~9.86 XYT and 500 USDC, with an LP loss of ~0.14 XYT (simplified calculation).

Similarly, a price increase in XYT before rebalancing would yield profits for the LP in the above scenario, as it would indicate relative weakness in USDC.

As illustrated in the examples above, effective rebalancing is crucial for protecting LP value and minimizing risk. Otherwise, DODO itself is in a short position on one side of the pool, and based on market fluctuations, it may incur profits/losses. In contrast, when the pool is balanced, DODO is market-neutral.

Returning to the YFI/USDC pool, the reason for the losses is the inability to maintain a market-neutral position, leading to excessive risk exposure to significant fluctuations in the YFI token.

Another potential reason for the losses in the YFI/USDC pair is vulnerability to oracle front-running. Since DODO relies on Chainlink price feeds, traders can observe that the price of a specific token will rise in the next block and extract a large number of tokens from the pool, only to sell them immediately after the update. This behavior will provide arbitrage opportunities for traders and losses for DODO LPs.

Example 7

  1. Initial balance: 10 XYT & 500 USDC

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

  1. The trader front-runs the oracle, extracting 1 XYT from the pool (for simplicity).

  2. New balance: 9 XYT & 600 USDC

Price officially updates.

At this point, DODO does not have enough resources to rebalance the XYT side of the pool, so it will only be possible to increase the total amount of XYT to 10 by sacrificing the USDC side of the pool.

  1. The trader exits the position after the update, locking in a profit of ~12 USD, with a new balance of: 10 XYT & ~488 USDC.

The USDC LP will lose ~12 USDC.

Although the final outcomes of examples 5 and 7 are the same, the latter poses a much greater threat to LPs. The trader in example 5 is likely to be classified as random trading flow, with no ability to predict market direction. Therefore, being a counterparty to such traders is acceptable. In contrast, the trader in example 7 is an information trader (arbitrageur), who will certainly cause losses for liquidity providers. The fact that both sides of the YFI/USDC pool are significantly below 1 may indicate that the cause is information traders (arbitrageurs), rather than random trading flow.

Nonetheless, DODO does provide single token exposure, and LPs must be aware of the characteristics of the other token in the pool. For instance, theoretically, if you are a USDC LP, you would not care whether the other token in the pool is WBTC or YFI. However, in practice, this difference is significant. The more volatile the other token in the pool, the greater the risk exposure.

DODO Risk Summary:

Ø DODO addresses the impermanent loss characteristics of Uniswap and is less susceptible to losses like COFIX because it provides single token exposure.

Ø However, when DODO cannot effectively rebalance token supply, LPs are indirectly exposed to the other side of the pool. In this case, DODO LPs may earn profits or incur losses based on market price fluctuations.

Ø Finally, DODO LPs will certainly suffer losses in the event that arbitrageurs successfully front-run the price feeds.

The losses of COFIX and DODO LPs are essentially impermanent because they may disappear if price movements favor the market makers, and they may not necessarily exist. However, we cannot classify them as impermanent losses according to the previously discussed definition; instead, we can define them as market-making risks specific to each protocol.

Below, we summarize the risk characteristics of each platform mentioned above.

IOSG Deep Dive: Potential Risk Losses of AMM Protocols in the Post-Liquidity Mining Era

4. Risk Hedging - Key Points for the Sustainable Development of AMM Protocols

Market making is not a risk-free activity, whether using an order model or an AMM protocol model. In any case, LPs need to be aware of potential losses in adverse situations. Without understanding the risks, LPs cannot accurately determine the expected return rates of mining funds, nor can they properly hedge their positions.

In terms of hedging, the growth of decentralized options markets can provide AMM LPs with more necessary tools to hedge their risks. For example, AMMs can automatically offset positions through specific token derivatives or derivatives of highly correlated assets. In example 5, after the second trade (before the price increase), DODO LPs might automatically buy a call option on the XYT token to offset their risk exposure. Similarly, COFIX LPs might want to purchase call options on the XYT token in example 4 to gain positive exposure to the token. On the other hand, hedging can be costly, so it may unnecessarily squeeze profit margins.

Factors to consider include risk preference, recent trading volumes, counterparty characteristics, and the characteristics of the underlying assets. Clearly, in the DODO example scenario, the more tokens consumed in the pool, the greater the need to hedge against upward risks in the tokens. Similarly, whether the trading flow is random or sufficiently informative will also affect the need for hedging. Currently, AMMs cannot classify trading flows, but in the future, introducing machine learning to analyze historical order flows from specific addresses may provide AMMs with this information. Finally, if the underlying assets are relatively stable, the risk is lower, and the need to offset directional positions is also smaller.

COFIX is the first company to provide LPs with hedging options: https://github.com/Computable-Finance/CoFiX-hedger

5. Conclusion

The simplicity and ease of understanding of Uniswap are key advantages that have attracted a large number of LPs and capital. On the other hand, emerging AMM solutions inevitably become increasingly complex as they attempt to improve capital efficiency. Nevertheless, we believe that any market-making activity within these AMM solutions will carry potential losses. LPs must be aware of these losses and analyze and hedge their risks according to their own risk preferences.

In such a fast-paced field, innovation always stays one step ahead. As liquidity mining incentives fulfill their initial mission of guiding protocols and attracting early users, the real game has just begun. For AMM protocols, we need more specialized analysis and hedging frameworks and tools to promote their sustainable application.

IOSG Deep Dive: Potential Risk Losses of AMM Protocols in the Post-Liquidity Mining Era Disclaimer: DODO, 1inch, Kyber are part of IOSG's portfolio.

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