Economic Risks in AMMs: A Comprehensive Risk Analysis

Unveiling the Complex Economic Risks in Automated Market Makers

Juan Pellicer
IntoTheBlock
8 min readJan 31, 2024

--

As we explore the intricacies of DeFi risk management, it becomes increasingly evident that Decentralized Exchanges (DEXs), and more specifically, Automated Market Makers (AMMs), are key to the DeFi ecosystem. AMMs represent an innovative development in DeFi, notable for their alignment with blockchain technology and their ability to streamline trading through automation. However, this innovation is not without its challenges. While AMMs such as Curve or Uniswap use mathematical algorithms to set prices and are sustained by user-provided liquidity pools, they depart from the traditional order book model, introducing unique economic risks. These risks include liquidity imbalances and price slippage, which can significantly impact both liquidity providers and traders.

AMMs, while technologically simpler compared to other DeFi primitives like Money Markets or Algorithmic Stablecoins, are governed by a bonding curve that defines the price-supply relationship in a permissionless environment. This simplicity allows direct user interactions like coin swaps and liquidity provisioning. Historically, the economic risks linked to AMMs were deemed minimal due to the predefined curve in smart contracts. Nonetheless, this perception is a misconception. The economic dangers associated with AMMs can be substantial, on par with or exceeding those found in lending protocols. For instance, traders in AMMs can face significant price impact, leading to considerable losses similar to the risks encountered by depositors in lending protocols who might not be able to withdraw their assets under certain conditions.

In addition, stableswap pools often witness high price impacts during coin exchanges, especially since many stablecoins or pegged assets rely on these pools as their primary liquidity source. Converting these coins back is primarily facilitated through these stableswap pools, making them critical in the liquidity ecosystem. Our aim is to dissect these economic risks and their implications.

Liquidity Imbalances and Price Impact

One of the primary risks in AMMs is the potential for liquidity imbalances and consequential price slippage. For instance, a pool exhibiting consistent inflows of a single token could signal an imbalance, leading to disproportionate price impacts and possibly affecting the pool’s stability. This scenario is particularly crucial in pools that are primary liquidity sources for certain coins, as it can also increase the risk of de-pegging events for stablecoins or pegged assets. These netflows can be observed through the Net Liquidity Flows metric, which details the inflows and outflows of liquidity in individual pools.

A pool that displays constant inflows of just one of its tokens might indicate an imbalance in the supply and demand dynamics of that particular token within the pool. From an economic risk assessment perspective, this could signal a diminished demand for the other token(s) in the pool. Such a scenario can lead to an imbalance of the pool and a disproportionate price impact on trades, potentially affecting the pool’s overall stability. Moreover, it might also increase the risk of de-pegging events in pools involving stablecoins or pegged assets. This is key for pools that are the predominant source of liquidity for a coin.

Whale Concentration Risk

Another major risk involves the concentration of large deposits in AMM pools. High concentrations of ‘whales’ can lead to significant risky situations where the pricing dynamics of a pool could change substantially if a large depositor withdraws their assets. This could lead to a large decrease in liquidity, increasing the price impact that a large trade could incur related to the initial price impact realized when initially deposited in the pool. This applies to those cases where a liquidity provider would deposit starting with only one of the two assets required for deploying liquidity.

The provided example demonstrates that over 61% of the liquidity in the FRAX — USDC pool is controlled by a single address linked to the Frax Convex integration, indicating a significant concentration. This situation poses a risk: if Convex Frax encounters problems, such as a sharp drop in reward coin prices, the concentrated liquidity might be withdrawn quickly. This potential migration of liquidity could expose the pool to heightened volatility and increased risk of price impact due to diminished liquidity.

Arbitrage Activities and Market Efficiency

The stability of pegged values is a key aspect, with price de-pegging events being common in cryptocurrency markets. Monitoring arbitrage activity allows for understanding market efficiency and getting a glimpse of how often pools are traded to return to their fair price. A proxy of this efficiency metric is the number of unique addresses that are arbitraging the pool over time, regardless of the number of transactions.

A higher count of unique addresses suggests increased arbitrage activity, which may indicate substantial price differences being exploited by traders. This, in turn, could point to market inefficiencies and thus higher volatility. It is a useful tool to gauge the dynamic interactions and market behaviors within the pool or protocol. As can be seen below, a total of 31 arbitrageurs have interacted with the crvUSD — USDT pool, performing a total of 10 arbitrages in the last day.

