How Automated Market Makers and Liquidity Pools Let You Swap Crypto With No Middleman

Want to trade USDC for ETH at 2 AM on a Sunday? You don't need a bank or a broker. In Part 3 of our Crypto Sectors series, we break down how automated market makers and liquidity pools power permissionless finance.

Share
How Automated Market Makers and Liquidity Pools Let You Swap Crypto With No Middleman
Editor's Note: Most people treat crypto as one giant, speculative asset class. In reality, it is divided into distinct market sectors. This is Part 3 of our seven-part series on how each sector works in everyday life across emerging markets.
Smart Contract Platforms Explained Through One $5 Transfer
Why can a $5 transfer cost $1 on one network and under a cent on another? See how smart contract platforms, L1s, L2s, and gas fees set the price.

Picture wanting to trade 3,000 USDC for 1 ETH on a Sunday night. On a traditional stock market, your order waits until Monday for another person to take the other side. On a centralised crypto exchange, professional trading firms and a central company sit in the middle to match your order and hold your funds. On a decentralised exchange (DEX), your swap finishes in seconds with no company, broker, or human seller on the other side. Instead of matching you with a person, the platform routes your trade through liquidity pools managed by automated market makers.

In Part 2 of our series, we saw how smart contract platforms and low-fee networks carry digital dollars across borders, often for a fraction of a cent. Once your money is on the blockchain, decentralised finance (DeFi) gives you the tools to put those tokens to work. Computer code replaces currency desks and brokers with open markets that anyone with a crypto wallet can use.

Why Traditional Markets Need an Order Book

Traditional exchanges run on an order book, an electronic list of buy orders and sell orders organised by price. For illustration, if you want to buy 1 ETH for $3,000 USD on a centralised exchange like Binance or Coinbase, the system checks its list for a seller or market-making firm offering 1 ETH at $3,000 USD. When the two sides match, the platform completes the trade and takes a commission.

This works well on giant centralised platforms where professional firms supply quotes around the clock. It works poorly on a busy general-purpose blockchain like Ethereum, where every placed, changed, or cancelled order must be recorded and charged a gas fee. A busy order book there can clog the network and cost traders money before they even swap.

Currency conversion has its own bottleneck in emerging markets. The World Bank noted that Nigeria's parallel rate premium reached about 80% above the official rate in November 2022 and roughly 60% in June 2023, so anyone buying dollars on the street paid far more than the official rate. The gap has narrowed since the mid-2023 reforms. On October 5, 2026, the official rate sat near ₦1,327 per dollar against ₦1,370 to ₦1,390 on the street, a gap of about 3% to 5%.

DeFi solves the matching problem by throwing out the waiting list altogether.

What Is a Liquidity Pool and How Automated Market Makers Work

If you ask a DeFi developer what a liquidity pool is, they will tell you it is a shared pot of tokens locked inside a smart contract. You can think of it like a community-funded bureau de change that runs on autopilot.

Instead of waiting for a buyer and a seller to meet, a liquidity pool holds two tokens in reserve, such as ETH and USDC. Anyone with a crypto wallet can trade directly against that pot of money at any hour. The software that sets the price inside the pool is called an automated market maker (AMM). Used by early protocols like Bancor and made famous by Uniswap, an AMM uses a mathematical formula to adjust token prices based on supply and demand inside the vault.

By November 4, 2026, total value locked across all DeFi protocols stood at $82.84 billion USD. Across the 830 DEX protocols it tracked that day, decentralised exchanges processed $208.9 billion USD over 30 days, led by Uniswap ($63.86 billion USD), PancakeSwap ($23.17 billion USD), and Aerodrome ($17.92 billion USD).

The Maths Behind One Swap

To see how automated market makers work without a human cashier, look at the simple constant-product formula used by early versions of Uniswap:

x × y = k

In this equation, x is the amount of the first token in the pool, y is the amount of the second token, and k is a fixed number (a constant) that must stay the same before and after every trade (excluding trading fees).

