# Decentralized Exchanges

{% hint style="info" %}
Disambiguation: [DEXs vs CEXs](/glossary/disambiguation/dexs-vs-cexs.md)
{% endhint %}

A **Decentralized Exchange** (DEX) is a type of cryptocurrency exchange that operates without a central authority. This means that it is not controlled by any one individual or organization, and is instead run on a network of computers using [blockchain ](/glossary/definitions/decentralization/blockchains.md)technology. For example, Uniswap is a DEX that facilitates many transactions on the Ethereum blockchain.

On a decentralized exchange, users can buy and sell cryptocurrencies directly with each other, without the need for a third party to act as an intermediary. This allows for faster and more efficient trades, as well as greater security and privacy for users.

To trade on a decentralized exchange, users first need to connect their wallet to the exchange's decentralized application (dApp). This is typically done using a [self-custody wallet](/glossary/definitions/self-custody-wallets.md), such as All For One™, which allows users to securely manage their cryptocurrency holdings.

Once their wallet is connected, users can browse the available trading pairs on the exchange and select the one they want to trade. They can then enter the amount of the cryptocurrency they want to buy or sell, and the exchange will automatically match them with another user who is looking to trade the opposite side of the pair.

The trade is then executed on the blockchain, and the users receive their newly-traded cryptocurrency directly in their wallet. Decentralized exchanges are typically operated using [smart contracts](/glossary/definitions/smart-contracts.md), which are self-executing contracts with the terms of the agreement between buyer and seller being directly written into lines of code.

Trading on a decentralized exchange is that it allows for a greater degree of autonomy and control for users. Because these exchanges are not controlled by any one central authority, users are able to trade directly with each other without having to go through a third party, which can make the process of buying and selling cryptocurrencies faster and more efficient, as well as more secure.


---

# 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://docs.allforone.app/glossary/definitions/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.
