2.3.10 · HinglishCommodities, Forex & Crypto

Learn about crypto exchanges and wallets

4,465 words20 min readRead in English

2.3.10 · Stock-Market › Commodities, Forex & Crypto

Overview

Crypto exchanges aur wallets ek infrastructure layer banate hain jo digital assets ko khareedne, bechne, store karne, aur transfer karne mein help karta hai. Cryptocurrency markets ke saath interact karne se pehle, inki mechanics, security models, aur tradeoffs samajhna zaroori hai.

Figure — Learn about crypto exchanges and wallets

Core Concepts


Centralized Exchanges Kaise Kaam Karte Hain

Operational Model

Jab tum Coinbase jaisa CEX use karte ho:

  1. Account Creation: KYC (Know Your Customer) verification—tum government ID, address proof se apni identity prove karte ho.
  2. Deposit: Tum fiat (bank transfer, credit card) ya crypto (blockchain transfer) exchange ke omnibus wallet mein bhejte ho.
  3. Internal Ledger: Exchange tumhara account credit karta hai. Tumhara balance ab unke off-chain database mein exist karta hai, on-chain nahi.
  4. Trading: Tum orders place karte ho. Exchange tumhe counterparties ke saath instantly match karta hai kyunki yeh sab internal accounting hai—trades ke dauran koi blockchain transactions nahi hoti.
  5. Withdrawal: Tum funds bahar bhejna request karte ho. Exchange unke wallet se tumhare personal wallet mein ek on-chain transaction broadcast karta hai.

Yeh model kyun?

  • Speed: Off-chain matching = millisecond execution, blockchain block confirmations ka intezaar nahi (Bitcoin ke liye 10 min, Ethereum ke liye 12 sec).
  • Complexity: Advanced order types (limit, stop-loss, margin, futures) ko traditional software mein implement karna smart contracts se aasaan hai.
  • Liquidity: Centralized order books buyers/sellers ko aggregate karte hain, bade trades ke liye better prices provide karte hain.

Tradeoffs:

  • Counterparty risk: Exchange bankruptcy (FTX 2022), hacks (Mt. Gox 2014), ya fraud matlab funds ka loss.
  • Custody: "Not your keys, not your coins"—tum exchange ki security aur solvency par trust kar rahe ho.
  • Censorship: Exchange tumhara account freeze kar sakta hai, withdrawals block kar sakta hai (government order, AML flags, terms-of-service violation).

Decentralized Exchanges Kaise Kaam Karte Hain

Operational Model (Automated Market Maker Example)

Uniswap jaisi DEXs order books ki jagah Automated Market Makers (AMMs) use karti hain:

  1. Liquidity Pools: Users token pairs (jaise ETH aur USDC) ek smart contract mein deposit karte hain. Pool mein ab reserves aur hain.
  2. Constant Product Formula: AMM (constant) maintain karta hai.
  3. Swap Execution: Tum USDC se ETH khareedna chahte ho. Tum USDC pool mein bhejte ho; yeh calculate karta hai ki tumhe kitna ETH dena hai taaki constant rahe (minus ek small fee).
  4. Price Discovery: Price = reserves ka ratio. Jaise log ETH khareedते hain, ghatta hai aur badhta hai, toh ETH ki price badhti hai.

Swap formula derive karna: Suppose pool mein token X ka aur token Y ka hai, ke saath. Tum token X bhejte ho. Tumhe token Y ka kitna milega?

Swap ke baad:

Expand karo: R_x R_y - R_x \Delta y + \Delta x R_y - \Delta x \Delta y = R_x R_y$$$R_x R_y$ cancel karo aur $\Delta y$ ke liye solve karo: \Delta x R_y - R_x \Delta y - \Delta x \Delta y = 0\Delta y (R_x + \Delta x) = \Delta x R_y\Delta y = \frac{\Delta x \cdot R_y}{R_x + \Delta x}$$

Yeh form kyun? Jaise badhta hai, denominator barhta hai, toh slower badhta hai (bade trades ke liye worse price milti hai = slippage). Yahi tumhare trade ka price impact hai.

Fee (jaise 0.3%) include karte hue, actual formula ban jaata hai:

