# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fluidtrade.gitbook.io/docs/dex-decentralized-exchanges.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
