2.3.11Commodities, Forex & Crypto

Understand stablecoins and DeFi basics

3,080 words14 min readdifficulty · medium

Overview

Stablecoins are cryptocurrencies designed to maintain a stable value (usually pegged to $1 USD), while DeFi (Decentralized Finance) is a blockchain-based financial system that recreates traditional banking services without intermediaries. These represent the "mature" crypto use-cases beyond speculation.


Stablecoins: Digital Dollars on Rails

How Fiat-Collateralized Stablecoins Work

The Mechanics (USDC example):

  1. Circle (the issuer) holds $1 million USD in a bank account
  2. They mint 1 million USDC tokens on Ethereum
  3. When you want to redeem, you burn 1 USDC → get $1 USD back
  4. Arbitrage keeps price at $1: if USDC trades at $1.02, arbitrageurs buy USD at $1, mint USDC, sell at $1.02 for instant profit until price normalizes

WHY this works: The issuer's redemption guarantee creates a hard floor/ceiling. Market forces do the rest.

Crypto-Collateralized: DAI Example

How DAI maintains $1 peg without holding dollars:

  1. Over-collateralization: Lock $150 of ETH to mint $100 DAI (150% collateral ratio)
  2. Liquidation mechanism: If ETH drops and collateral ratio falls below 130%, your vault gets liquidated (collateral sold to cover the DAI debt + penalty)
  3. Stability fee: Annual interest rate (like 2%) on borrowed DAI, burns supply to maintain peg

WHY over-collateralize? Crypto is volatile. The buffer ensures there's always enough value to back every DAI, even during flash crashes.


DeFi: Rebuilding Finance Without Banks

Core DeFi Primitives

1. Decentralized Exchanges (DEXs)

Traditional exchange model:

  • Order book: Buyers post bids, sellers post asks, exchange matches them
  • Problem: Requires centralized servers, vulnerable to hacks/manipulation

Automated Market Maker (AMM) model:

2. Lending Protocols (Aave, Compound)

How it works:

  1. Supply side: You deposit1,000 USDC → earn 3% APY (interest comes from borrowers)
  2. Borrow side: You deposit $2,000 of ETH as collateral → borrow 1,000 USDC at 5% APY
  3. Liquidation: If ETH drops and your collateral ratio falls below threshold (say 125%), liquidators buy your collateral at a discount to repay your debt

3. Yield Farming & Liquidity Mining

The mechanism:

  • Provide liquidity to an AMM pool (e.g., deposit 1 ETH + 2,000 USDC into Uniswap)
  • Earn trading fees (0.3% of every swap through the pool, split among LPs)
  • Earn governance tokens (protocols reward LPs with their native token, e.g., UNI)

Risk Framework for DeFi

Key risks:

  1. Smart contract bugs: Code exploits (e.g., reentrancy attacks)
  2. Oracle failures: Price feeds manipulated → wrong liquidations
  3. Governance attacks: Whales vote to drain treasury
  4. Regulatory risk: Protocol gets deemed illegal, tokens worthless
  5. Composability risk: Your yield farm depends on 5 protocols—if one fails, cascade

Risk mitigation:

  • Use audited protocols (Trail of Bits, OpenZeppelin audits)
  • Diversify across protocols (don't put everything in one farm)
  • Understand liquidation thresholds (set alerts at 150% collateral ratio)
  • Start small—DeFi is still experimental (treat it like venture capital, not savings)

Visual Summary

Figure — Understand stablecoins and DeFi basics

Recall Feynman Technique: Explain to a 12-Year-Old

Imagine regular money, but on the internet, running on a giant shared spreadsheet everyone can see (blockchain).

Stablecoins are like digital dollar bills—each coin is always worth $1. How? Some companies (like Circle) promise: "Give me this coin, I'll give you a real dollar." Other stablecoins lock up more valuable crypto (like locking $150 of gold to borrow $100) so there's always enough value to back them.

DeFi is like playing banker, but there's no actual bank. You can lend your digital dollars to strangers (the computer handles it), and they pay you interest. Or you can be a "liquidity provider"—imagine you put aples and oranges in a vending machine, and every time someone trades aples for oranges, you get a tiny fee. The vending machine runs automatically with code (smart contracts), no human needed.

The catch? If the code has a bug, someone might steal everything. If prices crash, you might lose money even though you "did everything right." It's like playing grown-up finance but with training wheels that can still fall off.


Connections

  • Cryptocurrency-basics - Prerequisites: blockchain, walets, gas fees
  • Smart-contracts-and-Ethereum - Technical foundation for DeFi
  • Decentralized-exchanges - Deep dive into AMM math and DEX types
  • Yield-farming-strategies - Advanced farming techniques and risk management
  • Traditional-bankingvs-DeFi - Comparative analysis of centralized vs. decentralized finance
  • Crypto-security-best-practices - Protecting your funds in DeFi
  • Liquidity-pools - Mechanics of providing liquidity

#flashcards/stock-market

What are the three main types of stablecoins? :: 1) Fiat-collateralized (backed by USD in banks, e.g., USDC), 2) Crypto-collateralized (over-collateralized by crypto, e.g., DAI), 3) Algorithmic (supply/demand algorithms, high-risk)

