< Back to all articles

Hidden Problems of Automated Market Makers

January 9, 2024

DeFi projects have long explored alternatives to traditional order books in search of more efficient and user-friendly liquidity solutions. While decentralized exchanges (DEXes) offer independence and remove third-party control, they also lose access to the deep liquidity of centralized exchanges (CEXes). As with traditional markets, high liquidity ensures price stability and smooth trading, whereas low liquidity results in volatility, slippage, and delays. Automated Market Makers (AMMs) emerged as a powerful solution, addressing several limitations of CEXes. However, they also introduce unique challenges for both users and liquidity providers.

What are AMMs?

AMMs first gained popularity on Ethereum and EVM-compatible networks but have since been adopted across various blockchain ecosystems. This method of exchanging assets aligns with the core principles and values of Ethereum and cryptocurrency in general, prioritizing decentralization and accessibility for all users who wish to participate and innovate.

An AMM is an autonomous protocol that automates the process of matching orders and replaces traditional order books. With AMMs, users can exchange assets twenty-four hours a day by trading against liquidity pools, which are crowdsourced pools of coins and tokens locked in smart contracts. These pools help maintain adequate levels of liquidity and facilitate speedy transactions, making DEXes more robust and efficient.

However, such an approach also means that DEXes highly depend on users to provide crypto assets in pools. That is why DEXes often need to create incentives that encourage users to supply their tokens to specific pools. Various incentives help to ensure adequate liquidity even for the rarest crypto assets.

In order to determine prices in liquidity pools, DEXes use mathematical formulas, which can vary from one exchange to another. By adjusting these formulas, liquidity pools can be optimized for different purposes, enabling DeFi projects to achieve their specific goals.

Liquidity Pool Imbalance

The poor concentration of liquidity in specific pools and the imbalance between liquidity pairs can pose substantial risks to users of decentralized exchanges. When the liquidity is imbalanced, some pools or assets may have much more liquidity than others, making it challenging for traders to swap assets at favorable rates and in an adequate time frame. The longer pools remain imbalanced, the longer the DEX functions unreliably, causing dissatisfaction among users and their possible outflow to other platforms. 

Even though AMMs are designed to balance pools automatically, rebalancing can sometimes be problematic due to unfavorable market conditions and the unavailability of sufficient liquidity. So, it is recommended to pay attention to available liquidity and market situation during trading and use tools that can help to protect from disadvantageous trades.

High Gas Costs

The soaring popularity of decentralized platforms comes with a notable challenge: high gas fees. This phenomenon, driven by networks' congestion and excessive demand, negatively affects user experience and prompts critical reflections on scalability solutions currently being developed or implemented to resolve this issue.

The problem of high gas costs is strongly linked to scalability issues that many networks are experiencing nowadays. An overwhelming demand for transactions, which exceeds a network's capacity, can result in notable delays. Consequently, slow and unpredictable transaction execution can negatively affect both traders and liquidity providers, hindering their ability to make use of profit opportunities coming their way.

Furthermore, high gas fees can create a lack of inclusivity by excluding users who find high gas costs especially unbearable, mainly small-scale traders. For them, trading on DEXes may sometimes be completely uneconomical. Therefore, it can limit their access to DeFi products and services, restricting their ability to take advantage of opportunities present in the DeFi space.

Impermanent loss

The AMMs' pricing mechanisms constantly work on rebalancing pools and calculating adequate pricing, which sometimes can cause problems, one being impermanent loss (IL). IL is the difference in value over time between depositing tokens in a liquidity pool and holding them in a wallet. This loss occurs when the market price of tokens inside liquidity pools diverges in any direction, making liquidity provision unprofitable. 

IL concerns many liquidity providers who are thus hesitant to take part in a market and take a bet against volatile conditions. This risk is even more notable when the price of the assets in the liquidity pool experiences substantial fluctuations. In order to avoid impermanent loss, some traders even opt for other methods of providing liquidity, like using traditional order books or participating in liquidity pools with different risk-reward dynamics or some sort of insurance against IL.

The complete elimination of impermanent loss in pools has proven to be impossible. However, there are steps that providers can take to minimize this risk. For instance, they can choose to stake stablecoin pairs, whose prices typically fluctuate just a little. Doing so can greatly reduce the volatility risks, but providers' profits may also be notably smaller than with volatile assets. 

Besides stablecoins, choosing pairs with correlated price movements is also a great idea. Conducting thorough research and selecting assets with a proven track record of maintaining their value is essential. This way, liquidity providers will be able to provide liquidity with confidence, knowing that their investment is relatively safe from market volatility.

Price Slippages & MEV Attacks

The rates at which trades are executed are another hidden risk of AMMs. There are two aspects crypto users should pay great attention to: price slippages and MEV. Price slippage is a term that describes the difference between the price a trader expects to receive for an asset and the actual price at which the trade is executed. This variance occurs due to the liquidity pool's limited availability of required assets. The impact of slippage can be pretty significant, particularly for large trades. It can result in unpredictable costs for traders and lead to suboptimal execution prices, harming their trading strategies.

MEV (Maximal Extractable Value) is the highest value that can be extracted from manipulating transactions during block production. This term often refers to the profits that traders can gain by rearranging awaiting transactions. Since AMMs make pending transactions public before execution, MEV searches receive an excellent chance to exploit transactions waiting in the mempools. Any manipulations with transactions can lead to notable price changes, negatively affecting targeted traders. It means traders with advanced knowledge of upcoming transactions (thanks to using MEV bots or sophisticated algorithms to scan mempools) may take advantage of the situation. Additionally, slippage can occur, which can impact the executed price.

Such risks can lead to financial losses, ultimately eroding trust in the fairness of the DeFi trading environment. These risks are even more severe during periods of high volatility or when interacting with pools with low liquidity. Traders concerned about MEV attacks and price slippage may choose to use platforms with more advanced security measures, including Kinetex, or employ alternative trading methods that offer better protection against these risks (limit orders, P2P trading, etc.).

Final Thoughts

AMMs have been a helpful tool in DeFi, which once transformed decentralized trading, providing users with more flexibility. However, it is essential to acknowledge the hidden issues of this approach, such as MEV attacks, IL, etc., that require innovative solutions. As the DeFi community navigates these complexities, a concerted effort toward research, development, and risk mitigation will be crucial to ensuring the long-term sustainability and resilience of AMMs, associated solutions, and the DeFi ecosystem as a whole.