BR Academy
0%
The Ethereum Ecosystem·Lesson 20 of 33·11 min

Decentralized Finance (DeFi) on Ethereum

This module surveys the Ethereum ecosystem built on everything covered so far. DeFi is the largest and most mature category, and this lesson covers its core primitives, how they work mechanically, and the risks unique to building financial products as smart contracts rather than through a regulated intermediary.

What DeFi actually is. Decentralized finance refers to financial applications — lending, borrowing, trading, stablecoin issuance — built as smart contracts on Ethereum instead of operated by a bank or brokerage. The defining characteristic is that the rules of the financial product (interest calculations, collateral requirements, trade execution) are enforced by deployed code, verifiable by anyone, rather than by a company's internal systems and legal agreements. A direct consequence of this is composability, discussed later in this module: because each protocol's rules are public and callable by any other contract, new applications can be built by combining existing DeFi protocols rather than reimplementing financial infrastructure from scratch.

Automated market makers. Rather than matching buyers and sellers through a traditional order book, most decentralized exchanges use an automated market maker (AMM) model: a shared pool of two (or more) tokens, contributed by liquidity providers, that anyone can trade against directly. The pool's smart contract adjusts the exchange rate between the two tokens algorithmically based on the pool's current balance — as one token is bought, its price in the pool rises, and as it's sold, its price falls. Liquidity providers earn a share of trading fees in exchange for supplying the pool, but take on "impermanent loss" risk — the risk that their share of the pool becomes worth less than if they'd simply held the two tokens separately, due to price movements between them. This risk is called "impermanent" because it only becomes a permanent, realized loss if the liquidity provider withdraws from the pool while the price divergence is in effect; if prices move back toward their original ratio before withdrawal, the loss shrinks or disappears.

Stablecoins as DeFi's foundation. A large share of DeFi activity is denominated in stablecoins — tokens designed to track the value of a reference asset, most commonly the US dollar. Some stablecoins maintain their peg by holding reserves of real-world assets redeemable for the token; others use an overcollateralized crypto-backed model similar in spirit to the lending protocols described below. Stablecoins matter to DeFi specifically because they let users borrow, lend, and trade within the ecosystem without being directly exposed to the price volatility of a more speculative token for every transaction, which is part of why stablecoin trading pairs and lending markets are consistently among the largest by volume across DeFi protocols.

Overcollateralized lending. Decentralized lending protocols let users supply an asset to earn yield, or borrow against collateral they've deposited. Because there's no credit check, employment verification, or legal recourse if a borrower simply disappears, these protocols require borrowers to lock up more value than they borrow — commonly 125% to 150% or more of the loan amount, depending on the specific protocol and assets involved. If the value of the collateral falls close to the value of the loan (because the collateral asset's price dropped), the protocol's smart contract automatically triggers a liquidation: the collateral is sold (often to third-party liquidators who are financially incentivized to perform this role, as covered in the MEV lesson's discussion of liquidation races) to repay the loan before the collateral's value falls below the amount owed.

Real risks unique to DeFi. Smart contract bugs are the most direct risk — a flaw in a protocol's code can be exploited to drain funds, and as covered in Module 2, deployed code generally cannot be patched after the fact without a pre-built upgrade mechanism. Liquidation during sharp price swings can happen faster than a borrower can react, especially during periods of high network congestion when gas prices spike and transactions (including a borrower's attempt to add collateral) can be delayed. And the entire system depends on the quality of a given protocol's code and the thoroughness of its security audits — DeFi has no equivalent of deposit insurance or a regulator who can make depositors whole after a protocol failure.

Worked Example

A real lending protocol's public dashboard typically displays its current total value locked (the combined value of all assets supplied), its minimum collateralization requirement (for example, "150%" meaning a borrower must maintain collateral worth at least 1.5 times their loan), and, in its own documentation, the exact liquidation process that triggers if a borrower's collateral ratio falls below that threshold — including any liquidation penalty charged on top of the loan repayment.

Exercise

Write three sentences explaining, in your own words, why DeFi lending requires overcollateralization when a traditional bank loan often does not — referencing the absence of credit checks and legal recourse covered in this lesson.

Recap

  • DeFi applications enforce financial rules through verifiable smart contract code rather than a company's internal systems or legal agreements, and composability lets new applications combine existing protocols directly.
  • Automated market makers let users trade against a shared liquidity pool rather than an order book (with liquidity providers bearing impermanent loss risk), while overcollateralized lending protocols require borrowers to lock up more value than they borrow, since there's no credit check or legal recourse.
  • Smart contract bugs, fast liquidations during price swings, and the absence of any deposit insurance or regulatory backstop are risks unique to DeFi, distinct from traditional finance.