# CEX vs DEX

### The Role **of Market Makers in Decentralized Exchanges**

Despite the unique liquidity management on Decentralized Exchanges (DEXs), the role of market makers remains crucial but differs from that in Centralized Exchanges (CEXs). While CEX liquidity relies on orderbook placements, DEX liquidity, particularly in Automated Market Maker (AMM) platforms like Uniswap and Pancakeswap, is governed by algorithms.

### **Understanding Liquidity in CEXs**

In CEXs, liquidity is generated through limit buy and sell orders placed by users or market makers, which serve as counterparties for transactions. Price formation in CEXs is a result of the agreement between limit buyers and sellers, often influenced by market participants executing orders from the orderbook.

### D**ecentralized Exchanges: Liquidity and Price Formation**

DEXs operate on a Peer-to-Contract system, centralizing around liquidity pools created by projects. A standard pool comprises a project token (base token) and a mainstream cryptocurrency like ETH or USDT (quote token). Liquidity in DEXs arises from users depositing both base and quote assets into these pools. The underlying DEX algorithm simulates limit orders by evenly distributing liquidity across various price points, enabling interaction between buyers and sellers.

In DEXs, price is determined by the token ratio in the pool. For instance, if a pool has 50,000 BTC and 1,000 ETH, it indicates a price ratio of 1 BTC to 50 ETH within that pool.

<figure><img src="https://4002613618-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FpWB03WUg7EbTAqBYx2Q6%2Fuploads%2FTEEsxjqDsGKv5YAF8fME%2Fimage.png?alt=media&#x26;token=d68081ea-1a35-44dc-b8b2-15529af2cd49" alt=""><figcaption><p>Uniswap V2 Example</p></figcaption></figure>

### M**arket Making in DEXs: Balancing and Managing Liquidity**

While the DEX algorithm manages liquidity, market makers play a vital role in ensuring price consistency between DEXs and CEXs. They achieve this through strategic buying and selling on DEXs to align prices with those on CEXs.

In liquidity management, particularly with advanced pool versions like V3, market makers can be instrumental in managing liquidity within specific price ranges. The need for professional market making services depends on a project's capital and maturity. For instance, low-volume pools may require minimal management, whereas high-volume pools benefit significantly from expert intervention. Ultimately, the decision to engage a market maker should be based on the project's specific needs and market dynamics.


---

# 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.enflux.io/product-docs/educational/cex-vs-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.
