Many people have heard of Uniswap.

But have you ever wondered: how does Uniswap actually work, and how is it different from an exchange like Binance?

Uniswap is a decentralized trading protocol (DEX) that lets users swap different crypto assets directly on the blockchain through smart contracts.

It differs from centralized exchanges like Binance and OKX in one big way:

On a centralized exchange, you deposit your assets into an exchange account, and the exchange handles matching orders.

On Uniswap, you don't need to hand your assets over to any company for custody. You simply connect your own wallet and trade directly with the onchain smart contracts.

How Are Trades Completed?

The most central mechanism in Uniswap is the automated market maker (AMM).

Traditional exchanges rely mainly on buyers and sellers placing orders to be matched, while Uniswap relies mainly on liquidity pools to complete trades.

Here's a simple example:

Suppose someone has supplied both ETH and USDC to an ETH/USDC liquidity pool.

When you want to use USDC to buy ETH, you're really exchanging your USDC for the ETH in the pool.

After the trade, the amounts of the two assets in the pool change, and the price adjusts according to the pool's pricing mechanism.

Those who provide liquidity then earn trading-fee income according to the applicable rules.

This is the most basic way Uniswap works.

So How Does Uniswap Make Money?

Here we need to distinguish two concepts:

  • Swap fees: the fees users pay when trading, used mainly to pay liquidity providers.

  • Protocol fees: when a particular fee switch is enabled, the protocol can take a portion of eligible trading fees.

Not all swap fees go directly to the Uniswap protocol, and UNI holders certainly don't automatically receive all of the fees.

That's also why the UNI value-capture mechanism is worth ongoing study.

In One Sentence

Uniswap is essentially a piece of automated trading infrastructure running on the blockchain.

It needs no centralized order-matching body like a traditional exchange; instead, through smart contracts, liquidity pools, and an automated market-making mechanism, it lets users swap assets directly onchain.

Want to learn more? Start with the Uniswap project profile, then read the VolatilePair Hook mechanism analysis.

References