1. The Evolution: From Banks to Code
To understand DeFi lending, we must look at how it compares to traditional methods.
- Traditional Banks: You deposit money, the bank lends it out. The bank keeps the profit and pays you a tiny interest.
- CeFi (Centralized Crypto Finance): Companies like BlockFi act like crypto banks. They take custody of your crypto and lend it out. It works, but you have to trust them not to lose your money or get hacked.
- DeFi (Decentralized Finance): Protocols like Compound and Aave replace the bank with code (Smart Contracts). There is no middleman. You keep custody of your funds until you deposit them into a shared pool.
Link to the next concept: Since there is no bank manager to check your credit score, how does the system ensure borrowers pay back the loan? The answer is Over-Collateralization.
2. The Rule: Over-Collateralization
In DeFi, you cannot borrow money on a promise. You must provide Collateral (security deposit).
Crucially, these loans are Over-Collateralized. This means you must deposit more value than you borrow.
- The Collateral Factor: Each asset has a limit. For example, if ETH has a 75% collateral factor, depositing $1,000 worth of ETH only allows you to borrow $750 worth of DAI.
- Why do this? You might ask, "Why borrow $750 if I already have $1,000?"
- HODLing: You want cash for expenses but don't want to sell your ETH because you think its price will go up.
- Taxes: Borrowing isn't a taxable event; selling is.
- Leverage: You can use the borrowed money to buy even more ETH.
Link to the next concept: So you have deposited your crypto to lend it out, or as collateral. How does the system track what belongs to you? It issues Receipt Tokens.
3. The Receipt: cTokens and aTokens
When you deposit crypto into Aave or Compound, you trade your coin for a token that represents your deposit plus interest.
- Compound (cTokens): If you deposit ETH, you get cETH.
- How it works: The amount of cETH you hold stays the same, but the exchange rate changes. If you deposit 10 ETH, you might get 500 cETH. Later, when you trade those 500 cETH back, they are worth 10.5 ETH. The profit is baked into the value of the token.
- Aave (aTokens): If you deposit ETH, you get aETH.
- How it works: This is pegged 1:1. If you deposit 10 ETH, you get 10 aETH. As you earn interest, your wallet balance automatically increases (10 becomes 10.01, then 10.02, etc.).
Link to the next concept: You are earning interest, but who decides how much? That depends on Supply and Demand.
4. The Returns: APY (Annual Percentage Yield)
Interest rates in DeFi are not set by a central bank; they are algorithmic.
- Variable Rates: Calculated every single Ethereum block (roughly every 15 seconds).