Home
Guide 04 — The Loan

What if you could borrow without asking anyone?

Getting a bank loan takes a credit check, income verification, an approval committee, and 6 to 8 weeks. On a lending protocol, the only question is: how much collateral can you put up? The pool doesn't care who you are. It cares what you own.

Time to get a loan
Bank
6–8 weeks
Onchain
~2 seconds

Onchain lending markets are autonomous credit systems. No underwriters, no paperwork, no office hours. Smart contracts hold the deposits, set the interest rates, and enforce the rules. Borrowers post collateral; lenders earn yield. The protocol runs 24/7 and never asks for your name.

This guide takes it apart.

Ch 01 — The Pool

Strangers fund your loan. The protocol sets the terms.

A lending pool works like a shared savings account that anyone can borrow from. Depositors supply assets — ETH, USDC, whatever the protocol supports — and earn interest. Borrowers draw from the same pool, paying interest for the privilege. The protocol is the intermediary that banks used to be.

Deposit or withdraw from the pool. Watch how supply, borrows, and available liquidity shift. The utilization rate tells you how much of the pool is in use.

Supply side

Depositors lock assets into the pool and receive interest-bearing tokens (aTokens, cTokens, depending on the protocol). These tokens accrue interest continuously — your balance grows every block. You can withdraw at any time, as long as there's available liquidity.

Borrow side

Borrowers draw assets from the pool. They pay interest that flows to depositors. Unlike a bank loan, there are no fixed terms — interest accrues continuously at a variable rate. You repay whenever you want. The only constraint is your collateral.

Available liquidity

Available liquidity = total supplied − total borrowed. When this drops toward zero, depositors can't withdraw. This is why interest rates spike at high utilization — the protocol needs to discourage excess borrowing and incentivize new deposits.

Ch 02 — The Rate

The higher the demand, the higher the price of money.

Interest rates in DeFi aren't decided by a central bank. They're determined algorithmically by a utilization curve — a mathematical function that maps how much of the pool is borrowed to what borrowers must pay. Low utilization means cheap borrowing. High utilization means expensive borrowing.

Drag the utilization slider. Watch how interest rates behave below and above the cliff. The spread between borrow and supply rate is the protocol's margin.

Utilization: 45%
The cliff

The cliff is the inflection point — typically around 80% utilization. Below it, rates rise gently along a shallow slope. Above it, rates spike aggressively. This is a safety valve: it makes borrowing prohibitively expensive before the pool runs dry, ensuring depositors can always exit.

Supply rate

Depositors earn the supply rate. It's always lower than the borrow rate — the difference is the protocol's cut. Supply APY = borrow rate × utilization × (1 − reserve factor). Higher utilization means more of your deposits are working, so your yield goes up.

Variable vs stable

Most onchain rates are variable — they change every block based on utilization. Some protocols offer “stable” rates that change less frequently, but these aren't truly fixed. They can still be rebalanced if market conditions shift dramatically.

The pool lends freely.

But it trusts no one.
Ch 03 — The Collateral

To borrow a dollar, you must lock up more than a dollar.

There are no credit scores onchain. No income verification. No legal recourse if a borrower walks away. The only guarantee is the collateral locked in the smart contract — and it must exceed the loan value. This is overcollateralization: deposit $150 of ETH to borrow $100 of USDC.

Adjust how much you borrow against your collateral. Watch the health factor and LTV ratio change. Green is safe; red means you're approaching liquidation.

Borrow: 40% of max capacity
Loan-to-value

LTV = debt / collateral value. Borrow $10K against $15K of ETH and your LTV is 66.7%. Each asset has a maximum LTV — typically 75-85%. Cross that line and you're eligible for liquidation. Volatile assets get lower max LTVs; stablecoins get higher ones.

Health factor

Health factor = (collateral × liquidation threshold) / debt. Above 1.0, you're safe. At 1.0, you're liquidatable. The further above 1.0, the more price movement you can absorb. Most experienced borrowers maintain a health factor above 1.5 for volatile collateral.

