DeFi lending and yield: where the risk sits.
In DeFi lending you lock more crypto than you borrow, and a contract sells part of your collateral if its value falls too far. Lenders earn the interest borrowers pay, minus a cut for the protocol. The risk sits in the collateral price, the code, the price feeds it trusts, and yields paid in new tokens.
Nội dung này hiện chỉ có bản tiếng Anh.

You hold 10 ETH and need dollars for a few months, but you do not want to sell. In DeFi, you can lock the ETH in a lending contract and borrow a stablecoin against it.
Nobody checks your income or your name. The contract checks one thing: that your collateral is worth more than your loan. That rule also explains how the contract can close your loan without asking you.
How a DeFi loan works
Lenders deposit tokens into a shared pool. Borrowers lock collateral, a token worth more than the loan, and borrow from the pool. Interest builds up on the loan over time, and you repay it to get your collateral back.
Two limits decide how far you can go. The maximum loan-to-value, or LTV, caps how much you can borrow against your collateral.
The liquidation threshold is a higher line: once your debt passes that share of the collateral's value, the position can be liquidated.
Each protocol sets these limits for each collateral token, and more volatile tokens get lower limits.
Worked example: borrowing against 10 ETH
The numbers are illustrative. Real limits differ by protocol and by token.
- You deposit 10 ETH at 2,000 USDC each, which is 20,000 USDC of collateral.
- The maximum LTV is 75%, so you could borrow up to 15,000 USDC. You borrow 10,000 USDC, an LTV of 50%.
- The liquidation threshold is 80%. Liquidation starts when your debt is more than 80% of the collateral, which means when the collateral falls below 10,000 ÷ 0.80 = 12,500 USDC.
- 12,500 USDC of collateral is 1,250 USDC per ETH. A fall from 2,000 to 1,250 is 37.5%.
Some protocols, Aave among them, show this as a health factor: collateral value × liquidation threshold ÷ debt. At the start it is 20,000 × 0.80 ÷ 10,000 = 1.6. Other protocols use different names and formulas.
At 1,500 USDC per ETH it is 15,000 × 0.80 ÷ 10,000 = 1.2, and at 1,250 it reaches 1.0, the liquidation line. Moves of that size are not rare, as the lesson on crypto volatility shows.
Interest moves the line too. At an illustrative 5% a year, your 10,000 USDC debt grows to 10,500 USDC after a year.
The liquidation price then rises to 10,500 ÷ 0.80 ÷ 10 = 1,312.50 USDC per ETH, even if nothing else changes.
Liquidation: what happens when the price falls
When the health factor drops below 1, anyone can repay part of your debt and take some of your collateral at a discount. These liquidators are mostly automated programs, and the discount is their reward.
Continue the example, with numbers that are still illustrative. ETH falls to 1,200 USDC. Your health factor is now 12,000 × 0.80 ÷ 10,000 = 0.96, below 1.
- A liquidator repays half your debt, 5,000 USDC.
- They receive 5,000 USDC worth of ETH plus a 5% bonus: 5,250 USDC, which is 5,250 ÷ 1,200 = 4.375 ETH.
- You keep 10 minus 4.375 = 5.625 ETH, worth 6,750 USDC, and you still owe 5,000 USDC.
- Your health factor is back to 6,750 × 0.80 ÷ 5,000 = 1.08.
Before the liquidation, your position was worth 12,000 minus 10,000 = 2,000 USDC. After it, 6,750 minus 5,000 = 1,750 USDC. The missing 250 USDC is the bonus paid to the liquidator.
The logic is close to a forex stop out: part of the position is closed automatically, and the contract sends no margin call first. Some third-party tools can alert you as your health factor falls.
Prices can fall past your line in minutes, and network fees often jump in a crash, just when you want to add collateral.
Where lending yield comes from
Lenders earn the interest borrowers pay. A formula sets the rate from utilization, the share of the pool that is lent out. The numbers below are illustrative.
- A pool holds 1,000,000 USDC from lenders, and borrowers have taken 600,000. Utilization is 60%.
- Borrowers pay 5% a year: 600,000 × 0.05 = 30,000 USDC.
- The protocol keeps 10% as a reserve, 3,000 USDC, and lenders share the other 27,000 USDC.
- Spread over the whole pool, lenders earn 27,000 ÷ 1,000,000 = 2.7% a year.
When utilization nears 100%, the formula pushes rates up fast to attract deposits and repayments. While it stays there, the pool may not hold enough tokens for every lender to withdraw at once.
Other yields have other sources. A liquidity pool pays trading fees and carries impermanent loss. Many protocols add rewards in their own new token, and that part is worth only what the token sells for.
A yield you cannot trace to borrowers, traders or a token you can price is a warning sign.
Where the risk sits
Bugs in the code
A bug in the lending contract, or in any contract it relies on, can let an attacker drain the pool. The money drained is the lenders' deposits. Audits lower this risk; they do not remove it.
Price feeds that can be fooled
The contract learns prices from an oracle. If that oracle reads a price an attacker can move, the contract can be fooled. The numbers below are illustrative.
Say a lender reads the ETH price from a small pool of 10 ETH and 20,000 USDC, a price of 2,000. Swapping 20,000 USDC into it leaves 5 ETH and 40,000 USDC, so the pool now says 8,000.
Until someone trades the pool back, the lender values ETH at four times its market price. The attacker posts ETH as collateral at that price, often in the same transaction, and borrows far more than it is worth.
With a flash loan, a loan taken and repaid inside a single transaction, the attacker does not even need the 20,000 USDC up front.
Oracles that average prices across many sources and over time make this much harder. A stale or wrong feed can also liquidate healthy loans.
Other weak points
If a stablecoin in the pool loses its peg, every number above shifts with it. Contracts that can be upgraded can also be changed by whoever holds the admin key or wins a governance vote.
Your own wallet is part of the risk too. A fake lending site or a careless approval can hand your tokens to a thief before any of the rules above come into play.
Câu hỏi thường gặp
What happens if my DeFi loan is liquidated?
Part of your collateral goes to a liquidator who repays part of your debt, at a discount that you pay for. You keep the rest of the collateral and the rest of the debt.
Can I lose more than my collateral in DeFi lending?
You keep the coins you borrowed, so your loss is normally capped at the collateral. If prices crash too fast for liquidators, bad debt can remain, and the protocol's reserves, a backstop fund or its lenders take that loss.
Where does DeFi yield come from?
It comes from borrowers paying interest, traders paying pool fees, or rewards paid in a protocol's own token. The first two depend on real demand; the third is worth only what the token sells for.
Why do lenders earn less than borrowers pay?
Every lender shares the interest, but only part of the pool is lent out, and the protocol keeps a cut. In the example, borrowers pay 5% and lenders earn 2.7%.
Is money in DeFi lending protected like a bank deposit?
No. There is no government deposit guarantee. Some third parties sell cover against hacks, and that cover has its own limits and its own risks.
Học tiếp
Chương 3What is DeFi?DeFi, short for decentralized finance, is trading and lending run by smart contracts on a public blockchain instead of by a company. You use it straight from your own wallet, with no account to open, at any hour. The same code that makes it open to anyone also makes its mistakes and losses final.
Chương 3What is an automated market maker?An automated market maker, or AMM, is a smart contract that holds a pool of two tokens and quotes prices from a formula instead of matching buyers with sellers. You swap against the pool, and every trade moves its price. The people who supply the tokens earn fees and carry a risk called impermanent loss.