JOVANA
Library Glossary Getting Started Three Levels Fields How it works Mission
Join the mission
All guides

Lending, Borrowing, and Yield

On-chain lending replaces the loan officer with a public pool of code. Here is how interest, collateral, and liquidation work — and where the headline yields really come from.

A pawnshop run by code

Think of an old-fashioned pawnshop. You hand over a gold watch worth $1,000 and walk out with $600 in cash. The shop never asks your name, never checks your credit, never wonders whether you'll repay — because it is already holding something worth more than it lent you. If you come back and repay with a little interest, you get your watch. If you vanish, the shop sells the watch and is made whole. The watch, not your promise, is what makes the loan safe.

On-chain lending in decentralized finance works almost exactly like this pawnshop — except the shopkeeper is a smart contract, open for anyone to read, that never sleeps and never makes exceptions. There is no loan officer to convince and no application to fill out. You lock up tokens worth more than you borrow, and the code does the rest. This single trick — demanding collateral worth more than the loan — is what lets total strangers lend to one another safely, with no bank in the middle.

One shared pool, two kinds of people

A lending market isn't a stack of one-to-one loans. Instead, everyone shares a single liquidity pool — a contract holding a big communal pile of one asset, say a stablecoin pegged to the dollar. Two kinds of people meet at that pool. Suppliers deposit tokens into it and earn interest for letting others use them. Borrowers lock separate collateral, then draw tokens out of the same pool and pay interest for the privilege. The pool itself keeps the books.

THE LENDING POOL  (one shared contract)

  suppliers  -->  [   pool of USDC   ]  <-- interest
                  [  e.g. 10,000,000 ]
  borrowers  <--  [   80% in use     ]  --> pay interest

  collateral (locked separately by each borrower)
      ETH, BTC, ... worth MORE than the loan

  utilization = borrowed / supplied
              = 8,000,000 / 10,000,000 = 80%
Suppliers fill the pool; borrowers draw from it against locked collateral.

The same idea of a shared pool powers the automated market maker you met earlier for swapping tokens. The difference is what the pool is for: a swap pool exists to trade one asset for another, while a lending pool exists to rent the same asset out over time. In both cases, the magic is that a crowd of strangers funds one communal reserve and the contract shares it out by rule.

Interest set by supply and demand

No committee meets to decide the interest rate. It is computed automatically from one number: utilization — what fraction of the pool is currently borrowed. When the pool is mostly idle, borrowing is cheap, because the contract wants to coax that idle money into use. When the pool is nearly drained, borrowing gets expensive — high rates lure new suppliers in and nudge borrowers to repay, keeping a cushion so that suppliers can always pull their money back out.

BORROW RATE rises with utilization

   rate
    |                                  /
    |                               /
    |                          ___/   <- steep "kink":
    |                  _______/          punishes a
    |   ______________/                  near-empty pool
    |__/
    +----------------------------------- utilization
    0%        50%        80%        100%

  supply rate = borrow rate x utilization x (1 - fee)
As more of the pool is borrowed, rates climb — gently at first, then sharply past the kink.

Notice the second line: what suppliers earn is simply the borrow rate, scaled by how much of the pool is actually in use, minus a small protocol fee. Lend into a busy pool and you earn well; lend into a sleepy one and most of your deposit sits idle, earning little. The borrowers pay the interest; the suppliers receive it; the contract just keeps the ratio honest, second by second.

When collateral falls: liquidation

The pawnshop is only safe while the watch is worth more than the loan. But crypto collateral can swing in price, so each loan carries a health limit: a borrow is allowed only up to some fraction of the collateral's value — say 75%. Lock $1,000 of collateral and you might borrow up to $750. The gap between them is the safety buffer that protects the suppliers' pool from ever going underwater.

If the collateral's price drops far enough that the loan creeps toward that limit, the position is opened up to liquidation. Anyone in the world can step in, repay part of the loan on the borrower's behalf, and claim a slice of the collateral at a small discount as their reward. It sounds harsh, but it is what keeps the whole pool solvent: bad loans are cleared out fast and automatically, before the collateral can fall below what was borrowed.

  1. Deposit & borrow. Lock $1,000 of ETH as collateral; the 75% limit lets you borrow up to $750 of a stablecoin.
  2. Price slips. ETH falls and your collateral is now worth only $900; your $750 debt has crept up to about 83% of it — past the line.
  3. A liquidator acts. Anyone repays part of your debt to the pool and takes the matching collateral plus a small bonus, pulling the loan back to safety.
  4. Pool stays whole. Suppliers never lose their principal; you keep whatever collateral wasn't sold off. The contract did it all, with no court and no collector.

Where 'yield' actually comes from

People often talk about yield as if it fell from the sky. It doesn't. In a plain lending pool, every cent a supplier earns is paid by a borrower who wanted that money badly enough to pay interest for it — a real economic transaction, just like a bank deposit, only run by code instead of a teller. That base yield is honest and easy to trace: borrowers in, suppliers out.

But the eye-catching numbers usually have extra layers stacked on top. A protocol may hand out its own governance token to early suppliers as a bonus, so the advertised rate mixes real interest with the changing value of that token. Some 'yield' comes from being deposited into another protocol, which is deposited into yet another — each layer adding return and a new point of failure. A high headline number is often less a measure of how much you earn than of how many moving parts you are trusting at once.

The takeaway

On-chain lending is a pawnshop turned into public code: deposit into a shared pool, or borrow against collateral worth more than your loan. Rates float with how busy the pool is, contracts liquidate risky loans automatically to keep suppliers safe, and the base yield is simply the interest borrowers pay. Whenever a rate looks too good, the right question is never how much but from where — and who is really paying it.

We've now seen money lent, swapped, and earned on-chain. Next we'll turn to a very different use of the same building blocks — tokens that stand not for a balance but for a single, unique thing: the NFT.