Why overcollateralize?

If you already have $150 of ETH, why borrow $100? Because you want to keep your ETH exposure. Selling ETH for USDC means giving up the upside. Borrowing USDC against it lets you use stablecoins while staying long on ETH. It's a leveraged position disguised as a loan.

The health factor is a countdown.

The market decides when it hits zero.
Ch 04 — The Liquidation

Your loan has a dead man's switch.

When your collateral drops in value and your health factor falls below 1.0, your position becomes liquidatable. Anyone — typically an automated bot — can repay part of your debt and seize your collateral at a discount. The borrower loses money. The liquidator profits. The protocol stays solvent.

Drag the ETH price down. Watch the health factor fall. When it crosses the threshold, liquidation triggers — the bot takes your collateral at a 5% discount.

ETH price change: 0%
The liquidation bonus

Liquidators receive the borrower's collateral at a 5-10% discount to market price. This bonus is the incentive that makes the system work. Without it, no one would bother running liquidation bots. The bonus is paid by the borrower — it comes directly out of their collateral.

Cascading liquidations

In a sharp market crash, liquidations trigger more selling, which pushes prices lower, which triggers more liquidations. This feedback loop can cause cascading liquidation events — exactly what happened on Black Thursday (March 2020) when ETH dropped 43% in 24 hours and $8.6M in bad debt hit MakerDAO.

What if you didn't need collateral at all?
Ch 05 — The Flash

Borrow millions. Return them in the same breath.

Flash loans are the most alien concept in DeFi. You can borrow any amount — millions, billions — with zero collateral. The catch: you must repay the entire loan plus a tiny fee within the same transaction. If you don't, the transaction reverts. It never happened. The lender is never at risk.

Step through a flash loan sequence. Watch the borrow, the arbitrage, and the repayment happen atomically. If repayment fails, everything reverts.

Atomic execution

Flash loans exploit a property unique to blockchains: transaction atomicity. Every step in a transaction either all succeeds or all fails. This means the lender faces zero risk — the borrowed funds literally cannot leave the transaction without being repaid. No collateral needed because default is impossible.

Use cases

Arbitrage between DEXs, liquidations, collateral swaps (switch your loan's collateral in one transaction), and self-liquidation (pay off your own debt using your collateral without first unwinding the position). Flash loans give anyone access to institutional-scale capital for a single block.

The dark side

Flash loans also enable exploits. An attacker can borrow millions to manipulate an oracle price, drain a vulnerable protocol, and repay the loan — all in one transaction. The attack costs only gas. This has been the vector for hundreds of millions in DeFi exploits.

One pool for everything.

What could go wrong?
Ch 06 — The Vault

Isolation is a feature, not a bug.

Early lending protocols — Compound V2, Aave V2 — used monolithic pools. All assets shared a single pool. If one token collapsed, the bad debt spread to everyone. Isolated lending markets flip this: each pair gets its own vault with its own risk parameters. A collapse in one vault cannot contaminate the rest.

Crash the risky token. Watch what happens in the shared pool versus the isolated vaults. In the shared pool, bad debt spreads everywhere. In isolated vaults, it's contained.

Shared vs isolated

In a shared pool, listing a risky asset puts every depositor at risk. In isolated vaults, each market is independent — a risky token/collateral pair can only affect the depositors who chose to be in that specific vault. Risk is opt-in, not systemic. This is the architecture Morpho pioneered on Base.

The trade-off

Isolation means fragmented liquidity. A shared pool lets borrowers use any asset as collateral for any loan. Isolated vaults restrict each pair. Capital efficiency drops, but systemic risk drops further. For most markets, the safety is worth more than the efficiency.

Try it yourself
Explore Morpho →
Isolated lending vaults on Base
Test yourself

10 questions. No going back.

Your result is shareable.