---
title: "DeFi Lending and Borrowing, Explained"
description: "How decentralized finance protocols use smart contracts, overcollateralization, and algorithmic interest rates to facilitate permissionless credit markets."
url: https://basisdesk.news/learn/defi-lending-explained
published: 2026-09-30T06:29:12.631Z
modified: 2026-09-30T06:29:12.631Z
section: DeFi
author: Basis Desk Newsroom (AI-generated, source-verified)
sentiment: neutral
tickers: [ETH, USDC]
tags: [Lending, Borrowing, Smart Contracts, Liquidations, Oracles, Overcollateralization]
license: Quote with attribution to Basis Desk (basisdesk.news). Not financial advice.
---

# DeFi Lending and Borrowing, Explained

How decentralized finance protocols use smart contracts, overcollateralization, and algorithmic interest rates to facilitate permissionless credit markets.

## Key points

- DeFi lending uses a peer-to-pool model where smart contracts automate interest accrual and loan issuance without intermediaries.
- All loans require overcollateralization, meaning borrowers must deposit assets worth more than the value of the loan they take out.
- Interest rates adjust algorithmically based on the utilization rate of the liquidity pool.
- Protocols rely on third-party price oracles to determine the real-time dollar value of collateral.
- If a loan's health factor drops below a specific threshold, third-party bots automatically liquidate the collateral to keep the protocol solvent.

Decentralized finance lending and borrowing replaces traditional financial intermediaries with automated code on a blockchain. Users supply digital assets to liquidity pools to earn interest, while others borrow from these pools by locking up excess collateral. This system relies on algorithmic interest rates and automated liquidations to maintain solvency without credit checks.

## The Shift to Peer-to-Pool Architecture

Traditional finance relies on banks to take deposits and issue loans, managing the spread between the two to generate profit. Early cryptocurrency exchanges attempted to replicate traditional credit markets using peer-to-peer order books, where individual lenders and borrowers had to agree on specific terms, durations, and rates. This model suffered from severe liquidity fragmentation and slow execution times.

DeFi lending protocols introduced a peer-to-pool model [4]. In this architecture, lenders do not lend directly to specific borrowers. Instead, they deposit their assets into a unified smart contract known as a liquidity pool. Borrowers then draw assets directly from this pool. 

The **smart contracts** act as the automated intermediary. They hold the funds, calculate interest accrual, and enforce the rules of the system without human intervention [4]. Because the pool aggregates liquidity, borrowers can access funds instantly, provided the pool has sufficient unborrowed assets.

When a user deposits assets into a lending protocol, the smart contract mints and returns a receipt token. This token represents the user's proportional share of the liquidity pool. As borrowers pay interest into the pool, the value of the receipt token increases relative to the underlying asset. When the lender wishes to exit, they redeem the receipt token to withdraw their original deposit plus the accrued interest [1]. Interest in DeFi does not accrue monthly; it compounds continuously with every new block added to the blockchain.

## Overcollateralization and the Health Factor

Because cryptocurrency wallets are pseudonymous, DeFi protocols cannot check credit scores, assess real-world income, or garnish wages in the event of a default. To manage counterparty risk in a trustless environment, these systems rely entirely on **overcollateralization** [4].

A borrower must deposit assets worth significantly more than the value of the loan they intend to take out. This excess collateral acts as a buffer, protecting the protocol's lenders if the value of the collateral drops or the value of the borrowed asset rises.

Every asset supported by a lending protocol is assigned specific risk parameters. The most important is the maximum Loan-to-Value (LTV) ratio, which dictates borrowing power. If an asset has a 75% maximum LTV, a user can borrow up to $0.75 for every $1.00 of that asset they deposit [1].

### Worked Example: Calculating Borrowing Power

Assume the following parameters for a DeFi lending protocol:
*   Collateral Asset: Ethereum ($ETH)
*   Current $ETH Price: $2,000
*   Maximum LTV for $ETH: 75%
*   Borrowed Asset: USD Coin ($USDC)

