Mandera Crypto Center Logo

Module 6: DeFi Universe

Banking Without Banks - The Decentralized Finance Revolution

Decentralized Finance

4 Essential Topics 65-85 Minutes Advanced Level

Welcome to the world of Decentralized Finance - where you can earn interest, borrow, lend, and trade without traditional banks. Discover how DeFi is creating a new financial system open to everyone.

1

What is DeFi? Banking Without Banks

The College Student Story

Meet Maria, a college student in Kenya. She needs a $500 loan for textbooks but:

  • No bank will give her a loan (no credit history)
  • Local lenders charge 20% monthly interest
  • She has $1,000 in crypto savings

Traditional solution: Go without textbooks or pay predatory rates.

DeFi solution: Maria uses Aave (a DeFi platform) to borrow $500 against her crypto at 5% annual interest. She keeps earning yield on her collateral while accessing funds instantly!

Traditional Finance vs DeFi

Traditional Bank
  • Open 9-5, weekdays only
  • Need SSN/ID documents
  • 0.01% savings interest
  • 5-7% loan interest
  • 3-5 day loan approval
  • Can freeze your account
  • Serves 30% of world
DeFi Protocol
  • Open 24/7/365
  • Need only crypto wallet
  • 3-20% savings interest
  • 2-10% loan interest
  • Instant loan approval
  • No one can freeze funds
  • Serves 100% of world

How DeFi Actually Works

DeFi replaces banks with smart contracts and liquidity pools:

1. Liquidity Pools

Users deposit crypto into smart contracts that form trading pairs (like ETH/USDC).

2. Automated Market Makers (AMMs)

Algorithm sets prices based on supply/demand in the pool, not order books.

3. Yield Generation

Liquidity providers earn fees from trades happening in their pools.

4. Over-collateralization

Borrowers deposit more value than they borrow (e.g., $150 ETH for $100 loan).

The Swimming Pool Analogy

Think of a DeFi protocol as a community swimming pool:

  • Liquidity Providers = People adding water to the pool
  • Traders = People swimming in the pool (pay entry fees)
  • Pool Tokens = Receipts showing how much water you contributed
  • Trading Fees = Entry fees distributed to water providers
  • Smart Contract = The pool rules and automatic fee distribution

Quick Quiz

Why do DeFi platforms often offer higher interest rates than traditional banks?

Answer: DeFi offers higher rates because: 1) No physical branches or employees to pay, 2) Automated smart contracts reduce operational costs, 3) Revenue from trading fees is distributed to users, 4) Global access creates larger capital pools, and 5) Higher risk tolerance due to crypto-native nature.

2

Yield Farming & Staking: Earning Passive Income

The Digital Farmer Story

Meet Carlos, a retired teacher from Brazil. He discovered yield farming:

  • March 2021: Deposited $10,000 USDC into a DeFi pool
  • Strategy: Provided liquidity for USDC/DAI pair on Curve
  • Yield: Earned 15% APY + CRV governance tokens
  • Result: After 1 year: $11,500 in value + $800 in CRV tokens
  • Comparison: Brazilian savings account: 2% APY = $200/year

Carlos now earns more from DeFi than his teacher pension!

Understanding Yield Farming

Staking

Simple version: Lock coins to secure network

Examples: ETH 2.0, ADA, SOL staking

APY: 3-10%

Risk: Low-medium

Liquidity Providing

Medium level: Provide trading pairs on DEX

Examples: Uniswap, SushiSwap pools

APY: 10-50%

Risk: Medium-high

Yield Farming

Advanced: Chase highest yields across protocols

Examples: Compound, Aave, Yearn

APY: 50-1000%+

Risk: Very high

The Impermanent Loss Danger

Impermanent Loss: The biggest risk for liquidity providers!

The ETH/USDC Pool Example

You deposit 1 ETH ($2,000) + $2,000 USDC into a pool (total $4,000).

Scenario 1: ETH price doubles

  • ETH goes to $4,000
  • If you just held: Your 1 ETH + $2,000 USDC = $6,000
  • In pool: You get less ETH, more USDC ≈ $5,656
  • Impermanent Loss: $6,000 - $5,656 = $344 loss

When it's worth it: If trading fees earned > Impermanent Loss

Example: You lose $344 from IL but earn $500 in fees = $156 profit

The Ice Cream Shop Analogy

Imagine you and a friend open an ice cream shop:

  • You contribute: 50 chocolate + 50 vanilla tubs
  • Customers trade: Chocolate for vanilla, vice versa
  • Price changes: Chocolate becomes more popular
  • Result: You end with 40 chocolate, 60 vanilla tubs
  • Impermanent Loss: If chocolate price doubled, your 50 tubs would be worth more than current 40+60 mix

But if you earned enough from sales, it's still profitable!

Safe Yield Farming Strategies

  1. Stablecoin Pairs Only - USDC/DAI has near-zero impermanent loss
  2. Use Established Protocols - Aave, Compound, Uniswap (audited)
  3. Start Small - Test with $100 before committing more
  4. Diversify - Spread across multiple protocols
  5. Monitor Regularly - Check positions weekly
  6. Understand the Tokenomics - Don't farm worthless governance tokens
