๐Ÿ”’ Custody & Security: Your Keys vs Their Vault

Learn about self-custody risk vs counterparty risk

๐Ÿ” Who Controls Your Funds?

The custody model is the most critical difference between DEXs and CEXs. It determines who holds your private keysโ€”and therefore, who truly owns your crypto.

๐ŸŽฎ Interactive: Custody Model Explorer

Understand how each model handles your funds:

๐Ÿ”

DEX (Self-Custody)

You control your private keys at all times

User Flow
๐Ÿ‘›
Create Wallet
Generate wallet (MetaMask, Ledger)
๐Ÿ“
Secure Seed Phrase
Write down 12-24 word recovery phrase
๐Ÿ”—
Connect to DEX
Approve connection, funds stay in wallet
โœ…
Trade Directly
Sign transactions, settle on-chain
Security Responsibility
You are responsible for securing your keys
โš ๏ธ Risks
  • โ€ข Lost seed phrase = lost funds forever
  • โ€ข Phishing attacks
  • โ€ข Malicious contracts
  • โ€ข No customer support
๐Ÿ›ก๏ธ Protections
  • โ€ข Hardware wallets
  • โ€ข Multisig
  • โ€ข Contract audits
  • โ€ข Test transactions

๐ŸŽฎ Interactive: Security Crisis Scenarios

Explore real-world security failures and their consequences:

๐Ÿšจ

Exchange Hack (CEX Risk)

Hackers exploit exchange security vulnerabilities and drain hot wallets
Real Example: Mt. Gox (2014)
Timeline of Events
1
Discovery
Exchange detects unauthorized withdrawals
Pause withdrawals
2
Investigation
Extent of breach determined
850,000 BTC stolen (~$450M)
3
Aftermath
Exchange declares bankruptcy
Users wait years for recovery
4
Recovery
Partial recovery through creditor process
~20% returned after 10 years
Key Lesson
Custodial risk: When exchange holds keys, hacks affect all users
๐Ÿ›ก๏ธ How to Protect Yourself
Only keep trading amounts on CEXs. Store bulk in self-custody.

The Famous Saying

๐Ÿ”‘
"Not your keys, not your coins"

โ€” Bitcoin Community Maxim

This phrase captures the fundamental security trade-off in crypto. When you deposit funds on a CEX, you're trusting them to:

  • โ€ข Secure the private keys properly
  • โ€ข Not misuse your funds (FTX-style)
  • โ€ข Process withdrawals when requested
  • โ€ข Maintain solvency and avoid bankruptcy

DEXs eliminate this trust requirement by letting you trade directly from your wallet. But this comes with its own responsibilityโ€”you must secure your own keys.

๐Ÿ’ก

Best Practices for Both Models

DEX (Self-Custody)
  • โ€ข Use hardware wallets (Ledger, Trezor)
  • โ€ข Store seed phrase offline, multiple locations
  • โ€ข Test with small amounts first
  • โ€ข Revoke unused token approvals
  • โ€ข Verify contract addresses
  • โ€ข Use separate wallets for DeFi vs holdings
CEX (Custodial)
  • โ€ข Enable 2FA (authenticator, not SMS)
  • โ€ข Whitelist withdrawal addresses
  • โ€ข Only keep trading amounts on exchange
  • โ€ข Verify proof of reserves if available
  • โ€ข Diversify across multiple exchanges
  • โ€ข Withdraw to self-custody regularly