D CryptoHome
lang: zh en ja ko
Home Wiki Categories Download Download Register

What Is DeFi Lending? How to Use Aave and Compound

Download Binance APP to Start Trading

Android users can download APK directly without VPN.

DeFi Lending Protocols Explained: How Aave, Compound, and Others Work

DeFi lending protocols are among the most fundamental pieces of infrastructure in decentralized finance. Through smart contracts, they deliver permissionless, credit-check-free borrowing and lending: depositors supply liquidity to earn interest, while borrowers provide over-collateralized assets to borrow funds. The DeFi lending market has grown to tens of billions of dollars and is one of the most important components of on-chain financial activity.

1. Basic Principles of DeFi Lending

1.1 How It Differs from Traditional Lending

Dimension Traditional Bank Lending DeFi Lending
Approval process Credit score, income verification, KYC No credit check; only requires over-collateralization
Operator Banks and other financial institutions Smart contracts execute automatically
Rate determination Set by banks Dynamically adjusted by algorithm based on supply/demand
Speed Requires approval; days to weeks Instant; no waiting
Operating hours Business hours on weekdays 24/7, non-stop
Liquidation Legal proceedings and debt collection Automatic smart contract liquidation
Access requirements Requires a bank account and credit history Anyone with a wallet can participate

1.2 The Over-Collateralized Model

Because DeFi lacks a credit system and legal recourse mechanisms, lending protocols require borrowers to provide collateral worth more than the amount they wish to borrow.

For example: if the Collateral Factor is 75%, a user who deposits $1,000 worth of ETH can borrow up to $750 in stablecoins.

Why is over-collateralization necessary?

  • Crypto assets are highly volatile; a buffer is needed
  • Without identity or credit systems, defaulters cannot be pursued
  • Automated liquidation requires the protocol to remain solvent at all times

1.3 The Lending Process

Depositing (Supply/Lend):

  1. The user deposits assets into the protocol's liquidity pool.
  2. They receive a receipt token representing their deposit share (e.g., Aave's aToken, Compound's cToken).
  3. The receipt token's value grows over time, reflecting accrued interest.

Borrowing:

  1. The user first deposits collateral.
  2. They select the asset to borrow and the amount (not exceeding the maximum borrowing capacity).
  3. The smart contract transfers the borrowed asset to the user.
  4. Borrowing interest continues to accumulate and must be repaid along with the principal.

2. Core Mechanisms Explained

2.1 Interest Rate Model

DeFi lending protocols set interest rates dynamically based on the Utilization Rate:

Utilization Rate = Assets Borrowed / Total Assets Deposited

Most protocols use a piecewise linear or piecewise exponential interest rate model:

  • Low utilization range (0% to optimal utilization): Rates rise slowly, encouraging borrowing.
  • Optimal utilization point: Typically set between 70%–90%.
  • High utilization range (above optimal): Rates rise sharply, incentivizing new deposits and discouraging additional borrowing.

This design ensures depositors can always withdraw their assets — when utilization gets too high, high rates attract new deposits and suppress borrowing.

2.2 Liquidation Mechanism

When a borrower's collateral value falls (or the borrowed asset's value rises) to the point that the collateral ratio drops below the liquidation threshold, anyone can trigger a liquidation.

Liquidation process:

  1. The liquidator calls the protocol's liquidation function.
  2. They repay part or all of the borrower's debt on their behalf.
  3. They receive the borrower's collateral at a discount, plus a liquidation bonus (usually 5%–10%).
  4. Any remaining collateral (if any) stays in the borrower's account.

Liquidation example:

  • User deposits $1,000 worth of ETH (liquidation threshold: 80%)
  • Borrows $750 USDC
  • ETH price drops; collateral value falls to $900
  • Collateral ratio = $750 / $900 = 83.3% > 80%, triggering liquidation
  • Liquidator repays part of the debt and receives discounted ETH collateral

2.3 Oracles and Price Feeds

Lending protocols rely on oracles to obtain real-time asset prices, which are used to calculate collateral ratios and determine when to trigger liquidations.

  • Chainlink: The most widely used price oracle; provides prices based on the median from multiple data sources.
  • Uniswap TWAP: A time-weighted average price derived from decentralized exchange activity.

The accuracy and timeliness of oracles directly affect protocol security. Oracle failures or manipulation can lead to incorrect liquidations or be exploited by attackers.

2.4 Health Factor

The health factor is a composite indicator of how safe a borrower's account is:

Health Factor = (Collateral Value × Liquidation Threshold) / Total Debt
  • Health Factor > 1: Safe
  • Health Factor = 1: On the edge of liquidation
  • Health Factor < 1: Can be liquidated

Users should monitor their health factor closely and either add collateral or repay part of their debt when markets become volatile.

3. Leading Lending Protocols

3.1 Aave

Aave is the largest DeFi lending protocol by TVL, supporting multiple chains and dozens of assets.

Key Features:

  • Multi-chain deployment: Ethereum, Polygon, Arbitrum, Optimism, Avalanche, and more.
  • Flash Loans: Uncollateralized instant loans that must be repaid within the same transaction.
  • Rate switching: Users can switch between variable and stable interest rates.
  • Efficiency Mode (E-Mode): Lending between like-kind assets (e.g., between stablecoins) allows a higher borrowing ceiling.
  • aToken: The interest-bearing receipt token received when depositing; its balance automatically grows to reflect accrued interest.
  • GHO: Aave's native stablecoin, backed by deposits in the Aave protocol.