A user deposits 5 $ETH into the protocol. 
1.  The total collateral value is $10,000 (5 * $2,000).
2.  The maximum borrowing power is $7,500 ($10,000 * 0.75).
3.  The user chooses to borrow 5,000 $USDC.

At this stage, the user's actual LTV is 50% ($5,000 / $10,000). The remaining $2,500 of borrowing power serves as a safety cushion against market volatility.

To quantify the safety of a loan, protocols use a metric often called a "Health Factor." This is calculated by dividing the collateral's liquidation value by the total borrowed value. If the Health Factor drops below 1.0, the position is no longer considered safe and becomes eligible for liquidation [1].

## Algorithmic Interest Rates and the Cost of Capital

Interest rates in DeFi lending are rarely fixed. They are dynamic and adjust algorithmically based on the real-time supply and demand for each specific asset. The primary variable driving these rates is the **utilization rate** [2].

The utilization rate is the percentage of a liquidity pool's total assets that are currently lent out to borrowers. If a pool contains 10 million $USDC and 6 million $USDC is currently borrowed, the utilization rate is 60%.

Lending protocols use mathematical formulas, often structured as "kinked" interest rate curves, to determine borrowing costs based on this utilization [2]. 

When utilization is low, borrowing rates remain low and increase gradually. This encourages users to take out loans. However, if utilization climbs too high, the pool risks running out of liquidity, meaning lenders would be unable to withdraw their deposits. To prevent this, the interest rate curve features a "kink" at an optimal utilization point (often around 80% or 90%). 

Once utilization surpasses this kink, borrowing rates spike aggressively. A borrowing rate might jump from 5% to 50% or higher within a narrow utilization band. This sudden spike serves two purposes: it forces existing borrowers to repay their expensive loans, and it attracts new lenders seeking high yields to deposit more assets. Both actions drive the utilization rate back down to a healthy level [2].

The interest paid by borrowers is distributed to the lenders, minus a small percentage kept by the protocol. This spread, known as the reserve factor, acts as an insurance fund for the protocol to cover potential bad debt [1].

## Price Oracles: The System's Vulnerable Bridge

Smart contracts exist in isolated blockchain environments. They can read data natively generated on their own network, such as token balances, but they cannot independently access external information, such as the current trading price of an asset on a centralized exchange.

To calculate LTV ratios and Health Factors, lending protocols must know the exact dollar value of the collateral and the borrowed assets. They bridge this gap using **price oracles** [3].

Oracles are third-party infrastructure services that aggregate price data from various off-chain sources—like Binance, Coinbase, and Kraken—and publish that data onto the blockchain. Lending protocols query these oracle contracts continuously to update the valuation of user positions [3].

The integrity of a DeFi lending protocol is entirely dependent on the accuracy of its oracles. If an oracle reports an incorrect price, the smart contract will execute based on that flawed data. 

Historically, oracle manipulation has been a primary vector for DeFi exploits. If an attacker can artificially inflate the price of an illiquid token on a decentralized exchange, and a lending protocol uses that exchange as its sole price oracle, the attacker can deposit the inflated token and borrow millions of dollars in stablecoins against it. When the oracle price corrects, the protocol is left with worthless collateral and bad debt. To mitigate this, modern protocols use decentralized oracle networks that aggregate data from dozens of independent nodes and exchanges, filtering out extreme outliers [3].

## Liquidations and the Solvency Mechanism

Because DeFi protocols operate without legal recourse, they must eliminate bad debt before it materializes. They achieve this through automated liquidations. 

Every collateral asset has a **liquidation threshold**, which is slightly higher than the maximum LTV [1]. Returning to the earlier example: if the maximum LTV for $ETH is 75%, the liquidation threshold might be set at 80%. 

If the price of $ETH falls, or if the accrued interest on the $USDC loan grows, the user's actual LTV will rise. If the LTV crosses the 80% liquidation threshold, the smart contract flags the position as undercollateralized. 

