CORE DEFI PRIMITIVES AND MECHANICS

The Foundations of DeFi From AMMs to Concentrated Liquidity

8 min read
#DeFi #Liquidity Pools #Decentralized Finance #Yield Farming #AMM
The Foundations of DeFi From AMMs to Concentrated Liquidity

Automated market makers (AMMs) are the engines that keep decentralized exchanges running without the need for traditional order books. At the heart of every AMM is a simple mathematical rule that balances two assets in a liquidity pool. Over the past few years, these rules have evolved from a constant product formula to more sophisticated models that allow liquidity providers to concentrate capital within specific price ranges. Understanding this evolution is key to navigating the DeFi landscape and making informed decisions about trading, liquidity provision, and protocol design.


How Automated Market Makers Work

An AMM operates by maintaining a pool of two tokens, say Token A and Token B. Traders swap one token for the other, and the pool ensures that the product of the reserves remains constant (or follows a chosen invariant). The most familiar example is the constant‑product formula used by early versions of Uniswap and Balancer:

[ x \times y = k ]

where (x) and (y) are the reserves of the two tokens and (k) is a constant. When a trader buys Token B with Token A, the pool’s reserves shift so that the equation still holds. This simple mechanism eliminates the need for order matching and allows anyone to add or remove liquidity at any time.

The cost of a trade is determined by the size of the swap relative to the pool’s depth. Larger trades move the price further from the pool’s initial value, producing higher slippage. Liquidity providers earn trading fees that are proportional to the amount of trading that occurs in their pool. In early AMMs, the entire pool’s capital was treated equally, meaning that each token was spread uniformly across all price levels.


Slippage and Impermanent Loss

Because the invariant forces a balance between the two assets, a change in the market price of one token leads to an unequal distribution of reserves. This creates the potential for impermanent loss—a temporary loss of value relative to simply holding the assets outside the pool. Impermanent loss is largest when price volatility is high and the pool’s liquidity is shallow.

Traders experience slippage, the difference between the expected price of a trade and the price actually executed. Slippage grows as the trade size approaches the pool’s depth. For a constant‑product AMM, slippage can be approximated by the formula:

[ \text{slippage} \approx \frac{S}{2L} ]

where (S) is the trade size and (L) is the liquidity of the pool. This relationship highlights why deep pools are attractive for both traders and liquidity providers.


Early AMM Innovations

Uniswap v1 introduced the constant‑product model, and Uniswap v2 added support for multiple pairs and removed the need for wrapped assets. Balancer added the ability to set custom weightings across multiple tokens, allowing for weighted pools that could emulate index funds.

However, both approaches treated liquidity as a flat distribution across all price levels. This made it difficult for providers to optimize capital efficiency. A provider could supply 100 ETH and 200 USDC in a pool that allowed the price to move anywhere from 0.1 USDC/ETH to 100 USDC/ETH, meaning that large portions of the capital would be inactive when the market price was far from the pool’s edges.


The Rise of Concentrated Liquidity

Uniswap v3, released in 2021, introduced the concept of concentrated liquidity. Instead of spreading capital evenly across the entire price curve, providers can now allocate liquidity to specific price ranges. For example, a provider could choose to supply liquidity only when the price of ETH falls between 1 500 USDC and 1 800 USDC.

This model has several immediate benefits:

  • Capital efficiency – Liquidity is no longer wasted at price levels that never occur. Providers can use the same amount of capital to earn fees in a narrower range.
  • Higher potential returns – Because more trades happen within the active range, the pool’s fee income increases for each unit of capital.
  • Greater flexibility – Providers can adjust their ranges as market expectations shift, making the model more responsive to volatility.

Below is an illustration of how a concentrated liquidity pool might look compared to a flat pool.

The Foundations of DeFi From AMMs to Concentrated Liquidity - concentrated liquidity pool

In the illustration, the blue bars represent the amount of liquidity active at each price level. The concentrated pool has most of its capital concentrated between 1 500 and 1 800 USDC, while the flat pool has a uniform distribution across all price levels.