AMMs kyun?

  • No order book: Smart contracts on-chain sorted order lists efficiently maintain nahi kar sakte (bahut gas-expensive hai). Constant product ek simple formula hai jo ek transaction mein executable hai.
  • Permissionless: Koi bhi pool create kar sakta hai ya liquidity add kar sakta hai; koi company gatekeeping nahi.
  • Always available: Jab tak blockchain chalti hai aur pool mein liquidity hai, tum 24/7 koi downtime nahi ke saath trade kar sakte ho.

Tradeoffs:

  • Slippage: Bade trades ko progressively worse prices milti hain. CEX par, ek bada order narrow price range mein fill ho sakta hai; DEX par, tum pool curve move kar rahe ho.
  • Gas fees: Har swap ek on-chain transaction hai. Congestion ke dauran Ethereum gas $5–$50+ cost kar sakta hai.
  • Impermanent loss: Agar tum liquidity provide karte ho aur prices diverge ho jaati hain, toh tumhare paas tokens hold karne se kam value ho sakti hai.
  • Smart contract risk: DEX code mein bugs ya exploits funds drain kar sakte hain.

[!example] DEX Swap Calculation Scenario: Uniswap ETH/USDC pool mein ETH, USDC hai. Current price: $2,000/ETH. Tum 10,000 USDC se ETH swap karna chahte ho. Fee = 0.3%. Step 1: ETH received calculate karo (pehle bina fee ke, clarity ke liye): se divide kyun? Hum pool mein USDC add kar rahe hain, toh denominator badhta hai, ETH output ghatta hai.

Step 2: 0.3% fee include karo:

Step 3: Implied price: *\frac{2{,}000{,}000}{1000} = 2000\frac{2{,}010{,}000}{995.037} \approx 20202,014.91 hai.

Slippage: . Ek chhote trade ke liye, yeh tolerable hai; ek 100,000 USDC trade mein bahut zyada slippage hogi.


Wallet Security Model

Private Keys aur Seed Phrases

Tumhara wallet ek 12-word ya 24-word seed phrase display karta hai (jaise "witch collapse practice feed shame open despair creek road again ice least..."). Yeh phrase tumhara private key hi hai, words mein easier backup ke liye encode kiya gaya hai.

Derivation process (BIP39 standard):

  1. Seed phrase → 512-bit seed (PBKDF2 hashing ke through)
  2. Seed → Master private key (HMAC-SHA512 ke through)
  3. Master key → Different accounts/addresses ke liye child keys (hierarchical deterministic derivation)

Kyun? Ek phrase Bitcoin, Ethereum, etc. ke liye infinite addresses generate kar sakta hai, ek deterministic sequence mein. Ek baar backup karo, sab kuch recover karo.

Security principles:

  • Seed phrase kabhi share mat karo: Koi bhi jiske paas yeh hai woh tumhara wallet recreate karke saare funds chura sakta hai. Koi legitimate service kabhi iske liye nahi poochegi.
  • Offline backup: Paper/metal par likho, safe ya bank deposit box mein rakho. Recovery ke alawa kabhi computer mein type mat karo.
  • Multi-sig wallets: Transactions sign karne ke liye of keys require karta hai (jaise 2-of-3). Single key compromise se protect karta hai. Institutions use karte hain.

Regulatory aur Practical Considerations

Centralized Exchanges par KYC/AML

KYC (Know Your Customer) aur AML (Anti-Money Laundering) regulations exchanges se require karte hain ki woh:

  • User identity verify karein (government ID, selfie, proof of address)
  • Suspicious patterns ke liye transactions monitor karein (large/rapid transfers, sanctioned entities se connections)
  • Regulators ko report karein (US mein FinCEN, UK mein FCA, etc.)

Exchanges yeh enforce kyun karte hain:

  • Legal compliance: KYC ke bina operate karna = exchange operators ke liye potential criminal charges.
  • Banking relationships: Exchanges ko fiat on/off ramps chahiye (banks ke saath partnerships). Banks AML compliance require karte hain.

Users ke liye implications:

  • Privacy tradeoff: Tumhare trades tumhari identity se linked hain, blockchain addresses ki pseudonymous nature ke unlike.
  • Jurisdictional risk: Exchange tumhare government ke orders comply karna padega (asset freezes, tax reporting).
  • DEX appeal: Non-custodial DEXs KYC require nahi karte kyunki woh kabhi funds custody nahi karte—tum directly apne wallet se trade karte ho.

Taxation

