# CEX-DEX Arbitrage Trading
**Moeilijkheid:** advanced · **Timeframe:** Minutes to hours · **Asset:** cryptocurrency
**Strategie van:** Sam Bankman-Fried (former Alameda Research)
**Risk/Reward:** Low-moderate risk, low-moderate reward per trade (1-3%)
**Win rate:** 70%

## Samenvatting
Profiteer van prijsverschillen tussen gecentraliseerde en gedecentraliseerde exchanges. Lage-risico, hoge-frequentie strategie.

CEX-DEX Arbitrage exploiteert prijsverschillen tussen gecentraliseerde exchanges (Binance, Coinbase) en gedecentraliseerde exchanges (Uniswap, Sushiswap). Voorbeeld: ETH handelt op $3.000 op Coinbase maar $3.020 op Uniswap → koop op Coinbase, verkoop op Uniswap, winst $20. Sam Bankman-Fried bouwde Alameda Research tot $100M+ met crypto arbitrage.

## Kernprincipes
- Identify price differences >1-2% (after fees)
- Execute both sides simultaneously (reduce execution risk)
- Factor in gas fees, exchange fees, slippage
- Automate with bots for speed

## Instap-regels
- Price difference >2% after fees
- Sufficient liquidity on both exchanges
- Fast execution capability (API/bot)
- Accounts funded on both exchanges

## Uitstap-regels
- Execute both trades simultaneously (buy + sell)
- Cancel if execution takes >60 seconds
- Monitor gas fees (can kill profits)

## Risico's
- Account for slippage on DEX side
- Maintain buffer for gas fee spikes
- Avoid illiquid pairs (execution risk)
- Monitor exchange withdrawal limits
- Use limit orders when possible

## Price Discrepancies Between Exchanges: Why Arbitrage Exists
Crypto markets are fragmented across hundreds of exchanges, each with different liquidity, user bases, and order books. This fragmentation creates price discrepancies—the same asset can trade at different prices on different venues. Arbitrageurs profit by buying low on one exchange and selling high on another, simultaneously.

Why do discrepancies exist? Centralized exchanges (CEXs) like Binance and Coinbase have deep order books with institutional liquidity. Decentralized exchanges (DEXs) like Uniswap use AMM pools where prices depend on the ratio of tokens in the pool—large trades cause slippage. During volatile markets, these prices can diverge significantly.

The 'Kimchi Premium' is a famous example: South Korean exchanges often priced Bitcoin 5-30% higher than global exchanges due to capital controls preventing easy arbitrage. Alameda Research (before its scandal) made millions exploiting this premium. Modern opportunities are smaller (0.5-2%) but still profitable at scale with automation.

## Execution Speed Requirements: The Race Against Bots
Arbitrage is a speed game. The moment a price discrepancy appears, hundreds of bots compete to capture it. By the time you manually spot an opportunity and execute, it's likely gone. Successful arbitrage requires sub-second execution or finding opportunities others miss.

Professional arbitrageurs use: API trading (direct exchange API access for fastest execution), co-location (servers physically near exchange data centers), and MEV bots on DEXs (which can reorder transactions within blocks to guarantee execution). The infrastructure cost for competitive arbitrage can reach $10,000-50,000+ annually.

For retail traders, the opportunity lies in: less competitive pairs (small-cap tokens, new listings), cross-chain arbitrage (where bridge times create windows), and event-driven arbitrage (during exchange outages, listing announcements, or chain congestion when professionals struggle too). Manual arbitrage is possible during extreme volatility when opportunities are large enough to survive slower execution.

## Transaction Cost Analysis: The Profit Equation
An arbitrage trade only works if: (Sell Price - Buy Price) > (CEX Fees + DEX Fees + Gas Costs + Slippage). Each component can destroy profitability if not carefully calculated.

CEX fees typically range 0.1-0.3% per trade. DEX fees are usually 0.3% (Uniswap) to 0.05% (some stablecoin pools). Gas fees on Ethereum can range $5-100+ depending on network congestion—a $50 gas fee requires $5,000+ trade size just to break even. Slippage on DEXs depends on trade size relative to pool liquidity—large trades can experience 1-3% slippage.

Example calculation: Buy 1 ETH at $3,000 on Coinbase (0.1% fee = $3), sell on Uniswap at $3,050 (0.3% fee = $9.15, gas = $20). Gross profit: $50. Net profit: $50 - $3 - $9.15 - $20 = $17.85 (0.6% return). This only works if execution is fast enough that prices don't change. Layer 2 solutions (Arbitrum, Optimism) reduce gas costs dramatically, making smaller arbitrage trades viable.

## Flash Loans and Advanced Arbitrage Mechanics
Flash loans are a DeFi innovation that transformed arbitrage. They allow borrowing millions of dollars for the duration of a single transaction with no collateral—if you don't return the funds within the same transaction, the entire transaction reverts as if it never happened.

With flash loans, you can: borrow $1M in USDC, buy ETH on DEX 1 where it's cheap, sell ETH on DEX 2 where it's expensive, repay the loan + tiny fee, and keep the profit—all in one atomic transaction. This eliminates capital requirements and execution risk. Popular flash loan providers include Aave and dYdX.

However, flash loan arbitrage is extremely competitive. MEV (Maximal Extractable Value) bots monitor the mempool for pending arbitrage transactions and front-run them. Flashbots and private transaction pools offer some protection. Writing profitable flash loan bots requires deep Solidity knowledge, understanding of AMM mechanics, and sophisticated MEV protection strategies. This is the realm of professional DeFi developers, not casual traders.

Bron: https://daytraders.nl/strategies/cex-dex-arbitrage-trading