3.2 Compound

Compound is one of the pioneers of DeFi lending; its token distribution model launched the wave of "Liquidity Mining" (Yield Farming).

Key Features:

  • cToken model: Deposits receive cTokens whose exchange rate grows as interest accrues.
  • Compound III (Comet): A simplified redesign where each market has only one borrowable asset.
  • COMP governance token: Holders can participate in protocol governance.

3.3 MakerDAO (Maker Protocol)

Strictly speaking, MakerDAO is not a traditional lending protocol but a decentralized stablecoin issuance system. Users over-collateralize assets to mint the DAI stablecoin.

Key Features:

  • Vault: Users create a vault, deposit collateral, and mint DAI.
  • Stability Fee: The annual rate charged for minting DAI, similar to borrowing interest.
  • Liquidation mechanism: When the collateral ratio falls too low, the vault is liquidated.
  • Multiple collateral types: Supports ETH, WBTC, RWA (real-world assets), and more.

3.4 Other Lending Protocols

Protocol Key Features Deployed Chains
Morpho Optimizes rate matching between depositors and borrowers Ethereum, Base
Spark Lending frontend in the MakerDAO ecosystem Ethereum
Venus Lending protocol on BNB Chain BNB Chain
Benqi Lending protocol in the Avalanche ecosystem Avalanche
Radiant Cross-chain lending protocol Multi-chain

4. Flash Loans Explained

4.1 What Is a Flash Loan?

A flash loan is a DeFi-exclusive innovation: users can borrow large amounts of assets with no collateral whatsoever, on the condition that the principal and fees must be returned within the same blockchain transaction. If the assets are not returned by the end of the transaction, the entire transaction is rolled back — as if it never happened.

4.2 Flash Loan Use Cases

  • Arbitrage: Identify price discrepancies between different DEXs; use a flash loan to fund risk-free arbitrage.
  • Liquidations: Use a flash loan to repay someone else's debt, receive their discounted collateral, and return the borrowed funds.
  • Collateral swaps: Complete a full sequence in one step — repay debt, withdraw old collateral, deposit new collateral, and re-borrow.
  • Self-liquidation: Use a flash loan to repay your own debt to avoid the higher cost of external liquidation.

4.3 Flash Loan Attacks

Flash loans have also been misused by bad actors to conduct attacks:

  • Manipulating oracle prices
  • Exploiting protocol logic vulnerabilities
  • Manipulating governance votes

Flash loan attack vectors are a mandatory item to check in any DeFi security audit.

5. Risks of Lending Protocols

5.1 Liquidation Risk

During sharp market swings, collateral values can drop quickly, leading to liquidation. In extreme conditions, liquidation may result in significant asset loss.

Mitigation:

  • Maintain a high health factor (recommended: above 1.5)
  • Use lower-volatility collateral (such as stablecoins)
  • Set price alerts to manage your position proactively

5.2 Smart Contract Risk

Vulnerabilities in lending protocol contracts can result in stolen or locked funds. Even though leading protocols have undergone multiple audits, audits do not guarantee zero risk.

5.3 Oracle Risk

Oracle failures or manipulation can lead to:

  • Incorrect liquidations (a price misread causes a healthy position to be liquidated)
  • Attackers exploiting price manipulation for profit

5.4 Interest Rate Risk

Variable rates can spike sharply during market turbulence, raising borrowing costs. In periods of market panic, mass withdrawals can cause utilization to surge, sending rates skyrocketing.

5.5 Systemic Risk

Lending protocols are highly interconnected with other DeFi protocols. A problem in one protocol can propagate through liquidations and liquidity outflows to others, triggering a chain reaction.

6. DeFi Lending Trends

6.1 Permissionless Market Creation

New-generation lending protocols (such as Morpho Blue and Euler V2) allow anyone to create custom lending markets, choosing collateral, borrowable assets, and parameters.

6.2 RWA Collateral

Tokenized real-world assets (such as U.S. Treasuries and real estate) serve as lending collateral, expanding the asset base available to DeFi borrowers.

6.3 Credit-Based Lending

Through on-chain identity, reputation systems, and social graphs, the industry is exploring low-collateral or even uncollateralized lending models.

6.4 Cross-Chain Lending

Through cross-chain messaging, users can collateralize on one chain and borrow on another.

6.5 Rate Optimization

Automatic rate optimizers (such as Morpho Optimizer) dynamically allocate between peer-to-peer matching and liquidity pools, offering better rates for both depositors and borrowers.

Summary

DeFi lending protocols deliver permissionless, automatically executed lending through smart contracts. The over-collateralized model, algorithmic interest rates, and automatic liquidation mechanisms are their core design pillars. Understanding how these mechanisms work — and the risks they carry — is the foundation for participating safely and effectively in DeFi lending.


Register on Binance | Download Binance App

📱
Download Binance APP to Start Trading

Android users can download APK directly without VPN.

Download Binance APP to Start Trading

Android users can download APK directly without VPN.

Author
CryptoHome Editorial Team Dedicated to crypto knowledge and encyclopedia writing