For illustration, imagine a small liquidity pool that holds 10 ETH (x) and 30,000 USDC (y), putting the starting price of 1 ETH at $3,000 USD.

  • Before the swap. Multiply 10 ETH by 30,000 USDC, and your fixed constant (k) is 300,000. At this moment, the implied price of 1 ETH in the pool is 3,000 USDC (30,000 divided by 10).
  • You make a trade. You want to swap 3,000 USDC for ETH. You drop your 3,000 USDC into the pool, raising the USDC balance (y) from 30,000 to 33,000.
  • The pool rebalances. To keep the constant (k) at 300,000, the smart contract divides 300,000 by the new 33,000 USDC balance. That leaves 9.09 ETH (x) in the pool.
  • Your payout. The pool sends you the difference between the old ETH balance (10) and the new ETH balance (9.09), giving you 0.91 ETH.

Because your trade added USDC and removed ETH, ETH became scarcer inside the pool. The new price of 1 ETH in that pool is now about $3,630 USD (33,000 divided by 9.09).

Pool Stage ETH in Pool (x) USDC in Pool (y) Constant (k = x × y) Implied Price of 1 ETH
Before Your Swap 10 ETH 30,000 USDC 300,000 $3,000 USD
After Adding 3,000 USDC 9.09 ETH 33,000 USDC 300,000 $3,630 USD

Slippage and Why Pool Size Matters

In the worked example above, you expected 1 ETH for your 3,000 USDC, yet you received 0.91 ETH. That gap between the starting price you expect and the actual execution price you get is called slippage.

Slippage happens when your trade is large compared to the size of the liquidity pool. Pulling nearly 10% of the ETH out of a tiny pool moves the price against you right away. If that same pool held 10,000 ETH and 30 million USDC, your $3,000 USD swap would barely move the ratio, and your price impact would be about $0.30 USD (roughly 0.01% of your trade).

Stablecoin swaps, where someone trades USDC for USDT and expects a 1-to-1 rate, need a different design, because standard AMM maths moves the price too much unless the pool is huge. In a whitepaper dated November 10, 2019, Curve founder Michael Egorov introduced the StableSwap formula, which keeps the pricing curve flat when two stablecoins are balanced near $1 USD and typically makes slippage about 100 times smaller in the paper's calculations. Uniswap v3, announced in March 2021 and launched in May 2021, added "concentrated liquidity," which lets pool funders focus their money inside tight price bands.

Who Puts the Money in the Pool?

A decentralised exchange does not own the funds inside its vaults. Every token in a liquidity pool is deposited by everyday crypto holders and investment funds. Anyone who deposits their tokens into a pool is called a liquidity provider (LP).

When you act as a liquidity provider in a standard pool, you deposit an equal dollar value of two tokens, such as $500 USD of ETH and $500 USD of USDC. In return, you earn a share of the trading fees paid by everyone who uses that pool for crypto swaps. Uniswap v3 launched with three fee tiers (0.05%, 0.30%, and 1.00% per swap) and added a 0.01% tier in December 2021. Those fees go to the liquidity providers whose funds are active in the current price range.

This model is the foundation of permissionless banking. You do not need a brokerage licence or a bank manager's approval to become a market maker. Anyone can supply tokens to earn yield from real trading fees, and anyone can trade against those reserves at transparent, mathematical prices.

Because liquidity is spread across more than 830 DEX protocols and many blockchains, the best rate for a swap is not always in one pool. That is why many retail swaps now go through DEX aggregators like 1inch, Jupiter, and Matcha, which scan many pools at once and split a swap across several routes to reduce slippage. As of November 4, 2026, aggregators handled $2.22 billion USD in daily volume and $65.77 billion USD over 30 days, led by Jupiter on Solana and 0x Protocol across Ethereum-compatible blockchains.

The Real Risks of Liquidity Pools and DeFi