Monitoring Price Peg Stability

As we mentioned, many coins naturally experience periods of limited price de-pegs. It’s important to note that these episodes, while potentially concerning, are not always indicative of a fundamental problem; similar instances may have occurred historically. To evaluate if a price de-peg might be relevant, it is helpful to assess the duration for a coin’s price to realign with its peg following a de-pegging event. This helps in evaluating the resilience and stability of pegged values over time.

The indicator “Time Elapsed For Peg To Be Restored” tracks the duration required for a coin’s price to realign with its peg following a de-pegging event. For instance, consider the USDT-DAI case: this specific measure not only quantifies the frequency of de-pegging occurrences for these coins but also details the extent of price fluctuation during each event.

In this example, a notable trend emerges regarding the price deviations between USDT and DAI. Predominantly, these deviations are short-lived, typically resolving within a 10-hour window. Furthermore, the extent of these price fluctuations is generally modest, rarely exceeding a 1.1% discount. This pattern suggests that futures price deviations within these parameters can be regarded as routine fluctuations. On the other hand, deviations that significantly exceed these thresholds — either in duration or magnitude — may signal an atypical, or ‘tail’ event. Such occurrences could represent more substantial market shifts or underlying issues requiring special attention.

Market Depth and Liquidity Analysis

It is vital for those planning large trades to evaluate the market’s liquidity and health of a coin. The market depth of a coin evaluates the trading volume a market can handle for both buying and selling at a specific price difference percentage. It assesses the market’s depth and liquidity by measuring the price impact, which is the variance between the expected and executed trade prices.

A higher trading volume at a given price impact percentage suggests greater market liquidity, indicating that large trades can be carried out with minimal effect on the asset’s price. The chart above depicts how a swap from stETH to ETH can handle a 1% price impact loss at an amount of 12,900 ETH, around $28.6M at current prices. This is a very good overview of the losses incurred when upscaling trading size in a pool.

Exit Fee Evolution and Withdrawal Risks

Withdrawal risks present a significant concern, especially when large depositors or “whale” addresses decide to remove their liquidity. Such withdrawals can drastically affect the market, notably altering the realized prices on subsequent swaps. The ramifications of these large-scale withdrawals extend to the pool stability and risk exposure for other participants.

Addressing this critical issue, an advanced indicator has been developed to provide comprehensive insights into these withdrawal risks. This tool leverages simulations grounded in historical data, current market conditions, and a variety of modeling techniques to predict the outcomes of major liquidity withdrawals. These simulations consider several factors, including the size of the withdrawal, the composition of the liquidity pool, trading volumes, and overall market dynamics. The primary goal of this indicator is to offer a clear understanding of potential market risks and the conditions of price impact that might emerge from significant withdrawals.

The indicator shows an example of a liquidity provider owning 20% of the stETH-ng pool, who could face a 15% loss if 45% of the pool’s liquidity were withdrawn. This scenario assumes that the provider wants to exit their entire position as ETH, highlighting the practical applications of the indicator in setting risk management strategies and anticipating market movements.

In conclusion, AMMs represent a sophisticated yet challenging element in the DeFi ecosystem, particularly for institutional participants or individual investors that trade in size. Its advanced algorithmic model, while pioneering, carries significant financial risks that can alter the risk perception among investors. Analytical tools and risk assessment solutions provided by IntoTheBlock, such as the Depeg Monitor and various indicators of liquidity and market depth, are essential in delivering comprehensive, real-time analytics. These tools are instrumental for institutions to effectively navigate the complex and volatile DeFi ecosystem, enabling them to make well-informed decisions for risk identification and mitigation.

About the IntoTheBlock DeFi Risk Radar

IntoTheBlock’s newly launched DeFi Risk Radar is a sophisticated tool for institutional-grade risk management in the DeFi sector. Developed through rigorous testing and partnerships, it addresses the significant economic risks within DeFi that have contributed to nearly $60 billion in losses.

The Risk Radar today supports nine key DeFi protocols and offers tailored economic risk metrics, high data granularity, an intuitive API and CSV data download functionality. IntoTheBlock’s expertise, gained from years of working with the largest institutions in crypto, strengthened the development of this tool, aimed at enhancing risk analysis and management in the DeFi markets. Additionally, we expect to release more protocols in 2024, expanding the scope and efficacy of our risk management solution.

If you want to know more about Risk in DeFi, We recommend downloading our latest report, which explores DeFi risk in detail.

--

--