Understanding Decentralized Finance (DeFi)

Decentralized finance, or DeFi, is a collection of financial services built on public blockchains—most commonly Ethereum—where code (smart contracts) enforces rules without a central authority. The term first gained traction in 2018 when developers began porting familiar financial primitives—loans, trading, insurance—into open‑source protocols.

The goal is to make financial activities—saving, borrowing, trading, earning yield—available to anyone with an internet connection, regardless of geography, credit history, or banking infrastructure. Because the underlying code is transparent, anyone can audit the rules, and because the network is permissionless, users keep full control of their assets through private keys.

  • Open‑source: anyone can read or fork the code.
  • Permissionless: no KYC or approval needed to join.

How DeFi Lending Works

Lending platforms such as Aave, Compound, and Maker let users deposit crypto as collateral and either earn interest (as lenders) or borrow other assets (as borrowers). When you deposit, the protocol issues a receipt token—like cUSDC on Compound—that represents your share of the pool and automatically accrues interest.

Interest rates are algorithmically set based on supply and demand. For example, if many users are borrowing USDC, the borrowing rate rises, which in turn raises the yield for USDC lenders. All transactions are recorded on‑chain, providing full transparency of pool balances, rates, and liquidation events.

A concrete example: Alice locks 10,000 USDT as collateral on Aave and borrows 5,000 USDC at a 3% APR. If the price of USDT falls 15%, her collateralization ratio drops below the required 150%, triggering an automatic liquidation where the protocol sells part of her USDT to repay the loan and keep lenders whole.

  • Collateralization: borrowers must lock up more value than they borrow (e.g., 150% collateral ratio).
  • Over‑collateralization protects lenders from price volatility.
  • Liquidation: if collateral falls below the required ratio, the protocol automatically sells it to repay the loan.

What Is a Decentralized Exchange (DEX)?

A DEX is a platform that lets users swap tokens directly from their wallets, without a centralized order book or custodian. Trades are settled on‑chain, meaning the user retains custody of private keys throughout the transaction.

Most modern DEXs use an Automated Market Maker (AMM) model, where price is determined by a mathematical formula rather than matching buyers and sellers. The classic formula x·y = k (constant product) ensures that as one side of the pool is bought, its price rises automatically, providing continuous liquidity.