Lending and Borrowing in DeFi
DeFi lending lets you earn interest or borrow against crypto through smart contracts. Learn how collateral, rates and liquidations work, plus the main risks.
DeFi lending lets you deposit crypto into a smart-contract pool to earn interest, while borrowers take loans from that pool by locking up collateral worth more than what they borrow. Interest rates adjust automatically based on supply and demand, and if a borrower's collateral falls too far in value, the protocol sells it to repay the loan — a process called liquidation.
There are no loan officers, credit checks or business hours. That openness is the appeal, but it also means the rules are enforced by code and price feeds rather than by people who can make exceptions. This guide explains how DeFi lending works and what can go wrong.
How DeFi Lending Works
Most DeFi lending protocols, such as Aave and Compound, use a pooled model:
- 1Suppliers deposit assets into a pool for a specific token, such as a stablecoin or ETH. In return they receive a token or balance that represents their deposit plus interest.
- 2Borrowers deposit collateral in a different pool, which allows them to borrow up to a limit from other pools.
- 3Interest accrues continuously. Borrowers pay interest; suppliers earn most of it.
- 4Repayment releases collateral. When a borrower repays the loan plus interest, they can withdraw their collateral.
There is usually no fixed term. A loan stays open as long as the collateral is sufficient. For a related token's outlook, see our Compound price prediction for 2026–2027. See also: Collateralized Debt Positions (CDPs) Explained.
Why borrow at all?
People borrow in DeFi for several reasons:
- To get stablecoins for spending or other investments without selling their crypto, which in some countries could trigger a taxable event.
- To take a leveraged position, for example borrowing stablecoins against ETH to buy more ETH — a high-risk strategy.
- To short an asset by borrowing it and selling it.
Collateral, Loan-to-Value and Health Factor
Each collateral asset has risk parameters set by the protocol's governance.
| Term | Meaning |
|---|---|
| Loan-to-value (LTV) | The maximum you can borrow against a given collateral, as a percentage of its value |
| Liquidation threshold | The level at which a position becomes eligible for liquidation |
| Health factor | A number summarizing how safe your position is; below 1 means liquidation can happen |
| Liquidation penalty | The bonus liquidators receive, paid from your collateral |
A simplified example: you deposit ETH worth $1,000 as collateral with a maximum LTV of 75% and a liquidation threshold of 80%. You could borrow up to $750 in stablecoins. If you borrow $600 and ETH falls until your collateral is worth $750, your loan reaches 80% of collateral value and can be liquidated. The figures are illustrative; actual parameters differ by asset and protocol. Our guide to collateral factors and health factors goes deeper. For a deeper look, see Over-Collateralization.
How Interest Rates Are Set
DeFi interest rates are usually set by an algorithm based on utilization — the share of the pool currently borrowed.
- When utilization is low, rates are low to encourage borrowing.
- As utilization rises, rates increase to attract more deposits and discourage borrowing.
- Past a target point, rates often rise steeply to keep some liquidity available for withdrawals.
That means the rate you see today can change quickly. See interest rate models in DeFi lending for how these curves work. We cover this in more detail in Utilization Rates in DeFi Lending.
Supplying vs Borrowing: Side by Side
| Supplier (lender) | Borrower | |
|---|---|---|
| What you do | Deposit assets into a pool | Deposit collateral and take a loan |
| What you earn or pay | Earn variable interest | Pay variable interest |
| Main risk | Smart-contract failure, bad debt, withdrawal delays | Liquidation if collateral value falls |
| Who it suits | Holders seeking yield on idle assets | Users needing liquidity without selling |
Liquidations
Liquidations keep lending pools solvent. When a position's health factor falls below 1, anyone — usually automated bots — can repay part of the debt and receive the borrower's collateral at a discount.
To avoid liquidation:
- Borrow well below the maximum allowed.
- Monitor your health factor, especially during volatile markets.
- Add collateral or repay debt early when prices move against you.
- Remember that stablecoin debt against volatile collateral is the classic liquidation setup.
During sharp market drops, many positions can be liquidated at once, which can push prices down further. Read more in liquidations in DeFi.
Risks of DeFi Lending
Both lenders and borrowers face risks:
- Smart-contract risk. Bugs or exploits can drain funds. Audits reduce but do not remove this risk.
- Oracle risk. Protocols rely on price feeds. A wrong or manipulated price can trigger unfair liquidations or let attackers borrow too much.
- Bad debt. If collateral falls faster than liquidators can act, the pool may be left with loans worth more than their collateral, which can hurt suppliers.
- Liquidity risk. If almost all of a pool is borrowed, suppliers may not be able to withdraw until borrowers repay or new deposits arrive.
- Asset risk. A stablecoin depeg or a collateral token collapse can cascade through the system.
- Governance risk. Token holders can change parameters, sometimes quickly.
Never deposit more than you could afford to lose, and be skeptical of unusually high advertised yields. We cover this in more detail in Aave vs Compound. For a deeper look, see Aave vs Morpho.
How to Choose a Lending Protocol
Before using any protocol, check:
- 1How long it has operated and whether it has suffered exploits.
- 2Whether its contracts are audited and have a bug bounty.
- 3Which oracles it uses for prices.
- 4Its risk parameters for the assets you plan to use.
- 5That you are on the official website and interacting with the verified contracts.
Our DeFi due diligence checklist covers each step in detail.
Bottom line
DeFi lending replaces banks with pooled smart contracts: suppliers earn variable interest, and borrowers lock up more collateral than they borrow. It works around the clock and without credit checks, but liquidations, smart-contract bugs and oracle failures are real risks. Borrow conservatively, monitor your positions and use only well-established protocols you have researched.
Frequently asked questions
Why do DeFi loans require more collateral than the loan amount?
DeFi protocols cannot check credit scores or chase borrowers who default, so they protect lenders by requiring collateral worth more than the loan. If the collateral's value falls too far, the protocol sells part of it to repay the debt. This over-collateralization is what lets anonymous users borrow without a credit check.
Where does the interest in DeFi lending come from?
Interest is paid by borrowers. A lending pool charges borrowers a variable rate that depends on how much of the pool is borrowed, and most of that interest goes to suppliers, with a share often kept by the protocol. Some platforms also add token incentives on top, which can change or end.
Can I lose money supplying assets to a DeFi lending protocol?
Yes. Risks include smart-contract bugs or exploits, oracle failures, bad debt if liquidations fail, stablecoin depegs and periods when you cannot withdraw because most of the pool is borrowed. Larger, long-running protocols have stronger track records, but none are risk-free.
What happens if my DeFi loan is liquidated?
Part or all of your collateral is sold, usually at a discount to a liquidator, to repay your debt. You keep the borrowed funds, but you lose the liquidated collateral plus a penalty. You can avoid liquidation by adding collateral or repaying debt before your health factor falls below the protocol's threshold.