3

Decentralized Exchanges (DEXs) & Automated Market Makers

The Uniswap Creation Story

In 2018, Hayden Adams was a mechanical engineer who lost his job. He taught himself to code and built Uniswap as an experiment.

The problem: Traditional exchanges (like Coinbase) are centralized, require KYC, and list few tokens.

Uniswap's solution: Anyone can create a trading pair instantly, no registration needed!

Result: Uniswap now processes billions in daily volume and made Hayden a crypto billionaire.

CEX vs DEX Comparison

Centralized Exchange (CEX)

Coinbase, Binance

  • Company controls funds
  • Order book matching
  • KYC required
  • Limited token listings
  • Can freeze accounts
  • Higher fees (0.1-0.5%)
  • Customer support
Decentralized Exchange (DEX)

Uniswap, SushiSwap

  • You control funds
  • Liquidity pool based
  • No KYC needed
  • Any token tradable
  • No freezing possible
  • Lower fees (0.01-0.3%)
  • No customer support

How Automated Market Makers Work

DEXs use a simple formula: x × y = k

x = Amount of Token A in pool
y = Amount of Token B in pool
k = Constant (always stays same)
Simple Example: ETH/USDC Pool

Pool has: 100 ETH and 200,000 USDC (k = 20,000,000)

You want to buy 1 ETH:

  1. New pool: 99 ETH (100-1)
  2. Calculate needed USDC: k ÷ 99 = 202,020 USDC
  3. You pay: 202,020 - 200,000 = 2,020 USDC
  4. Price per ETH: 2,020 USDC

Key insight: Larger trades cause bigger price impact!

Uniswap

Launch: 2018

Fees: 0.3% per trade

TVL: $5B+

Special: Industry standard, most liquidity

SushiSwap

Launch: 2020

Fees: 0.25% per trade

TVL: $500M+

Special: Yield farming rewards

Curve Finance

Launch: 2020

Fees: 0.04% per trade

TVL: $4B+

Special: Stablecoin swaps only

PancakeSwap

Launch: 2020

Fees: 0.2% per trade

TVL: $2B+

Special: Runs on Binance Smart Chain

The Farmers Market vs Supermarket Analogy

Centralized Exchange (Coinbase) = Supermarket

  • Set hours (9-5 customer support)
  • Limited selection (curated tokens)
  • Higher prices (fees)
  • Can ban customers (freeze accounts)
  • Requires ID (KYC)

Decentralized Exchange (Uniswap) = 24/7 Farmers Market

  • Open 24/7 (no closing time)
  • Anyone can set up stall (any token)
  • Lower prices (fees to farmers)
  • Can't ban anyone (permissionless)
  • No ID needed (anonymous)
4

Risks, Security & The Future of DeFi

The $600 Million Hack Story

In August 2021, Poly Network (a DeFi protocol) was hacked for $600 million - the largest crypto hack in history.

The twist: The hacker returned ALL the funds days later, calling it "for fun" and to expose vulnerabilities.

The lesson: Even with returned funds, this exposed critical DeFi risks:

  • Smart contract vulnerabilities
  • Centralized components in "decentralized" systems
  • Speed of innovation outpacing security

Major DeFi Risks

Smart Contract Risk

Bugs in code can drain funds. Always use audited protocols.

Impermanent Loss

Liquidity providers can lose vs holding assets.

Oracle Risk

If price feeds are wrong, protocols make bad decisions.

Governance Risk

Token holders might vote for bad changes.

Regulatory Risk

Governments might ban or restrict DeFi.

How to Stay Safe in DeFi

  1. Start Small - Never invest more than you can afford to lose
  2. Use Audited Protocols - Check for security audits from reputable firms
  3. Enable Transaction Simulation - Use tools like Tenderly before signing
  4. Revoke Unused Permissions - Use revoke.cash regularly
  5. Use Hardware Wallet - Never use exchange wallets for DeFi
  6. Stay Informed - Follow protocol announcements and security news
  7. Consider Insurance - Protocols like Nexus Mutual offer coverage
The Future of DeFi

Where is DeFi headed? Several exciting trends:

1. Cross-Chain DeFi

Assets moving seamlessly between Ethereum, Solana, Avalanche, etc.

2. Real World Assets (RWA)

Tokenizing real estate, stocks, bonds on blockchain.

3. Institutional DeFi

Banks and funds using DeFi for better returns.

4. SocialFi

Combining social media with DeFi (creator tokens, social trading).

5. Regulation & Compliance

KYC integration while preserving privacy.

Module 6 Quiz

What is "impermanent loss" and when does it become permanent?

Answer: Impermanent loss occurs when providing liquidity to a DEX pool and the price ratio of the paired assets changes. You end up with less value than if you had just held the assets separately. It's called "impermanent" because if prices return to their original ratio, the loss disappears. It becomes permanent when you withdraw your liquidity from the pool at a different price ratio than when you deposited. The loss is locked in once you exit the position.