5.1 Centralized Exchanges (CEX)
Centralized exchanges remain the primary gateway for most crypto users. They offer familiar trading interfaces, fiat on-ramps, and high liquidity - but require users to trust the exchange with custody of their assets.
CEX Architecture
- Order book: Central limit order book (CLOB) matching engine
- Hot wallets: Online wallets for immediate withdrawals (~5-10% of assets)
- Cold storage: Offline wallets for the majority of assets (~90-95%)
- Trading engine: High-performance matching system (millions of orders/second)
- KYC/AML: Identity verification and compliance systems
Major Centralized Exchanges
| Exchange | Headquarters | Daily Volume | Key Features |
|---|---|---|---|
| Binance | Multiple jurisdictions | ~$15-25B | Largest by volume, BNB ecosystem |
| Coinbase | USA (NASDAQ listed) | ~$2-5B | Regulated, institutional focus |
| Kraken | USA | ~$1-2B | Security reputation, proof of reserves |
| OKX | Seychelles | ~$3-5B | Derivatives, Web3 wallet |
| Bybit | Dubai | ~$5-10B | Derivatives focus |
Indian Exchange Landscape
- WazirX: Largest Indian exchange, Binance-affiliated (ownership dispute)
- CoinDCX: SEBI-compliant aspirations, institutional services
- ZebPay: One of the oldest Indian exchanges
- CoinSwitch: Retail-focused, large user base
Indian exchanges operate without specific licensing framework. The 2022 tax regime legitimized trading but didn't establish exchange regulation. Users face counterparty risk and should limit exchange exposure to active trading needs only.
CEX Risks
Custodial Risk
- Exchange holds your private keys
- "Not your keys, not your coins"
- Bankruptcy = potential loss (FTX)
- Commingling of funds possible
Security Risk
- Large honeypot for hackers
- Mt. Gox: $470M stolen (2014)
- Insider threats
- Hot wallet compromises
Regulatory Risk
- Account freezes
- Withdrawal restrictions
- Sudden jurisdiction exits
- Asset delistings
5.2 Decentralized Exchanges (DEX)
Decentralized exchanges eliminate the trusted intermediary by executing trades through smart contracts. Users retain custody of their assets throughout the trading process - connecting directly from their wallets.
DEX vs CEX Comparison
| Feature | CEX | DEX |
|---|---|---|
| Custody | Exchange holds funds | User retains custody |
| KYC | Required | Not required |
| Fiat support | Yes | No (crypto only) |
| Liquidity | Higher | Lower (varies) |
| Speed | Instant | Block confirmation time |
| Fees | 0.1-0.5% | 0.3% + gas fees |
| Privacy | KYC data collected | Wallet address only |
Major DEX Platforms
| DEX | Chain(s) | TVL | Model |
|---|---|---|---|
| Uniswap | Ethereum, Arbitrum, Polygon | ~$5B | AMM (Constant Product) |
| Curve | Multi-chain | ~$2B | AMM (Stable Swap) |
| PancakeSwap | BNB Chain, Ethereum | ~$2B | AMM (Uniswap fork) |
| dYdX | Own chain (Cosmos) | ~$500M | Order book (derivatives) |
| Raydium | Solana | ~$200M | AMM + Order book |
Aggregators like 1inch and Paraswap route trades across multiple DEXes to find the best price. They split large orders across pools to minimize slippage. Always compare aggregator quotes before large trades.
5.3 Automated Market Makers (AMMs)
AMMs replaced traditional order books with algorithmic pricing. Instead of matching buyers and sellers, traders swap against liquidity pools governed by mathematical formulas. This innovation enabled permissionless market making.
Constant Product Formula (x * y = k)
Uniswap pioneered the constant product formula, where the product of reserves must remain constant:
// Uniswap V2 Constant Product Formula Reserve ETH (x) = 100 ETH Reserve USDC (y) = 200,000 USDC Constant (k) = x * y = 20,000,000 // User wants to buy 10 ETH New ETH reserve = 90 ETH New USDC reserve = k / 90 = 222,222 USDC USDC paid = 222,222 - 200,000 = 22,222 USDC // Effective price: 2,222 USDC/ETH (vs 2,000 spot) // Slippage: ~11% for this large trade
Liquidity Provider (LP) Economics
- Deposit: LP deposits equal value of both tokens (e.g., $1000 ETH + $1000 USDC)
- Receive LP tokens: Represents share of pool
- Earn fees: 0.3% of each trade distributed pro-rata
- Impermanent loss: Portfolio divergence vs holding
- Withdraw: Burn LP tokens to receive underlying assets
If token prices diverge significantly, LPs may have less value than simply holding. Called "impermanent" because loss only realizes on withdrawal. For volatile pairs, impermanent loss can exceed fee income.
AMM Variants
Uniswap V3
- Concentrated liquidity
- LPs choose price ranges
- Higher capital efficiency
- More complex management
Curve (StableSwap)
- Optimized for similar assets
- Much lower slippage
- Ideal for stablecoin swaps
- USDC/USDT/DAI pools
Balancer
- Multi-token pools (up to 8)
- Custom weightings (80/20)
- Self-rebalancing portfolios
- Smart order routing
5.4 Trading Mechanics
Understanding order types, market structure, and execution is essential for effective trading and advising clients. Crypto markets operate 24/7 with unique characteristics compared to traditional finance.
Order Types
| Order Type | Execution | Use Case |
|---|---|---|
| Market Order | Immediate at best available price | Urgent execution, small orders |
| Limit Order | Only at specified price or better | Price-sensitive execution |
| Stop-Loss | Market order when price reaches trigger | Risk management |
| Stop-Limit | Limit order when price reaches trigger | Controlled exit |
| OCO (One-Cancels-Other) | Paired orders - one executes, other cancels | Take-profit + stop-loss combo |
Market Microstructure
- Spread: Difference between best bid and ask prices
- Depth: Volume available at various price levels
- Slippage: Price movement during order execution
- Maker/Taker: Makers add liquidity (limit orders), takers remove it (market orders)
Derivatives Trading
- Leverage: Up to 100x on some platforms (extremely risky)
- Funding rate: Keeps perp price aligned with spot
- Liquidation: Position closed if margin insufficient
- Insurance fund: Covers liquidation shortfalls
High leverage amplifies both gains and losses. At 100x, a 1% price move against your position results in 100% loss. Most retail traders lose money on leveraged trading. Never risk more than you can afford to lose.
5.5 Exchange Security & Hacks
Exchange hacks have resulted in billions of dollars in losses. Understanding common attack vectors and security practices is essential for advising clients and conducting due diligence on exchange selection.
Major Exchange Hacks
| Exchange | Year | Loss | Attack Vector |
|---|---|---|---|
| Mt. Gox | 2014 | $470M | Hot wallet theft (ongoing over years) |
| Bitfinex | 2016 | $72M | Multi-sig compromise |
| Coincheck | 2018 | $530M | Hot wallet (NEM tokens) |
| Binance | 2019 | $40M | API keys, 2FA codes phished |
| FTX | 2022 | $8B+ | Internal fraud, misappropriation |
| WazirX | 2024 | $235M | Multi-sig wallet compromise |
Security Best Practices
For Users
- Hardware 2FA (YubiKey), not SMS
- Unique, strong passwords
- Withdrawal address whitelist
- Minimize exchange balances
- Enable all security features
Exchange Evaluation
- Proof of Reserves audits
- Insurance fund size
- Cold storage percentage
- Security incident history
- Regulatory compliance
Proof of Reserves
After FTX collapse, proof of reserves became an industry standard:
- Merkle tree: Cryptographic proof user balances are included
- On-chain verification: Public addresses showing reserve holdings
- Third-party attestation: Accounting firm verification
- Limitations: Doesn't show liabilities or encumbrances
Before recommending or using an exchange: (1) Check proof of reserves, (2) Review security history, (3) Verify regulatory status, (4) Check insurance fund, (5) Review withdrawal policies. Prefer regulated exchanges for large holdings.
Key Takeaways
- CEXs offer convenience but custody risk - "not your keys, not your coins"
- DEXs provide non-custodial trading via smart contracts but have lower liquidity
- AMMs use mathematical formulas (x*y=k) instead of order books
- Impermanent loss affects liquidity providers when token prices diverge
- Perpetual futures use funding rates to track spot prices without expiry
- Exchange hacks have stolen billions - Mt. Gox, FTX, WazirX examples
- Proof of reserves emerged post-FTX but doesn't show liabilities
- Indian exchanges lack regulatory framework - use caution and minimize exposure