Module 2: How decentralized financial protocols operate without intermediaries.
Decentralized Finance (DeFi) refers to financial applications built on blockchain networks. Unlike traditional finance (TradFi) which relies on banks and brokerages to act as intermediaries, DeFi protocols utilize Smart Contracts—self-executing code stored on the blockchain—to automatically enforce rules, execute trades, and manage loans.
In traditional stock markets, buyers and sellers are matched via an order book. In DeFi, trading primarily happens through AMMs. An AMM is an algorithm that prices assets based on a mathematical formula (commonly x * y = k) instead of an order book.
Users execute trades directly against a pool of assets (a Liquidity Pool) rather than another human. The price shifts automatically based on the ratio of assets in the pool after the trade.
Because AMMs need assets to function, they rely on users called Liquidity Providers. LPs deposit pairs of tokens into smart contracts (the liquidity pools). In exchange for providing this capital, LPs earn a portion of the trading fees generated by the protocol. However, participating as an LP exposes you to mathematical risks such as Impermanent Loss.
DeFi lending protocols allow users to borrow assets without credit checks. To protect the system, loans must be over-collateralized. For example, to borrow $100 worth of a stablecoin, you might have to deposit $150 worth of a volatile cryptocurrency as collateral. If the value of your collateral drops below a specific threshold, the smart contract automatically liquidates (sells) it to repay the loan.