# DEX (Decentralized Exchanges)

**What is a DEX?**\
\
A DEX stands for **Decentralized Exchange**. To understand it, let's first look at its counterpart, the centralized exchange.

**Centralized Exchange (CEX):**

* Operated by a centralized organization or company.
* Users deposit their funds into the exchange's wallets.
* The exchange is responsible for matching buy and sell orders, holding users' funds, and ensuring transactions are executed.
* Examples of common CEXs include [Coinbase](https://www.coinbase.com/), [Binance](https://www.binance.com/), and [Kraken](https://www.kraken.com/).

You can see more [Centralized exchanges on CoinGecko.](https://www.coingecko.com/en/exchanges)

**Decentralized Exchange (DEX):**

* Operates without a central authority or intermediary.
* Trades occur directly between users, peer-to-peer.
* Uses smart contracts (self-executing contracts with the terms of the agreement directly written into code) to facilitate, verify, and enforce the negotiation or performance of a trade.
* Users retain control of their funds and only send them when a trade is executed.
* Examples include [Uniswap](https://app.uniswap.org/), [GMX](https://gmx.io/), and [dYdX](https://dydx.exchange/).

You can see more [Decentralized exchanges on CoinGecko.](https://www.coingecko.com/en/exchanges/decentralized)

**Key Advantages of DeFi Exchanges:**

1. **Security**: Since users don't deposit their funds into a centralized wallet, there's a reduced risk of large-scale hacks that have plagued some centralized exchanges.
2. **Censorship Resistance**: Without a central authority, it's harder for governments or other entities to shut down or regulate the exchange.
3. **Privacy**: Often, DEXs don't require users to undergo identity verification, allowing for more anonymous trading.
