# 5. Decentralized Exchange

A Sequentia DEX has two main components: a messaging system and a trading engine. The messaging system collects user trade intentions (orders) and sends them to the trading engine that checks the orders and executes them.&#x20;

A DEX may fail to be censorship-resistant due to any of the two following distinct single points of failure:

1. When the trading engine is prone to attack vectors, for example, if there is an identifiable owner of the private key/address who manages the smart contract and who, in some cases, has the power to stop it;
2. When the messaging system critically relies on centralized access points (i.e., a website or a relayer node), that can be shut down [**(18**](#footnotes-p5)**)**.

In theory, Sequentia supports several different types of DEX interactions, depending on the needs or preferences of users in terms of decentralization, privacy, and censorship resistance: from a fully decentralized solution (in terms of both the trading engine and the messaging system) to milder solutions that introduce intermediaries in the communication in order to increase the spectrum of possible trades.&#x20;

#### Footnotes/p5

> 18\. Most DEXs today are implemented with a web interface: one famous example is EtherDelta, where to access its functionalities, a user had to go through etherdelta.com. The website then talks to the browser’s extension MetaMask, which receives and sends the information from and to the Ethereum network. In 2018, the SEC fined EtherDelta’s founder for operating an unregistered Security Exchange, which resulted in the exchange suspending its operations.


---

# 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.sequentia.io/white-paper/dex.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.
