Introduction to DeFi
Reimagining Financial Services
Introduction
Imagine a financial system that operates without banks, brokers, or institutions. Where anyone with an internet connection can access financial services regardless of nationality, credit history, or wealth. Where the rules are transparent and enforced by code rather than contracts and courts. This is the vision of decentralized finance, or DeFi.
DeFi represents one of blockchain's most significant applications—recreating traditional financial services using smart contracts on public blockchains. By removing intermediaries, DeFi aims to make finance more accessible, efficient, and transparent.
This lesson introduces DeFi: what it is, how it works, and the ecosystem of protocols that have emerged to provide lending, trading, and other financial services.
What Is DeFi?
DeFi refers to financial services built on public blockchains using smart contracts. Unlike traditional finance where institutions serve as intermediaries, DeFi protocols execute financial operations automatically through code.
Key Characteristics:
Permissionless Access:
- Anyone can use protocols without approval
- No credit checks, identity verification, or minimum balances
- Only need internet connection and wallet
Transparency:
- All transactions visible on blockchain
- Smart contract code is public
- Anyone can audit how protocols work
Composability:
- Protocols can be combined like building blocks
- One protocol can build on another
- Creates "DeFi Legos"
Self-Custody:
- Users control their own funds
- No reliance on institutional custody
- "Not your keys, not your coins"
Where DeFi Operates:
DeFi primarily operates on Ethereum, though similar protocols exist on:
- Ethereum Layer 2s (Arbitrum, Optimism)
- Alternative L1s (Solana, Avalanche, BNB Chain)
- Each ecosystem has its own protocols
The DeFi Stack
DeFi operates in layers, similar to how the internet has layers:
Settlement Layer:
- The underlying blockchain (Ethereum, etc.)
- Provides security and consensus
- Final source of truth for transactions
Asset Layer:
- Tokens representing value
- Native cryptocurrencies (ETH)
- Stablecoins (USDC, DAI)
- Wrapped assets
- Synthetic assets
Protocol Layer:
- Smart contracts implementing financial logic
- Lending protocols
- Decentralized exchanges
- Derivatives platforms
Application Layer:
- User interfaces for interacting with protocols
- Web apps and wallets
- Portfolio trackers
Aggregation Layer:
- Combines multiple protocols
- Optimizes across venues
- Simplifies user experience
This layered architecture enables innovation at each level without changing underlying layers.
Total Value Locked (TVL)
Total Value Locked is the primary metric for measuring DeFi adoption.
What TVL Measures:
TVL represents the total value of assets deposited in DeFi protocols:
- Collateral in lending protocols
- Liquidity in DEXs
- Assets in yield strategies
Historical Context:
- DeFi Summer 2020: TVL exploded from ~$1B to over $10B
- Peak: Over $180B in late 2021
- Post-crash: Settled to $50-100B range
- Fluctuates with crypto market conditions
Limitations:
TVL isn't a perfect metric:
- Can be inflated through recursive borrowing
- Doesn't distinguish active from passive deposits
- Same dollar may be counted multiple times
- Doesn't measure actual usage
Why It Matters:
Despite limitations, TVL provides insight into:
- Capital flows between protocols
- Relative protocol popularity
- Overall DeFi growth trends
Key Protocol Categories
DeFi encompasses numerous protocol types:
Decentralized Exchanges (DEXs):
Enable trading without centralized intermediaries:
- Automated Market Makers (Uniswap, Curve)
- Order book DEXs (dYdX)
- Aggregators (1inch)
We'll explore DEXs in detail in the next lesson.
Lending Protocols:
Allow depositing to earn interest and borrowing against collateral:
- Aave
- Compound
- MakerDAO
Covered in Lesson 5.3.
Derivatives:
Synthetic exposure and leverage:
- Perpetual futures (GMX, dYdX)
- Options (Opyn, Hegic)
- Synthetic assets (Synthetix)
Yield Aggregators:
Automatically optimize returns:
- Yearn Finance
- Convex Finance
- Auto-compound strategies
Insurance:
Coverage against smart contract risks:
- Nexus Mutual
- InsurAce
Bridges:
Connect different blockchains:
- Across
- Stargate
- (Note: Significant security risks)
Benefits and Innovations
Global Access:
Anyone with internet can use DeFi:
- No bank account required
- No geographic restrictions
- No minimum balance requirements
Composability:
Protocols combine in novel ways:
- Flash loans enable uncollateralized borrowing within single transactions
- Complex strategies built from simple primitives
- Innovation happens faster than traditional finance
Transparency:
All rules visible in code:
- No hidden fees or terms
- Audit before using
- Know exactly how protocols work
Efficiency:
Automation reduces costs:
- No human processing
- 24/7 operation
- Lower overhead than traditional institutions
Permissionless Innovation:
Anyone can build:
- No licenses required (though regulations apply)
- Open-source building blocks
- Rapid experimentation
Risks and Challenges
Smart Contract Risk:
Code can have bugs:
- Bugs can result in complete loss of funds
- Audits help but don't guarantee safety
- Immutable code can't be patched
Oracle Manipulation:
External data can be manipulated:
- Incorrect price feeds enable attacks
- Flash loan attacks have exploited oracles
- Critical for lending and derivatives
Liquidation Cascades:
Falling prices can trigger selling spirals:
- Undercollateralized positions get liquidated
- Liquidations create selling pressure
- More price drops trigger more liquidations
Governance Attacks:
Protocol governance can be captured:
- Accumulate voting power
- Pass malicious proposals
- Drain protocol resources
Regulatory Uncertainty:
Legal status often unclear:
- Securities regulations may apply
- AML/KYC requirements
- Varies by jurisdiction
User Experience:
Currently requires significant knowledge:
- Managing private keys
- Understanding gas fees
- Navigating complex interfaces
- High risk of user error
Key Takeaways
- DeFi recreates financial services using smart contracts on public blockchains without traditional intermediaries
- Key characteristics include permissionless access, transparency, composability, and self-custody
- Total Value Locked (TVL) measures capital deposited in DeFi protocols
- Major protocol categories include DEXs, lending, derivatives, yield aggregators, and insurance
- Significant risks include smart contract bugs, oracle manipulation, and regulatory uncertainty
Summary
DeFi represents a fundamental reimagining of financial services using blockchain technology and smart contracts. By removing intermediaries, DeFi aims to make finance more accessible and efficient while introducing new risks. The ecosystem has grown rapidly, demonstrating both the potential of programmable finance and the challenges of building reliable financial infrastructure on nascent technology.