How Does Concentrated Liquidity Work Under the Hood?

Uniswap v3’s invariant is still based on a constant product, but it introduces the notion of ticks. A tick is a discrete price point, and a provider specifies a tick range that defines the lower and upper bounds of the liquidity they are willing to supply. The pool’s state includes the current price tick, and liquidity is activated only when the price is within the chosen range.

When a trade pushes the price past the upper or lower tick of a provider’s range, that provider’s liquidity is “unleveraged” and becomes inactive. The provider can then choose to extend the range or withdraw the liquidity. Because the pool automatically tracks which ranges are active, traders receive the correct price regardless of which provider is supplying liquidity.


Fee Structure and Routing

Uniswap v3 introduced multiple fee tiers (e.g., 0.05 %, 0.3 %, 1 %) that allow liquidity providers to choose the fee that best matches the volatility and risk of the asset pair. Higher fee tiers attract more stable or low‑volatility pairs, while lower tiers are more competitive for volatile pairs.

Routing in a multi‑pool environment also became more sophisticated. Protocols can now evaluate a path that passes through multiple pools with different fee tiers and price ranges, selecting the route that maximizes expected return after accounting for slippage and fees.


Practical Implications for Traders

  1. Slippage is still a concern – Even with concentrated liquidity, large orders can move the price outside a provider’s range, resulting in higher slippage. Traders should monitor pool depth at the specific price range they target.
  2. Fee tiers matter – Choosing a pool with a lower fee tier may reduce costs but increase slippage if the pool is shallow. Conversely, a higher fee tier might provide deeper liquidity, reducing slippage.
  3. Price oracles and data – Many protocols rely on AMM price feeds for on‑chain decision making. Understanding the nuances of concentrated liquidity helps in interpreting oracle data, as the price at a given tick may not reflect the entire market.

Practical Implications for Liquidity Providers

  1. Active Management – Providers need to monitor market movements to adjust their ranges. A provider that sets a narrow range and then forgets can lose out on fee income as the price moves out of range.
  2. Impermanent Loss vs. Fees – Concentrated liquidity increases fee earnings, but it also increases the risk of impermanent loss if the price exits the range and the provider’s capital is exposed to a significant adverse movement.
  3. Diversification – Providers can spread capital across multiple ranges or multiple pools to hedge against volatility and impermanent loss.

The Future of AMM Models

The evolution from flat pools to concentrated liquidity demonstrates that DeFi is continually seeking higher capital efficiency. Several trends are shaping the next wave of AMM innovation:

  • Dynamic Range Adjustment – Protocols may introduce automated mechanisms that shift provider ranges based on volatility indices or market depth, reducing the need for manual management.
  • Hybrid Invariants – Combining constant‑product with other invariants (e.g., constant‑sum, weighted AMMs) can tailor liquidity provision to different market conditions.
  • Cross‑Chain Liquidity – Bridging pools across blockchains will require new AMM designs that can handle differing gas costs and token standards.
  • Enhanced Oracles – As AMMs feed data into other DeFi primitives (e.g., lending, derivatives), the accuracy and security of price feeds will become more critical, encouraging deeper integration between AMMs and oracle networks.

Conclusion

Automated market makers have shifted from a simple constant‑product model to sophisticated systems that allow liquidity providers to concentrate capital precisely where it is most valuable. This leap has made DeFi more efficient, competitive, and accessible to a broader range of participants. For traders, it means greater potential for lower slippage and better fee structures; for liquidity providers, it offers higher returns and more strategic control over risk. As the ecosystem continues to innovate, the line between automated liquidity provision and active market making will blur further, opening new opportunities and challenges for all participants.

Sofia Renz
Written by

Sofia Renz

Sofia is a blockchain strategist and educator passionate about Web3 transparency. She explores risk frameworks, incentive design, and sustainable yield systems within DeFi. Her writing simplifies deep crypto concepts for readers at every level.

Contents