How Does a Crypto Loan Work?
A bank lends based on who you are: your income, your credit history, your ability to repay. A lending protocol on a blockchain knows none of that. All it can see is what you lock up.
So on-chain loans are over-collateralised: you deposit more than you borrow. Deposit 150 dollars’ worth of one token, and you might be allowed to borrow 100 dollars of a stablecoin. If you never repay, the protocol still has more than it lent.
Where the Money Comes From
Lenders deposit tokens into a shared pool and earn interest. Borrowers take from the same pool and pay interest. The rate isn’t set by a person: it follows a formula based on how much of the pool is lent out. When most of the pool is borrowed, rates rise, which attracts new deposits and pushes borrowers to repay. That keeps some money in the pool for lenders who want to withdraw. Aave and Compound are well-known protocols built this way.
Most loans are taken in a stablecoin (see What Keeps a Stablecoin at $1?), and liquidators often sell the collateral on a decentralised exchange (see How Does a DEX Work?).
What Is Liquidation in Crypto Lending?
Collateral can lose value. If your 150 dollars of collateral falls to 110, the loan is close to no longer being covered. Each protocol sets a threshold; cross it, and your position can be liquidated.
Liquidation is done by anyone who wants to, not by the protocol’s staff. A liquidator repays part of your loan and receives some of your collateral at a discount. The discount is the reward that makes sure someone always steps in quickly. For you, it’s a penalty on top of the price drop.
- Health factor: most protocols show one number for how safe your loan is. Above 1 is safe; at or below 1, it can be liquidated.
- To stay safe: borrow well below the limit, or add collateral when prices fall.
Risks of DeFi Lending
- Prices come from oracles. The protocol learns token prices from a price feed (an oracle). A wrong or manipulated price can trigger liquidations that shouldn’t happen, or allow loans that should be refused.
- Fast crashes. If prices fall faster than liquidators can act, or the network is congested, loans can end up worth more than their collateral, and the loss lands on the pool.
- Code is the contract. A bug in the smart contract can lose depositors’ money, and there is usually no one to reverse it.
For Engineers: Integrating With a Lending Protocol
If your platform lends or borrows through a protocol on behalf of users, watch each position’s health factor continuously, not just when a user opens the app, and alert well before the liquidation threshold. Read prices from the same oracle the protocol uses, so your warnings match what the protocol will actually do.
This article explains how the systems work. It is not financial or investment advice, and the rules for crypto assets change and differ from country to country: check the current ones where you live.