While permissionless banking removes gatekeepers, it also removes the safety net. Before you put money into a liquidity pool or trade on a DEX, you need to understand four major risks.

  • Impermanent loss. If you deposit ETH and USDC into a pool and the market price of ETH doubles on outside exchanges, traders will buy the cheaper ETH from your pool until its price matches the outside market. You end up with less ETH and more USDC than you started with. When you withdraw, your pool share can be worth less than if you had simply held your original tokens. The loss only locks in if you withdraw while the price ratio differs from when you deposited, which is why it is called impermanent. Trading fees sometimes make up for the gap, and sometimes they do not.
  • Smart contract bugs and hacks. A liquidity pool is only as safe as the code holding the funds. Estimates of crypto hack and theft losses in 2025 range from about $2.7 billion USD to $3.4 billion USD, depending on the tracker. Even audited protocols can suffer from code exploits.
  • Scam tokens and rug pulls. Because DEXs are open to everyone, anyone can create a fake token, pair it with a small amount of USDT in a new pool, and trick buyers into swapping for it. Some malicious tokens also hide heavy buy and sell taxes in their code, meaning you can buy the token but can never sell it back.
  • Sandwich attacks (MEV). A sandwich attack is one form of maximal extractable value (MEV), the profit bots earn by controlling the order of trades. When you submit a swap on a public blockchain, automated trading bots can see your pending trade waiting in the public queue. If you set your slippage limit too high, a bot can buy the token right before your order to push the price up, let your trade go through at the worst rate, and sell immediately after for a profit.

How to Swap Crypto Without Managing Pools or Slippage

Decentralised finance proved that currency markets can run without banks holding the keys. Yet for someone in Lagos, Addis Ababa, or Jakarta who simply wants to convert digital dollars into Bitcoin or local cash for rent, using a raw DEX brings extra steps. You have to check pool depth, set slippage limits, watch out for fake token contracts, and pay network gas fees even if your transaction fails.

HostFi removes that technical friction. It is an all-in-one custodial wallet holding local currency alongside major digital assets like Bitcoin, Ethereum, Solana, BNB, USDT, and USDC, and it lets you convert between supported tokens inside the app with zero-fee swaps.

Because your conversions happen inside the app, you do not have to compare aggregators, manage liquidity pools, or hold separate gas tokens on different blockchains. Deposits and in-app swaps cost nothing, and fees apply only when you withdraw crypto or local currency out of HostFi, giving you fast access to global currencies and virtual card spending in one secure place.

The Crypto Sectors Series Roadmap

  • Part 1. Currencies and Digital Dollars
  • Part 2. Smart Contract Platforms
  • Part 3. Financials and DeFi – (you are here)
  • Part 4. Real-World Assets
  • Part 5. Artificial Intelligence, Autonomous Agents and Cross-Border Micro-Work
  • Part 6. DePIN, Decentralised Physical Infrastructure
  • Part 7. Consumer and Culture, Gaming, NFTs, and the Creator Economy

Frequently Asked Questions

What is an automated market maker?

An automated market maker (AMM) is a decentralised exchange tool that uses a mathematical formula to price and trade digital assets automatically. Instead of matching buyers and sellers through an order book, it lets users trade directly against a reserve of tokens locked in a smart contract.

What is a liquidity pool in crypto?

A liquidity pool is a shared vault of two or more cryptocurrencies locked inside a smart contract. These pooled funds provide the reserves that let traders swap one token for another at any time.

How do liquidity providers earn money?

Every time a trader swaps using a liquidity pool, they pay a small trading fee (such as 0.01%, 0.05%, 0.30%, or 1.00% on Uniswap v3). That fee is shared among the liquidity providers in proportion to the active capital they contributed.

What is impermanent loss?

Impermanent loss happens when the price ratio of the tokens you deposited changes compared to when you put them in. Because the pool rebalances toward the token that is dropping in relative value, your withdrawn share may be worth fewer dollars than if you had simply held those tokens in your own wallet.

What is the difference between a DEX and a centralised exchange?

A centralised exchange (like Binance or Coinbase) is run by a company that holds customer funds and matches trades through an order book. A decentralised exchange (like Uniswap or Curve) has no company holding your money. You connect your own wallet and trade through smart contracts and liquidity pools.

Is DeFi safe?

Major DeFi protocols like Uniswap, Aave, and Curve have their smart contracts audited by security firms, yet audits do not guarantee safety. DeFi carries real risks. Never deposit money you cannot afford to lose, and always check token contract addresses before trading.