10 XP4 min read3 questions

Understanding the core DeFi primitives — lending, borrowing, and yield generation.

DeFi Protocols

DeFi (Decentralized Finance) recreates traditional financial services — lending, borrowing, trading, insurance — using smart contracts instead of banks. Understanding these primitives unlocks a new dimension of the crypto ecosystem.

The DeFi Stack

Think of DeFi like building blocks that stack on top of each other:

  1. Layer 1 (Base): Blockchain (Ethereum, Solana, etc.)
  2. Stablecoins: USDC, USDT, DAI — the dollars of DeFi
  3. DEXs: Token swapping (Uniswap, Jupiter)
  4. Lending/Borrowing: Aave, Compound, Kamino
  5. Derivatives: On-chain perps, options
  6. Aggregators: Combine multiple protocols for best execution

Each layer depends on the ones below it. This composability is called "money legos."

Lending & Borrowing

How It Works

Lending (Supplying):

  1. You deposit assets (e.g., USDC) into a lending pool
  2. Borrowers pay interest on those assets
  3. You earn a portion of that interest — your deposit generates yield
  4. You can withdraw anytime (if liquidity exists)

Borrowing:

  1. You deposit collateral (e.g., ETH)
  2. You borrow against it (e.g., USDC) at a specific ratio
  3. You pay interest on what you borrowed
  4. You must maintain the collateral ratio or face liquidation

Key Concepts

Collateral Ratio: The value of your collateral relative to your debt

  • Example: Deposit $10,000 ETH, borrow $5,000 USDC = 200% collateral ratio
  • Most protocols require minimum 120-150% ratio

Liquidation: If your collateral ratio drops below the threshold (price drops), your collateral is automatically sold to repay the debt — plus a liquidation penalty (typically 5-15%)

Utilization Rate: How much of the pool's deposits are being borrowed

  • High utilization = Higher interest rates (supply/demand)
  • 100% utilization = Lenders can't withdraw (temporary)

Why Borrow Instead of Sell?

  • Tax efficiency: Borrowing isn't a taxable event; selling is
  • Stay long: Keep your ETH exposure while accessing cash
  • Leverage: Use borrowed funds to buy more assets (risky)
  • Farming: Borrow stablecoins to farm yield elsewhere

Yield Strategies

Supply-Side Yield

Simply deposit assets into a lending protocol and earn interest.

  • Risk: Low (smart contract risk, utilization risk)
  • Return: 2-10% APY typically on stablecoins

Liquidity Provision (LP)

Provide assets to a trading pool on a DEX and earn trading fees.

  • Risk: Medium (impermanent loss, smart contract risk)
  • Return: Variable — depends on volume and pool

Yield Farming

Provide liquidity or deposits and earn bonus tokens (protocol incentives).

  • Risk: Medium-High (token price can crash, impermanent loss)
  • Return: Can be high initially but typically decreases over time

Staking

Lock tokens to help secure a network or protocol.

  • Risk: Low-Medium (slashing risk, lock-up period)
  • Return: 3-8% APY for major chains (ETH, SOL)

Risk Assessment Framework

Before using any DeFi protocol, evaluate:

Smart Contract Risk

  • Has the code been audited? By reputable firms?
  • How long has it been live? (Battle-tested > brand new)
  • How much TVL does it have? (More TVL = more eyes on security)
  • Is the code open source? (Can anyone verify it?)

Economic Risk

  • Are yields sustainable or dependent on token emissions?
  • What happens if the token price crashes?
  • Is there a death spiral risk? (Price drops → users flee → more price drops)

Governance Risk

  • Who controls the protocol? DAO or small team?
  • Can parameters be changed without user consent?
  • Are there timelocks on changes? (Time to react before changes take effect)

DeFi Best Practices

  1. Start small — Never deposit more than you can afford to lose
  2. Stick to battle-tested protocols — Aave, Uniswap, Maker have years of track record
  3. Understand what you're signing — Every wallet transaction approval is a smart contract interaction
  4. Revoke approvals — After using a protocol, revoke token approvals to limit exposure
  5. Monitor positions — Especially borrowed positions; set alerts for collateral ratio
  6. Diversify across protocols — Don't put everything in one smart contract
  7. If the APY seems too good to be true, it is — 1000% APY means the token will crash

Key Takeaway

DeFi protocols are powerful financial tools, but they come with real risks. The smart money understanding is: use battle-tested protocols, never over-leverage, always understand the smart contract risk, and treat high yields with extreme skepticism. Master the basics before chasing yield.

Knowledge Check

1. In a DeFi lending protocol, who earns interest?

2. What happens if your collateral ratio falls below the liquidation threshold?

3. TVL in a DeFi protocol represents:

Finished this lesson?

Earn 10 XP