DeFiNotebook
DeFi Basics

What is DeFi?

Important Disclaimer

This is not financial advice. DeFi involves significant risks. Never invest more than you can afford to lose, and always do your own research (DYOR). Read our full disclaimer.

What is DeFi?

Decentralized Finance, commonly known as DeFi, represents a fundamental reimagining of how financial systems can operate. It's a movement to create an open, permissionless, and transparent financial system built on blockchain technology—one that operates without traditional intermediaries like banks, brokers, or exchanges.

Understanding the Basics

Traditional Finance vs. DeFi

To understand DeFi, it helps to first understand how traditional finance works:

Traditional Finance (TradFi)

  • Centralized: Banks and institutions control your money
  • Permissioned: You need approval to open accounts and access services
  • Opaque: Internal operations and decision-making are hidden
  • Intermediated: Third parties facilitate all transactions
  • Slow: Transactions can take days, especially internationally
  • Restricted: Limited by geography, business hours, and regulations
  • Custodial: Institutions hold your assets

Decentralized Finance (DeFi)

  • Decentralized: No single entity controls the system
  • Permissionless: Anyone with internet can participate
  • Transparent: All code and transactions are publicly visible
  • Direct: Peer-to-peer transactions without intermediaries
  • Fast: Transactions typically complete in seconds to minutes
  • Borderless: Operates 24/7 globally
  • Self-Custodial: You control your own assets

How DeFi Works

The Foundation: Blockchain Technology

DeFi is built on blockchain networks—distributed ledgers that record all transactions across a network of computers. The most popular blockchain for DeFi is Ethereum, though many others are emerging.

Key characteristics of blockchains:

  • Immutable: Once recorded, transactions cannot be altered
  • Transparent: Anyone can verify all transactions
  • Decentralized: No central authority controls the network
  • Programmable: Smart contracts enable complex financial logic

Smart Contracts: The Engine of DeFi

Smart contracts are self-executing programs stored on the blockchain that automatically enforce agreements when conditions are met. They're the "code is law" foundation of DeFi.

Example: A lending smart contract might say:

  • "If someone deposits collateral worth $150"
  • "Then allow them to borrow up to $100"
  • "If the collateral value drops below $125, liquidate it"

This all happens automatically, without any human intervention or decision-making.

Tokens: Digital Assets

DeFi uses various types of tokens:

Native Tokens

  • ETH (Ethereum): Used to pay for transactions on Ethereum
  • BTC (Bitcoin): The original cryptocurrency
  • Powers the underlying blockchain

Stablecoins

  • USDC, USDT, DAI: Designed to maintain a stable value (usually $1)
  • Provide price stability within volatile crypto markets
  • Enable DeFi lending, borrowing, and trading without volatility

Protocol Tokens

  • UNI, AAVE, COMP: Represent governance rights in DeFi protocols
  • Often provide fee discounts or revenue sharing
  • Enable decentralized decision-making

Wrapped Tokens

  • WBTC, wETH: Represent other assets on different blockchains
  • Enable cross-chain compatibility
  • Bring liquidity from one ecosystem to another

Core DeFi Use Cases

1. Decentralized Exchanges (DEXs)

What they do: Allow you to trade tokens directly from your wallet without a centralized exchange.

Popular examples: Uniswap, SushiSwap, Curve, PancakeSwap

How they work: Use liquidity pools and automated market makers (AMMs) instead of order books.

Benefits:

  • No KYC (Know Your Customer) required
  • You maintain custody of your assets
  • Trade directly from your wallet
  • Access to thousands of tokens

Risks:

  • Smart contract vulnerabilities
  • Slippage on large trades
  • Impermanent loss for liquidity providers

2. Lending and Borrowing

What they do: Lend your crypto to earn interest, or borrow against your crypto holdings.

Popular examples: Aave, Compound, MakerDAO

How they work:

  • Lenders deposit assets into pools and earn interest
  • Borrowers provide collateral and pay interest to borrow
  • All managed by smart contracts automatically

Benefits:

  • Earn passive income on crypto holdings
  • Borrow without credit checks
  • Instant approval and funding
  • Typically over-collateralized for security

Risks:

  • Liquidation risk if collateral value drops
  • Variable interest rates
  • Smart contract exploits

3. Yield Farming / Liquidity Mining

What it is: Providing liquidity to DeFi protocols in exchange for rewards.

How it works:

  • Deposit token pairs into liquidity pools
  • Earn trading fees from pool activity
  • Receive additional protocol tokens as rewards
  • Compound rewards for higher yields

Benefits:

  • Potentially high returns
  • Multiple revenue streams
  • Participate in protocol governance

Risks:

  • Impermanent loss
  • Smart contract risk
  • Token price volatility
  • Rug pulls and scams

4. Stablecoins

