The Web3 lecture series co-hosted by Moledao and OGBC officially kicked off on January 16, 2023, marking a significant milestone for blockchain education. The first week focused on infrastructure, covering core topics like blockchain fundamentals, Ethereum, Layer 2 and Layer 0 solutions, and decentralized storage.
This article dives into the second week of the series — DeFi Week, centered around Decentralized Exchanges (DEX) — based on the insightful session led by Rachel, co-founder of ALEX, a DeFi protocol built on Bitcoin’s Layer 2. With a strong background in quantitative finance from Goldman Sachs and JPMorgan, and over a decade as an executive director, Rachel brings deep expertise to the evolving world of decentralized finance.
Why Do We Need Decentralized Exchanges?
To understand the rise of DEXs, it’s essential to compare Web2 and Web3 economic models.
In Web2, startups typically raise capital from venture capitalists before launching products. Retail investors rarely participate until a public offering (IPO). In contrast, Web3 projects often launch with token distribution, enabling early community participation. This shift creates an immediate need for token liquidity and value exchange — a role fulfilled by exchanges.
👉 Discover how decentralized platforms are reshaping financial access.
But where should these tokens be traded?
Main Trading Venues in Crypto
- CEX (Centralized Exchange): Platforms like Binance or Coinbase where users trust a central entity to manage funds and transactions.
- DEX (Decentralized Exchange): Non-custodial platforms operating via smart contracts on blockchains.
- OTC (Over-the-Counter): Off-exchange trading, usually for large institutional orders.
While CEXs dominate trading volume, DEXs offer compelling advantages that are gaining traction — especially after high-profile collapses like FTX highlighted systemic risks in centralized finance (CeFi).
DEX vs CEX: Key Differences
DEX trading volume surpassed $34 billion in 2022, accounting for roughly 10% of total crypto trading. Post-FTX, this share is expected to grow as users seek more secure, transparent alternatives.
Why Choose a DEX?
- Non-Custodial: Users retain full control of their assets.
- Open Access: Available globally without KYC or geographic restrictions.
- Transparency: All transactions are recorded on-chain and verifiable.
- Composability: DEXs can integrate seamlessly with other DeFi protocols (e.g., lending, yield farming).
- Decentralized Governance: Decisions are made through community voting, promoting democratic control.
Despite slower decision-making, this model eliminates reliance on centralized entities and reduces counterparty risk.
Liquidity Provision: Institutions vs Individuals
In traditional finance and CeFi, market makers are typically large institutions (e.g., Jump Trading, GSR). In DeFi, anyone can become a liquidity provider (LP) — even beginners — earning fees from trades. However, this comes with unique risks such as impermanent loss.
Uniswap: The Pioneer of AMM DEXs
Launched in 2018, Uniswap revolutionized DeFi with its Automated Market Making (AMM) model. Prior attempts at decentralized trading relied on order books, which were limited by blockchain speed and scalability.
How AMM Works
Uniswap uses the constant product formula:
x × y = k
Where:
- x = amount of Token A
- y = amount of Token B
- k = constant
Prices adjust automatically based on supply and demand within the pool.
Key Participants
- Traders (Price Takers): Buy/sell tokens at prevailing market rates.
- Liquidity Providers (Market Makers): Deposit equal value of two tokens to earn trading fees.
However, large trades can cause slippage — price deviation due to low liquidity — especially when pools are shallow. This also exposes LPs to arbitrage opportunities exploited by bots.
Impermanent Loss Explained
Imagine depositing 50 apples and 50 oranges when their value is 1:1. If apple prices surge to 10x oranges, the pool rebalances to maintain x × y = k. You end up with fewer apples and more oranges — less valuable than simply holding the appreciating asset.
This is impermanent loss: a temporary loss compared to holding assets outside the pool. It becomes permanent if you withdraw during price divergence.
Uniswap v2 & v3 Performance
As of late 2022:
- TVL: ~$3 billion (peaked at $6B)
- 24-hour volume: Up to $17 billion
High turnover helps offset impermanent loss through fee accrual, making it viable for long-term LPs.
Advancing the Model: Curve & Uniswap v3
Curve: Optimizing Stablecoin Swaps
While Uniswap’s x×y=k works well for volatile pairs, it causes high slippage for stablecoins. Curve introduced Stableswap, a hybrid invariant that behaves like x + y = k near peg but reverts to AMM dynamics during de-peg events.
This innovation powers efficient stablecoin trading — crucial given stablecoins’ role in bridging crypto and real-world assets.
Remember UST’s collapse? It underscored why robust stablecoin infrastructure matters.
👉 Explore platforms enabling next-gen stablecoin innovation.
Uniswap v3: Concentrated Liquidity
To compete with Curve, Uniswap launched v3 with Concentrated Liquidity Market Making (CLMM). LPs can now allocate capital within custom price ranges, increasing capital efficiency.
Benefits of CLMM:
- Reduced slippage
- Lower impermanent loss
- Higher fee yields per dollar staked
This flexibility makes v3 ideal for professional market makers and stablecoin pairs.
Derivatives in DeFi: The Next Frontier
Derivatives dominate traditional finance — trading volumes are ~100x spot markets. In crypto:
- CEX derivatives volume: ~$57 trillion annually
- DEX perpetuals volume: ~$1.7 trillion (just 3% of CEX)
Yet DEX spot volume already reaches ~10% of CEX levels — suggesting massive growth potential for on-chain derivatives.
Challenges in On-Chain Derivatives
- Need for deep liquidity
- Price accuracy and low latency
- Vulnerability to oracle manipulation
- Fast settlement requirements
Layer 2 solutions (e.g., Arbitrum, Optimism) have alleviated gas costs and latency, enabling scalable derivative protocols.
Leading DEX Derivatives Protocols
dYdX – Central Limit Order Book
Built on StarkWare, dYdX processes trades off-chain and settles on-chain. Offers low slippage and CEX-like experience but relies on professional market makers. Withdrawals introduce slight centralization risks.
Perpetual Protocol – vAMM Model
Hosted on Optimism, uses virtual AMMs for fully on-chain trading. Fast and non-custodial but suffers from higher slippage and lacks limit orders.
GMX – Oracle-Based Pricing
Deployed on Arbitrum, GMX enables spot and perpetual trading with low slippage via Chainlink oracles pulling prices from Binance, Kraken, and Bitfinex.
Unique Features:
- No impermanent loss for LPs
- LPs act as counterparty to traders
- Portfolio includes BTC, ETH, and stablecoins (~25%, 25%, 50%)
However, reliance on only three price sources poses oracle risk. If two exchanges feed incorrect data, arbitrage attacks may occur. Efforts are underway with Chainlink to decentralize pricing further.
GMX’s success — top 5 in DEX volume without VC backing — highlights strong product-market fit and community trust.
The Road Ahead for DEX Innovation
Compared to mature products like AMMs and lending protocols, on-chain derivatives remain in early stages. Options and swaps lack dominant players, leaving room for breakthrough innovations.
The diversity in DEX architectures — AMM, order book, vAMM, oracle-driven — reflects the ecosystem's experimental spirit. Each design trades off decentralization, efficiency, and security differently.
As Layer 2 adoption grows and cross-chain interoperability improves, we can expect:
- More capital-efficient models
- Advanced risk management tools
- Institutional-grade DeFi infrastructure
Frequently Asked Questions (FAQ)
Q: What is the main advantage of a DEX over a CEX?
A: DEXs are non-custodial and transparent — users retain control of funds, reducing counterparty risk exposed by events like the FTX collapse.
Q: Can anyone provide liquidity on a DEX?
A: Yes! Anyone with compatible tokens can become a liquidity provider and earn trading fees, though they must understand risks like impermanent loss.
Q: What is slippage in DeFi trading?
A: Slippage is the difference between expected price and actual execution price, often caused by low liquidity or large trade sizes.
Q: Why are stablecoins important in DEX development?
A: Stablecoins enable predictable value exchange and serve as base pairs for trading. Efficient stablecoin swaps (e.g., via Curve) underpin much of DeFi’s growth.
Q: Is impermanent loss avoidable?
A: Not entirely — but strategies like using stablecoin pairs or concentrated liquidity (Uniswap v3) can minimize its impact.
Q: What makes GMX different from other DEXs?
A: GMX uses real-time oracle pricing instead of internal AMM curves, offers low-slippage trades, and allows LPs to earn from trader losses without impermanent loss.