DEX

A decentralised exchange: a set of smart contracts that lets users trade tokens directly from their own wallets.

What is a DEX?

A DEX, or decentralised exchange, is a marketplace for crypto tokens that runs on smart contracts. Users trade directly from their own wallets and keep control of their private keys, rather than depositing funds with a company as they would on a centralised exchange.

How it works

There are two main designs.

Each trade is a blockchain transaction, so it needs a network fee and is final once confirmed.

Example

A user wants to swap a stablecoin for ether. They connect a wallet to a DEX, enter the amount, approve the token, and confirm the swap. The contract takes the stablecoin, sends ether from the pool, and a small trading fee goes to the liquidity providers.

Why it matters

A DEX does not take custody of user funds, usually requires no account, and lets anyone list a token or provide liquidity. Trades and pool balances are publicly verifiable.

Risks

Common misunderstanding

A DEX front end is a normal website that can be taken offline or imitated; the contracts underneath keep running.

Related terms