What they are: Cryptocurrencies designed to maintain a stable value.

Types:

  • Fiat-Collateralized: USDC, USDT (backed by USD reserves)
  • Crypto-Collateralized: DAI (backed by crypto collateral)
  • Algorithmic: UST (failed), newer experimental models

Use cases:

  • Store value without volatility
  • Medium of exchange in DeFi
  • Earn yield through lending
  • Bridge between crypto and traditional currency

Risks:

  • Depeg events (losing the $1 peg)
  • Centralization risk (for fiat-backed)
  • Collateral liquidation (for crypto-backed)
  • Algorithm failure (for algorithmic)

5. Derivatives and Synthetic Assets

What they are: Financial contracts whose value is derived from underlying assets.

Examples:

  • Options and futures on crypto assets
  • Synthetic stocks and commodities
  • Leveraged trading positions
  • Perpetual swaps

Use cases:

  • Hedging risk
  • Gaining exposure without owning assets
  • Leveraged trading

Risks:

  • High complexity
  • Amplified losses with leverage
  • Liquidation risk
  • Oracle manipulation

6. Insurance

What it is: Protection against DeFi risks like smart contract failures or exchange hacks.

Popular examples: Nexus Mutual, InsurAce

How it works:

  • Purchase coverage for specific protocols or risks
  • Community assesses claims
  • Payouts if covered events occur

Benefits:

  • Reduces DeFi risk exposure
  • Community-driven assessment
  • Decentralized claims process

Risks:

  • Coverage may not pay out
  • Limited coverage amounts
  • Premium costs reduce yields

The Promise of DeFi

Financial Inclusion

DeFi can serve the 1.7 billion unbanked people worldwide who have internet access but no access to traditional banking services. No credit checks, no minimum balances, no gatekeepers.

Transparency and Trust

All code is open source and all transactions are public. You can verify exactly how protocols work and track where your money goes. "Don't trust, verify."

Composability and Innovation

DeFi protocols can be combined like "money legos." A single transaction might:

  1. Borrow DAI from Aave
  2. Swap it for ETH on Uniswap
  3. Deposit ETH into Lido for staking
  4. Use the staked ETH as collateral for more borrowing

This composability enables rapid innovation impossible in traditional finance.

User Control and Ownership

You have complete control of your assets. No one can freeze your account, reverse your transactions, or restrict your access.

24/7 Global Access

DeFi never closes. Markets operate continuously, and you can access them from anywhere in the world at any time.

The Challenges and Risks

Smart Contract Vulnerabilities

Code bugs can and do lead to exploits. Hundreds of millions have been lost to smart contract hacks. Audits help but don't eliminate risk.

Scalability and Gas Fees

Ethereum transactions can be expensive during high network activity. Layer 2 solutions and alternative chains are addressing this, but with their own trade-offs.

User Experience

DeFi is still technical and intimidating. A wrong address or lost seed phrase means permanent loss of funds. There's no customer service to call.

Regulatory Uncertainty

Governments worldwide are still figuring out how to regulate DeFi. Future regulations could significantly impact the space.

Volatility

Crypto prices are extremely volatile. A 20% daily swing is not unusual. This creates opportunities but also substantial risks.

Scams and Fraud

The permissionless nature means anyone can create a protocol. Rug pulls, Ponzi schemes, and scams are common. Due diligence is essential.

Is DeFi Right for You?

Consider DeFi If You:

  • Value financial sovereignty and control
  • Want access to innovative financial products
  • Are willing to learn and take responsibility
  • Can afford to lose what you invest
  • Appreciate transparency and open systems
  • Want to earn yield on crypto holdings

Be Cautious If You:

  • Can't afford to lose your investment
  • Want guaranteed returns or principal protection
  • Prefer hands-off investing
  • Need customer service and support
  • Are uncomfortable with technology
  • Want regulatory protections

Next Steps in Your DeFi Education

Now that you understand what DeFi is, continue your learning journey:

  1. Key DeFi Concepts: Deep dive into essential terminology and mechanics
  2. Security Best Practices: Learn to protect yourself before engaging with DeFi
  3. Setting Up Your First Wallet: Your gateway to accessing DeFi protocols

Key Takeaways

  • DeFi is financial services without intermediaries, built on blockchain technology and smart contracts
  • It offers transparency, accessibility, and innovation but comes with significant risks
  • Smart contracts automate financial logic without requiring trust in centralized parties
  • Core use cases include DEXs, lending, yield farming, and stablecoins
  • The space is experimental and evolving rapidly—what works today may change tomorrow
  • User responsibility is paramount—you are your own bank, for better and worse

Remember: DeFi is a powerful tool, but it's not for everyone. Understanding the fundamentals thoroughly before participating is essential for your financial safety.


Ready to dive deeper? Continue with Key DeFi Concepts to build on this foundation.