#CEXvsDEX101 ### **CEX vs. DEX: A Beginner's Guide**

Cryptocurrency exchanges are platforms where users can buy, sell, and trade digital assets. They fall into two main categories: **Centralized Exchanges (CEX)** and **Decentralized Exchanges (DEX)**. Here’s a breakdown of their key differences:

---

## **1. Centralized Exchanges (CEX)**

**Examples:** Binance, Coinbase, Kraken

### **How They Work:**

- Operated by a company that acts as an intermediary.

- Users deposit funds into the exchange’s wallets.

- Trades happen on the exchange’s internal ledger (not on-chain).

### **Pros:**

✅ **High liquidity** – Large trading volumes mean better prices.

✅ **User-friendly** – Easy for beginners (similar to stock trading platforms).

✅ **Fast transactions** – Trades execute instantly.

✅ **Advanced features** – Margin trading, futures, staking, etc.

### **Cons:**

❌ **Custodial risk** – You don’t control your private keys (exchange can get hacked).

❌ **KYC required** – Identity verification needed (not fully private).

❌ **Centralized control** – Exchange can freeze funds or restrict trading.

---

## **2. Decentralized Exchanges (DEX)**

**Examples:** Uniswap, PancakeSwap, dYdX

### **How They Work:**

- Runs on **blockchain smart contracts** (no middleman).

- Users trade directly from their wallets (non-custodial).

- Trades happen **on-chain** (recorded on the blockchain).

### **Pros:**

✅ **Self-custody** – You control your private keys (no risk of exchange hacks).

✅ **No KYC** – Trade anonymously (privacy-focused).

✅ **Permissionless** – No restrictions; anyone can list tokens.

✅ **Censorship-resistant** – No central authority can block trades.

### **Cons:**

❌ **Lower liquidity** (for some tokens) – Slippage can be high.

❌ **Complex for beginners** – Requires understanding of wallets & gas fees.

❌ **Slower transactions** – Depends on blockchain congestion.

❌ **Limited features** – Fewer advanced trading options than CEXs.