An Intro to DeFi and Liquidity Pools
DeFi (Decentralized Finance) is a broad term for financial tools built on blockchains that don’t rely on banks, brokers, or other centralized intermediaries. Instead of trusting an institution, you rely on open-source code and public ledgers. Why open-source? Because the general public needs to be able to "audit" those smart contracts in order to trust them.
One of the earliest and most important DeFi use cases was trading. Traditionally, trading happens on centralized exchanges: Coinbase, Binance, NYSE, Nasdaq. These platforms hold custody of assets, maintain order books, and match buyers and sellers.
A decentralized exchange (DEX) flips this model. There is:
- no company holding your funds,
- no centralized order book,
- no need for buyers and sellers to directly match.
Instead, trades happen against liquidity pools governed by smart contracts. That idea is the foundation of Uniswap.
Uniswap: The Original Decentralized Exchange
Uniswap launched in 2018 on Ethereum, well before the 2021 DeFi boom. Its core innovation was simple but radical: replace order books with math. Before Uniswap, most decentralized exchanges tried (and mostly failed) to replicate traditional trading mechanics on-chain. Order books were slow, expensive, and illiquid.
Uniswap introduced an automated market maker (AMM):
- Prices are determined algorithmically.
- Liquidity comes from users, not professional market makers.
- Anyone can trade at any time, as long as liquidity exists.
This design is why Uniswap became the blueprint for nearly every AMM that followed. It also didn't hurt that its source code is fully available on Github. To this day, most decentralized exchanges (including PancakeSwap - the first decentralized exchanged of Binance network) are basically clones of Uniswap (or forks that add some twist to incentivize users to keep money there). Ironically, due to Ethereum's gas fees, the clones (usually deployed on cheaper networks like Binance, Polygon, Avalanche, or Harmony) are actually seeing a lot more activity than the original exchange that started it all.
Liquidity Pools, Token Pairs, and Equilibrium
At the heart of Uniswap is the liquidity pool. A liquidity pool is a smart contract that holds two tokens in fixed proportion. For example, ETH / USDC pool contains both Ethreum and USDC (a stablecoin representing the US dollar) in equal proportion based on their current monetary value. That means the pool will continuously rebalance itself to make sure the two are in equilibrium: if Ethereum rises in price, some of it will be sold to purchase more USDC, and if Ethereum falls in price, some USDC will be sold to buy more Ethereum.
The best way to think of a pool is a balance scale where one side holds Token A and the other side holds Token B. The smart contract ensures equilibrium between the two. If someone buys ETH using USDC:
- ETH is removed from the pool
- USDC is added to the pool
- ETH becomes more scarce relative to USDC
- The price of ETH automatically increases
This process continues until the pool’s price matches the broader market. That state is called equilibrium. No human sets prices. Arbitrage traders enforce them.
Where Liquidity Come From
Liquidity doesn’t magically appear. It’s supplied by users called liquidity providers (LPs). An LP deposits equal value of both tokens into a pool:
- $1,000 of ETH
- $1,000 of USDC
In return, they receive LP tokens that represent their share of the pool. Every trade pays a small fee (for example, 0.3%). Those fees are distributed proportionally to LPs. The incentive of being the market maker is earning trading fees on your assets.
Provide liquidity → earn fees from traders.
Failure Modes
Liquidity pools are elegant, but they're not risk-free. Common failure modes include:
One token collapses to zero
If one asset in the pair becomes worthless:
- The pool continuously sells the good asset
- And accumulates the bad one
Example:
- ETH / TokenX pool
- TokenX goes to zero due to a failed project
- LPs are left holding mostly TokenX
- ETH has been drained by traders exiting
Impermanent Loss
Even if both tokens survive, price divergence matters. If one token strongly outperforms the other:
- LPs end up with less of the winner
- More of the underperformer
Compared to simply holding both tokens, LPs can end up worse off. This effect is called impermanent loss, but the name is misleading. It becomes permanent the moment you withdraw.
Fees can offset this. Sometimes they don’t. To mitigate this risk, a good practice is to pair tokens with correlated volatility (e.g. Ethereum and Polygon, which is a layer 2 that sits atop Ethereum). This failure mode is so common that protocols like Curve (CRV) appeared with the sole purpose of focusing on like-kind assets to mitigate this risk.
Liquidity drain
Liquidity is voluntary. During market panic:
- LPs pull funds
- Pools become thin
- Slippage increases dramatically
Trades still execute, but at increasingly bad prices. This can amplify volatility instead of dampening it.
Smart contract risk
Uniswap itself has been battle-tested, but DeFi relies on code:
- Bugs
- Exploits
- Economic attacks
Early DeFi history is full of projects that looked sound but failed under adversarial conditions. Code risk is always present. This is also why many newcomers choose to fork proven Uniswap code rather than building their own.
Takeaways
Despite the risks, liquidity pools solved a real problem:
- They made on-chain trading possible without centralized intermediaries.
- They allowed anyone to become a market maker.
- They enabled composable financial systems: DEXs feeding into lending, derivatives, and more.
Uniswap didn’t just build a product. It introduced a new market structure. If you understand liquidity pools, you understand the foundation of DeFi, and why it attracted so much capital.