Zyaadatar jurisdictions mein (US, UK, India, EU), cryptocurrency tax purposes ke liye property hai (currency nahi):

  • Capital gains tax: Crypto bechna (kisi doosre crypto ke liye bhi) = taxable event. Agar tumne BTC 40k par becha, tum $20k gain par tax owe karte ho.
  • Income tax: Crypto receive karna (mining rewards, staking, airdrops, salary) = fair market value par ordinary income.
  • Record-keeping burden: Tumhe har transaction ke liye cost basis aur date track karna hoga. Exchanges CSV exports provide karte hain; wallets nahi karte (tumhe Koinly, CoinTracker jaisi third-party tools chahiye).

Common mistake: Cryptos ke beech trading (BTC → ETH) "sale count nahi hoti". Galat—yeh BTC appreciation par capital gains trigger karta hai.


Connections

  • Blockchain fundamentals — samajhna ki transactions kaise verify aur record hoti hain
  • Order book vs AM trading — exchange mechanism design mein deeper dive
  • DeFi protocols — wallets kaise lending, borrowing, yield farming ke saath interact karte hain
  • Cryptocurrency market structure — exchanges price discovery aur liquidity ko kaise affect karte hain
  • Digital asset custody solutions — institutional-grade multi-sig aur insurance options
  • Smart contract security — DeFi protocols se wallets connect karne ke risks
  • Tax accounting for crypto trades — cost basis methods ka detailed treatment (FIFO, LIFO, specific ID)

Active Recall Practice

Recall Ek 12-saal ke bachche ko explain karo

Imagine karo tumhare paas special video game coins (cryptocurrency) hain. Yeh coins khareedne ya bechne ke liye tumhe do cheezein chahiye:

  1. Ek exchange (jaise ek store jahan log game coins trade karte hain). Kuch stores ek company run karti hai (centralized)—tum unhe apne coins hold karne dete ho, aur woh tumhe apne computers par super fast trade karne dete hain. Doosre stores zyaadatar ek vending machine jaisi hoti hain (decentralized)—tum apne wallet se directly doosre logon ke saath ek smart program mein automatic rules ke through trade karte ho. Koi company boss tumhara account close nahi kar sakta kyunki koi company hi nahi hai!

  2. Ek wallet (tumhare coins ke liye ek backpack jaisa, lekin digital). Tumhare wallet mein ek secret password (private key) hota hai jo prove karta hai ki coins tumhare hain. Agar tum password paper par likhte ho aur kisi safe jagah chupaate ho, woh ek "cold wallet" hai (jaise khazana gaadhna). Agar tum ise apne phone par rakhte ho taaki tum kabhi bhi coins spend kar sako, woh ek "hot wallet" hai (use karna aasaan, lekin agar kisi ne tumhara phone hack kiya, woh password chura ke tumhare coins le sakta hai).

Zaroori rule: Agar tum apne coins company ke store mein rakhte ho, woh tumhari taraf se password hold kar rahe hain. Yeh aasaan hai, lekin agar store loot ho jaye ya bankrupt ho jaye, tum apne coins khoh dete ho. Agar tum vending-machine-style exchange use karte ho aur password apne khud ke backpack mein rakhte ho, tum control mein ho, lekin tumhe bhi bahut careful rehna hoga apna password khoye nahi—koi "forgot password" button nahi hai kyunki doosra koi ise jaanta hi nahi!


Mnemonics & Memory Aids


#flashcards/stock-market

Crypto exchanges ke do main types kya hain aur unka key tradeoff kya hai? :: Centralized exchanges (CEX) jaise Coinbase speed, liquidity, aur convenience offer karte hain lekin exchange par custody ke liye trust karna padta hai (counterparty risk). Decentralized exchanges (DEX) jaise Uniswap non-custodial trading aur censorship resistance offer karte hain lekin higher slippage, gas fees hain aur users ko apni keys manage karni padti hain.