At this point, the protocol does not sell the collateral itself. Instead, it offers a financial incentive to third-party network participants, often automated bots known as searchers or liquidators. These liquidators are permitted to repay a portion of the borrower's debt on their behalf. In exchange, the liquidator receives an equivalent amount of the borrower's collateral, plus a liquidation bonus (typically 5% to 10%) [1].

This mechanism ensures that the protocol remains solvent, as debt is rapidly cleared from the system during market downturns. However, it results in a permanent loss of capital for the borrower. The mechanics of how these automated sell-offs impact broader market prices are detailed in [Crypto Liquidations: How Leverage Unwinds](https://basisdesk.news/learn/liquidations-explained).

## Common Misconceptions

**DeFi lending is a risk-free savings account.** 
Users often equate depositing stablecoins into a DeFi protocol with placing cash in a traditional bank. Traditional deposits are typically insured by government entities. DeFi deposits carry smart contract risk (bugs in the code), economic risk (oracle failures), and systemic risk (cascading liquidations failing to clear bad debt). 

**Liquidations are a penalty paid to the protocol.** 
When a borrower is liquidated, the penalty fee is rarely captured by the protocol's treasury. The discount is captured by independent, third-party liquidators who run specialized software to monitor the blockchain. This profit motive is what guarantees the system's bad debt is cleared quickly.

**Borrowing crypto avoids all tax liabilities.** 
While borrowing against an asset is generally not considered a taxable disposal in traditional finance, tax authorities like the IRS treat cryptocurrency transactions as property. Specific lending and borrowing actions may trigger capital gains or income tax liabilities depending on how the protocol structures the receipt tokens, and these rules vary heavily by jurisdiction [5].

## How This Connects to the Market

Lending and borrowing protocols are the foundational credit layer of the cryptocurrency ecosystem. [What Is DeFi? Decentralized Finance Explained](https://basisdesk.news/learn/what-is-defi) outlines how these protocols interact with decentralized exchanges and derivatives platforms to create a parallel financial system.

By allowing users to borrow against their existing holdings, these protocols create systemic leverage. A trader can deposit $ETH, borrow stablecoins, and use those stablecoins to buy more $ETH, amplifying their market exposure. 

This leverage drives trading volume and liquidity across spot and derivatives markets. During periods of market expansion, high demand for leverage pushes borrowing rates up. These high yields attract more capital into the DeFi ecosystem, increasing total value locked (TVL). 

Conversely, market contractions trigger deleveraging cycles. As asset prices fall, collateral values shrink, forcing liquidations. These liquidations result in the automated selling of collateral assets, which can further depress prices and trigger subsequent liquidations. Understanding the health and utilization of major DeFi lending pools provides critical data on the overall leverage and risk appetite present in the broader cryptocurrency market.

## FAQ

**Do I need a credit check to borrow on DeFi?**

No. DeFi protocols are permissionless and pseudonymous. They manage risk entirely through overcollateralization rather than credit history.

**What happens if the asset I borrowed goes up in price?**

If the borrowed asset appreciates against your collateral, your Loan-to-Value (LTV) ratio increases. If it crosses the liquidation threshold, your collateral will be liquidated.

**Can I withdraw my deposited funds at any time?**

Generally, yes. However, if the pool's utilization rate reaches 100%, all assets are currently lent out, and you must wait for borrowers to repay their loans before you can withdraw.

**Who gets the liquidation penalty?**

The penalty is typically captured by third-party network participants, known as liquidators, who pay off the risky debt in exchange for discounted collateral.

## Sources

1. [Chainlink Data Feeds Documentation](https://docs.chain.link/data-feeds) — Chainlink
2. [Decentralized Finance (DeFi)](https://ethereum.org/defi/) — Ethereum Foundation
3. [Compound Finance Documentation](https://docs.compound.xyz/) — Compound Labs
4. [Digital Assets](https://www.irs.gov/filing/digital-assets) — Internal Revenue Service

---
Basis Desk Newsroom · AI-generated, source-verified · https://basisdesk.news/about/how-we-use-ai
