What Is Uniswap?
Uniswap is one of the most widely used decentralized exchanges (DEXs) in crypto. Instead of matching buyers and sellers through an order book, it uses an automated formula and pooled liquidity to price every swap. This guide explains how that works, what the UNI token is for, and the risks you should understand before using it.
What Uniswap Is and How It Differs From an Exchange
Uniswap is a decentralized exchange (DEX) — a set of smart contracts running on Ethereum (and several other networks) that let people swap one token for another directly from their own crypto wallet. There is no company holding your funds, no account to register, and no order book matching buyers with sellers.
This is a core part of DeFi (decentralized finance). On a centralized exchange like a traditional brokerage, the platform custodies your coins and you trust it to execute trades fairly. On Uniswap, you keep custody the whole time and the smart contract executes the swap automatically. The trade-off: you are responsible for your own keys, transaction fees, and mistakes — there is no support desk to reverse an error.
| Feature | Centralized Exchange (CEX) | Uniswap (DEX) |
|---|---|---|
| Who holds your coins | The exchange | You (self-custody) |
| How prices are set | Order book (buyers vs. sellers) | Automated formula + liquidity pools |
| Account / KYC | Usually required | None — connect a wallet |
| Reversibility | Support can sometimes help | Transactions are final |
How Uniswap Prices a Swap: The AMM Explained
Uniswap uses an Automated Market Maker (AMM). Instead of matching orders, it relies on liquidity pools — pots of two tokens deposited by users called liquidity providers (LPs). When you swap, you trade against the pool, not against another person.
The classic Uniswap formula is the constant product rule: x × y = k. Here x and y are the amounts of the two tokens in the pool, and k must stay constant. When you add one token and remove the other, the formula recalculates the price automatically.
k = 300,000. You want to buy ETH with 3,000 USDC. After your deposit the pool has 33,000 USDC, so the ETH side must fall to about 9.09 ETH to keep k constant (300,000 ÷ 33,000). You receive roughly 0.91 ETH. Notice you paid more than the starting 3,000 USDC ÷ 10 ETH rate — that gap is price impact, and it grows the larger your trade is relative to the pool.Two terms matter here:
- Slippage — the difference between the price you expected and the price you actually got, often caused by other trades landing before yours. Wallets let you set a maximum slippage tolerance.
- Liquidity — the bigger the pool, the smaller the price impact for the same trade size. Thin pools move sharply and are easier to manipulate.
Later versions of Uniswap (notably v3) added concentrated liquidity, letting LPs focus their funds in a chosen price range for greater capital efficiency. The pricing intuition stays the same: an automated formula, not a human counterparty, sets the rate.
The UNI Token and Liquidity Providing
UNI is Uniswap's governance token. Holding UNI lets you vote on proposals about how the protocol is run — fee settings, treasury use, and upgrades. Importantly, UNI is not the same as using the exchange: you can swap on Uniswap without ever owning UNI, and owning UNI does not automatically pay you a share of trading fees.
Trading fees instead go to liquidity providers. When you deposit two tokens into a pool, you earn a cut of the fees from every swap that uses your liquidity. This can sound like passive income, but it carries a specific risk:
Here is how the two roles compare:
| Role | What you do | Main upside | Main risk |
|---|---|---|---|
| Swapper | Trade one token for another | Permissionless access | Slippage, gas fees, scam tokens |
| Liquidity provider | Deposit two tokens into a pool | Share of swap fees | Impermanent loss |
| UNI holder | Vote on governance | Influence over protocol | Token price volatility |
The Risks You Should Understand
Uniswap removes the middleman, but it does not remove risk. If anything, self-custody puts more responsibility on you. Key risks include:
- Scam tokens. Anyone can create a pool for any token. A token can copy a famous name, or be a "honeypot" you can buy but never sell. Always verify the contract address from an official source — see how to avoid crypto scams.
- Smart contract bugs. Even audited code can have flaws. Front-end interfaces and routers can also be targeted by attacks.
- Gas fees. On Ethereum mainnet, network fees can exceed the value of a small swap during busy periods. Using a Layer 2 network often lowers these costs.
- Impermanent loss for liquidity providers, as described above.
- Irreversibility. Send to the wrong address or approve a malicious contract, and there is usually no recovery.
To use Uniswap more safely, a few basic habits help:
- Double-check the token contract address, not just the name or logo.
- Set a sensible slippage tolerance and review the price impact before confirming.
- Start with small amounts while you learn the wallet flow.
- Revoke old token approvals you no longer need.
Bottom Line
Uniswap is a foundational piece of DeFi: a non-custodial exchange that prices trades with a transparent automated formula instead of an order book. It gives anyone with a wallet permissionless access to swap tokens and to provide liquidity — but it shifts custody, security, and decision-making onto the user. If you are still building fundamentals, it helps to first understand how blockchains work and the tokens you might trade, from Bitcoin to various altcoins.
Understanding the mechanics — the AMM, slippage, impermanent loss, and the difference between using Uniswap and holding UNI — matters far more than chasing returns. This article is educational and is not investment advice. Crypto assets are volatile and you can lose money; do your own research and never risk funds you cannot afford to lose.
NOONOO TRADING — join the free chat and watch live trading together.
Join free chat →📈 Sign up on OKX for a trading fee discount
Get OKX fee discount →