What Is Uniswap? The Flagship DEX, From AMM to V4 Explained
Uniswap lets a trade happen without a trader — and it does that with an AMM. Behind that blunt definition sits one of crypto’s most elegant inventions: a single mathematical curve replacing the matching engine of a traditional exchange. This article moves from first principles to V4 and ties UNI, impermanent loss and MEV together.
(/uploads/20260529/1780063958566-81825.png)

How do you trade without an order book
A traditional exchange matches: you place a bid, someone else places an ask, prices meet and trade. It needs market makers quoting non-stop, servers maintaining the book, and someone overseeing the whole thing.
Uniswap strips all of that out. A liquidity pool plays the counterparty: users deposit two tokens at some ratio, and anyone can trade directly against the pool with the price computed by a formula instead of quotes.
The AMM and x·y=k
Uniswap’s core algorithm is the automated market maker (AMM), and the canonical formula is x · y = k:
- x is the amount of token A in the pool.
- y is the amount of token B in the pool.
- k is their product, held constant.
Concrete example: a pool with 10 ETH and 20,000 USDC, k = 200,000. If you trade 1 ETH for USDC, ETH becomes 11, USDC must become 200,000 / 11 ≈ 18,181, and you receive 20,000 − 18,181 ≈ 1,818 USDC. Note: the unit price isn’t 2,000 USDC — your trade slid along the curve, which is slippage.
The elegance of this curve:
- There’s always a quote: as long as x and y are nonzero, the formula spits out a price.
- A trade always clears: no counterparty needed.
- Arbitrage pulls prices back: when the pool drifts from market, arbitrageurs trade and realign it.
V2, V3, V4: three evolutions of the same idea
Uniswap V2 (2020) was the canonical x·y=k implementation, and crucially anyone could create a pool for any ERC-20, laying the foundation for most of today’s DeFi liquidity.
Uniswap V3 (2021) introduced concentrated liquidity: LPs could supply liquidity only inside a chosen price range, lifting capital efficiency by orders of magnitude. The cost was that market making became an active job — liquidity goes “inactive” when price moves outside the range.
Uniswap V4 (rolling out from 2024) brought Hooks and a singleton-contract architecture:
- Hooks let anyone inject custom logic at key moments — swaps, liquidity changes — enabling dynamic fees, automated V3 range management, on-chain limit orders and more.
- Singleton consolidates all pools into one contract, cutting pool-creation gas by an order of magnitude.
V4’s significance isn’t more features; it’s turning Uniswap from a DEX into a liquidity platform.
UNI and governance
UNI is Uniswap’s governance token, airdropped in September 2020 to historical users at 400 UNI per address — one of DeFi’s most influential airdrops.
UNI holders can:
- Vote on parameters (fee splits, new chain deployments, etc.).
- Control the Uniswap treasury.
- Decide whether to flip the “fee switch” that routes a slice of protocol fees to holders.
Notably, UNI has historically not captured fees directly, a long-running source of community debate that has itself become a case study in DeFi governance.
(/uploads/20260529/1780064001499-67723.png)
Versus centralized exchanges
Compared with a CEX, Uniswap inverts a few core dimensions: assets are self-custodied instead of platform-held; matching uses an AMM formula and pool instead of an order book and engine; listing is permissionless (anyone can spin up a pool) instead of a platform review; transparency is on-chain instead of off-chain disclosure; and the risk mix shifts from platform failure or freezes to contract bugs, MEV and impermanent loss.
For crypto-natives, Uniswap solves the most painful CEX-era problem: assets never leave your wallet. That convenience trades into a different set of risks, covered next.
Risk: impermanent loss and MEV
Impermanent loss (IL) is an LP occupational hazard: when the pool’s two token prices drift from their deposit ratio, the 50/50 withdrawal is worth less than simply holding. Fee income may or may not offset it — IL is intrinsic to AMMs.
MEV (maximum extractable value) is another hidden tax. Bots watch your transaction and front-run or sandwich it, giving you a worse execution price. Some V4 hooks try to mitigate this, but MEV doesn’t disappear — it gets redistributed.
For a broader DeFi intro, the LSD primer, or the lending counterpart, see What is Aave.
FAQ
- Is Uniswap safe? The protocol is battle-tested, but anyone can create a pool — beware fake tokens and honeypots in unknown pools.
- Can I buy every token on Uniswap? Almost, but depth varies wildly; tiny tokens incur extreme slippage.
- Do LPs always lose? No — net P&L depends on fees and price reversion; blue-chip and stablecoin pairs fare much better.
- Does UNI pay yield today? As of writing, the “fee switch” proposal is still in repeat discussions.
Key takeaways
- Uniswap replaces order books with an AMM and uses x·y=k so a trade can always happen.
- V2 (general), V3 (concentrated), V4 (hooks) are three evolutions of the same idea.
- UNI governs, has historically not captured fees, and the debate is a DeFi governance classic.
- Versus CEXes, Uniswap wins on self-custody and transparency, loses on contract risk, IL and MEV.
- Anyone can create a pool, so vetting unknown tokens is on you.
A traderless exchange is a milestone in cryptoeconomics
Uniswap fully automated trading — what used to need humans — by letting a mathematical curve play the market maker. It’s not a better exchange; it’s a new trading paradigm, and that makes it one of cryptoeconomics’ worth-remembering milestones. Once AMM clicks, V3 concentrated liquidity, V4 hooks and perp DEXes are all extensions of the same logic. This article is not investment advice.