Crypto wallets mein private key, public key, aur address mein kya difference hai?
Private key ek secret number hai jo transactions sign karta hai aur ownership prove karta hai. Public key mathematically private key se elliptic curve cryptography use karke derive hoti hai aur signatures verify karne ke kaam aati hai. Address public key ka ek shortened hash hai (jaise 0x123..) jo tumhara receiving address serve karta hai. Sirf private key funds spend kar sakti hai; ise kho dena matlab irreversible loss of access.
AMM-based DEXs mein constant product formula kaise kaam karta hai?
Uniswap jaisi AMM mein, liquidity pools k = R_x × R_y (constant) maintain karte hain. Jab tum Δx token X swap karte ho token Y ke liye, formula Δy = (Δx × R_y) / (R_x + Δx) determine karta hai ki tumhe kitna Y milega. Jaise tum ek token zyaada khareedते ho, uska reserve ghatta hai, har additional unit ko zyaada mehnga banaata hai (slippage cause karta hai).
Crypto mein "not your keys, not your coins" kyun important hai?
Jab tum centralized exchange par crypto hold karte ho, exchange private keys control karta hai, tum nahi. Tumhare paas IOU hai, blockchain par actual ownership nahi. Agar exchange hack ho jaye (Mt. Gox), bankrupt ho jaye (FTX), ya tumhara account freeze kare, tum apne funds access kho sakte ho. True ownership matlab hai us address se transactions sign karne wali private key possess karna jahan tumhare coins hain.
DEXs par slippage kya hai aur kyun hoti hai?
Slippage expected price aur executed price ke beech ka difference hai. AMM-based DEXs par, tumhara trade pool ka reserve ratio change karta hai (k = R_x × R_y se). Bade trades ek token zyaada remove karte hain, uski price progressively badhate hue. Example: ETH khareedna jab pool mein 1000 ETH hai, pehli bit 2020 par, averaging $2010 (0.5% slippage).
Seed phrase ka purpose kya hai aur ise secure kaise karna chahiye?
Ek seed phrase (12 ya 24 words) BIP39 standard use karke tumhara master private key encode karta hai. Yeh deterministically tumhare saare wallet addresses generate kar sakta hai. Security: paper/metal par likho, kabhi digitally nahi (koi photos, cloud storage, email nahi). Offline safe ya bank deposit box mein rakho. Kabhi kisi ke saath share mat karo—seed phrase ka possession = saare funds par full control.
Cryptocurrency mein capital gains tax kab trigger hota hai?
Crypto bechna fiat ke liye, ek crypto ko doosre se trade karna, ya crypto se goods/services khareedna zyaadatar jurisdictions mein taxable events hain (crypto ko currency ki jagah property treat karte hue). Har event mein capital gain/loss calculate karna padta hai: sale price minus cost basis. Holding tax trigger nahi karta; disposing karta hai. BTC ko ETH ke liye trade karna = BTC ko current value par bechna (taxable).
Custodial aur non-custodial wallets mein kya difference hai?
Custodial wallets (exchange accounts) = third party tumhare private keys hold karta hai, tum unpar trust karte ho. Use karna aasaan, email/phone se account recover kar sakte ho, lekin exchange hacks aur bankruptcy ke liye vulnerable. Non-custodial wallets (MetaMask, hardware wallets) = tum apni private keys hold karte ho, security aur backups ki responsibility tumhari hai. Koi counterparty risk nahi, lekin keys kho do = funds permanently kho jaate hain.
Centralized exchanges KYC kyun require karte hain?
KYC (Know Your Customer) zyaadatar jurisdictions mein legally required hai AML (Anti-Money Laundering) regulations comply karne ke liye. Exchanges ko fiat on/off ramps ke liye banking partnerships chahiye; banks AML compliance demand karte hain. Exchanges ko identity verify karni hoti hai, suspicious activity monitor karni hoti hai, aur financial regulators ko report karna hota hai. KYC ke bina operate karna criminal charges aur banking access kho jaane ka risk rakhta hai.
Liquidity provision mein impermanent loss kya hai?
Jab tum AMM pool mein liquidity provide karte ho (jaise ETH aur USDC equal value mein deposit karo), tum trading fees earn karte ho lekin impermanent loss face karte ho agar prices diverge ho jaayein. Agar ETH double ho jaye, pool rebalance ho jaata hai (tum uthne hi hold karne se kam ETH, zyaada USDC ke saath end karte ho). Loss "impermanent" hai kyunki yeh disappear ho jaata hai agar prices original ratio par return ho jaayein. Sirf tab realize hota hai jab tum liquidity withdraw karte ho.

Concept Map

includes

includes

matches

split into

split into

custodies via

connects to

stores

proves

recorded on

hot vs cold

Crypto Infrastructure

Crypto Exchange

Crypto Wallet

Blockchain

Private Key

Buy and Sell Orders

Centralized CEX

Decentralized DEX

Custodial Keys

Ownership on Chain

Security Tradeoff