Quick Definition
DeFi lending is a system where people lend and borrow cryptocurrencies directly from one another using smart contracts—automated programs on a blockchain. Platforms like Aave and Compound act as digital marketplaces: lenders deposit assets to earn interest, and borrowers put up collateral to take out loans. No bank, no credit check, and no middleman.
Why It Matters
Traditional lending is slow, exclusive, and often requires a credit history or a bank account. DeFi lending opens access to anyone with an internet connection and a crypto wallet. You can earn passive income on idle crypto, or borrow against your holdings without selling them—useful if you want liquidity but believe the asset's value will rise. It’s a core building block of the decentralized finance ecosystem, powering everything from leveraged trading to yield farming strategies.
How It Actually Works
Think of a DeFi lending platform as a giant, automated lending pool. Instead of matching individual lenders and borrowers, all funds are pooled together. Lenders deposit tokens (like DAI or USDC) into the pool and receive a token representing their share—on Compound it's called cToken, on Aave it's aToken. These tokens accrue interest in real time and can be redeemed for the original deposit plus earned interest.
Borrowers, on the other hand, must first supply collateral—usually a different cryptocurrency worth more than the loan they want. This is called overcollateralization. The platform uses an oracle (a trusted data feed) to track the price of both the collateral and the borrowed asset. If the collateral’s value drops too close to the loan value, the loan becomes undercollateralized, and the platform automatically liquidates the collateral to repay the loan, plus a penalty fee.
Interest rates are set algorithmically based on supply and demand. When a pool is heavily borrowed, rates rise to attract more lenders; when it’s underutilized, rates drop. Both Aave and Compound use this model, though Aave also offers “stable” rates that fluctuate less than the default “variable” rate.
A Worked Example
Meet Alice. She has 10 ETH worth, say, $20,000. She doesn’t want to sell, but she needs $5,000 to cover an expense. She deposits her 10 ETH as collateral on Aave. The platform allows her to borrow up to 75% of the collateral’s value (the loan-to-value ratio, or LTV). She borrows 5,000 DAI (a stablecoin pegged to the dollar) at a variable interest rate of 3% per year.
Alice now has her $5,000 in DAI, while her ETH remains locked as collateral. She can use the DAI freely. Meanwhile, Bob is a lender. He deposits 5,000 USDC into the same lending pool. He receives aUSDC tokens that earn 2.5% APY. Bob’s deposit helps provide the liquidity that Alice borrowed.
If ETH’s price drops significantly, say to $1,500 per ETH, Alice’s collateral is now worth $15,000. Her loan of $5,000 is still outstanding, but the health factor (a metric of safety) drops. If it falls below 1, the platform will liquidate part of her ETH to repay the loan, plus a 5-10% liquidation penalty. Alice would lose some ETH. To avoid this, she can add more collateral or repay part of the loan early.
Risks and Pitfalls
- Liquidation risk: The biggest danger for borrowers. If collateral value drops suddenly (a flash crash), you can be liquidated even if you intended to repay. Always maintain a healthy buffer above the minimum collateral ratio.
- Smart contract risk: DeFi platforms are code. Bugs or exploits can drain funds. Even audited contracts have been hacked. Use well-established platforms and consider diversifying across protocols.
- Oracle risk: Price feeds can be manipulated or fail. If an oracle reports a wrong price, liquidations or bad debt can occur. Platforms use multiple oracles, but no system is perfect.
- Interest rate volatility: Variable rates can spike during high demand, making borrowing expensive. Aave’s stable rate offers predictability but may be higher initially.
- Impermanent loss (not directly in lending but relevant for liquidity providers on some platforms): When you provide liquidity to a lending pool, you don’t face impermanent loss the way you do in automated market makers, but you do face credit risk if the platform accumulates bad debt.
Practical Takeaways and Next Steps
If you’re new to DeFi lending, start small. Use a platform like Aave or Compound on a testnet first to understand the interface. Never borrow at the maximum LTV—leave room for price drops. Consider lending stablecoins first to earn yield without exposure to volatile assets. Always research the platform’s security history and insurance options (some protocols offer coverage through Nexus Mutual or similar).
Remember that your keys, your coins—but also your responsibility. DeFi lending is powerful, but it requires active monitoring. Set price alerts for your collateral assets, and be ready to act if markets turn. With careful use, DeFi lending can be a flexible tool for earning passive income or accessing liquidity without selling your crypto.