How does arbitrage maintain a stablecoin's $1 peg?
If price > $1: arbitrageurs buy USD, mint stablecoin, sell it → increases supply → price falls. If price < $1: buy stablecoin cheap, redeem for $1 → decreases supply → price rises. Equilibrium at $1 ± transaction costs.
What is the Uniswap constant product formula?
x · y = k, where x and y are token amounts in the pool, k is constant. Price of token A = y/x. Swaps change x and y but maintain k, causing slippage on large trades.
Why do crypto-collateralized stablecoins require over-collateralization?
Crypto is volatile. A buffer (e.g., 150% collateral ratio) ensures there's always enough value to back every stablecoin, even during price crashes. Below threshold (e.g., 130%), liquidation occurs.
What is impermanent loss in an AMM?
Loss vs. holding assets separately when you provide liquidity to a pool and prices change. Formula: IL = 2√r/(1+r) - 1, where r = price ratio. Example: if ETH doubles, you lose 5.7% vs. just holding. Pools rebalance your position as prices move.

Define DeFi and its key properties :: Decentralized Finance—financial services (lending, trading, insurance) on public blockchains using smart contracts. Properties: permissionless (no KYC), transparent (on-chain), composable (protocols stack), non-custodial (you control keys).

How do DeFi lending protocols calculate supply APY?
Supply APY = Utilization Rate × Borrow APY × (1 - Reserve Factor). Where Utilization = Total Borrowed / Total Supplied. High utilization → higher rates to incentivize supply. Reserve factor funds protocol maintenance.
What is a liquidation in DeFi lending?
When your collateral value falls and collateral ratio drops below threshold (e.g., 125% in Aave), liquidators buy your collateral at a discount to repay your debt + penalty. Protects lenders from undercollateralized loans.
What risks make DeFi yields not "free money"?
1) Impermanent loss from price divergence, 2) Smart contract bugs and hacks, 3) Rug pulls (team dumps tokens), 4) High gas fees, 5) Composability risk (cascading failures). Real APY = Nominal - Losses - Costs - Risk.
What triggers a stablecoin depeg event?
Loss of confidence in backing (e.g., issuer insolvency), oracle failures, liquidity crises (mass redemptions), or algorithmic mechanism failures (death spirals like UST/LUNA). Arbitrage can't fix if fundamental backing is broken.

Concept Map

creates need for

stable value pegged to

type

type

type

backed 1:1 by

redemption enforces

converges price to

uses 150% ratio

high risk of

enable

recreates banking without

Crypto volatility

Stablecoins

1 USD peg

Fiat-collateralized USDC USDT

Crypto-collateralized DAI

Algorithmic UST

USD in bank reserves

Arbitrage mechanism

Over-collateralization

De-peg failures

DeFi services

Intermediaries

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, stablecoins ka core idea bahut simple hai — normal crypto jaise Bitcoin toh itna volatile hota hai ki tum uske se coffee bhi nahi khareed sakte, kyunki jab tak tum counter tak pahunchoge, price 10% upar-neeche ho chuka hoga. Isiliye stablecoins bane — yeh ek aisi cryptocurrency hai jiski value $1 ke aaspaas fix rehti hai, matlab crypto duniya ke "dollar bills." Sabse common type hai fiat-collateralized (jaise USDC, USDT), jismein issuer company real mein bank mein $1 rakhti hai har 1 token ke against. Jab tum redeem karna chahte ho, token "burn" hota hai aur tumhe $1 wapas mil jaata hai.

Ab sabse important cheez samajhna — yeh peg ($1 wali value) actually maintain kaise hoti hai? Iska jawaab hai arbitrage. Maan lo USDC market mein $0.98 pe trade ho raha hai (jaise SVB bank scare ke time hua tha March 2023 mein). Toh smart traders 100,000 USDC $98,000 mein khareedenge, phir Circle se seedha redeem karke $100,000 nikaal lenge — $2,000 ka instant profit! Yeh buying pressure automatically price ko wapas $1 pe le aata hai. Isi tarah agar price $1.02 ho jaaye, toh log $1 deposit karke naye tokens mint karke bechenge, jisse supply badhti hai aur price gir jaati hai. Toh market forces khud hi price ko $1 ke aaspaas balance kar dete hain, jab tak issuer solvent hai.

DAI thoda alag hai — yeh dollars nahi rakhta, balki crypto (ETH) ko over-collateralize karke banta hai. Matlab $100 DAI banane ke liye tumhe $150 ka ETH lock karna padta hai, kyunki crypto volatile hai aur buffer chahiye. Agar ETH ki value gir jaaye aur collateral ratio 130% se neeche chala jaaye, toh tumhara vault liquidate ho jaata hai. Yeh sab samajhna zaroori hai kyunki yeh crypto ka "mature" use-case hai — sirf speculation nahi, balki real financial system. Aur ek warning yaad rakhna: "stable" ka matlab risk-free nahi hota — agar issuer ke paas reserves na ho, toh peg toot bhi sakta hai (jaise algorithmic UST crash ho gaya tha).

Test yourself — Commodities, Forex & Crypto