blog · ~6 min read

DeFi Lending: How Aave and Compound Work, and Liquidation Risk

DeFi lending lets you earn interest or borrow against collateral through smart contracts, with liquidation automatically selling assets if your collateral ratio falls too low.

T By tradernewbie · AI-drafted, human-reviewed
#Crypto#DeFi#Risk Management

DeFi Lending: How Aave and Compound Work, and Liquidation Risk

DeFi lending lets you deposit crypto to earn interest or borrow against it, with smart contracts automatically liquidating positions whose collateral falls below a safety threshold.

Lending is one of the largest and most useful corners of DeFi. Protocols like Aave and Compound let anyone deposit assets to earn yield or borrow against their holdings — no bank, no credit check, no waiting period. The catch is that everything is enforced by code, and the rules around liquidation can be brutal for the unprepared. This guide explains how it works and how to avoid expensive mistakes.

How DeFi lending works

Traditional lending depends on credit scores, income verification, and trust that the borrower will repay. DeFi replaces all of that with over-collateralization. You can only borrow if you deposit collateral worth more than the loan itself. If the value of your collateral drops too far, the protocol sells it automatically to repay the loan.

Why over-collateralization? Because there is no identity, no credit bureau, and no legal recourse. The smart contract cannot sue you, so it protects lenders by holding more collateral than the loan is worth.

The two sides of the market:

  • Lenders (suppliers) deposit assets into a lending pool and earn variable interest paid by borrowers.
  • Borrowers deposit collateral and borrow other assets from the pool, paying interest on what they borrow.

Aave and Compound: the leading protocols

Aave and Compound are the two most established Ethereum lending protocols. They share the same core idea but differ in features.

Feature Aave Compound
Collateral Multiple assets Multiple assets
Interest model Algorithmic, per-asset Algorithmic, per-asset
Rate types Variable and stable rates Variable rates
Flash loans Yes (uncollateralized, same-block) No
Native token AAVE (governance + safety module) COMP (governance)
Risk premium Risk-based per asset Risk-based per asset

For beginners, Aave tends to be the more popular choice because of its wider asset support and clearer interface, but both are well-audited and battle-tested.

Depositing to earn interest

When you deposit an asset (say, USDC) into Aave, your funds join a pool that borrowers draw from. In return, you receive an aToken (e.g., aUSDC) that represents your deposit plus accrued interest. Interest compounds continuously and is reflected in the aToken's value.

  • Yields are variable and move with supply and demand.
  • When borrowing demand is high, yields rise; when it is low, yields fall.
  • Stablecoin deposits typically yield a few percent; volatile-asset deposits often yield less.

This is one of the safest corners of DeFi because suppliers are over-collateralized by every borrower in the system — though it is not risk-free, as we will see.

Borrowing against collateral

To borrow, you first deposit collateral worth more than you intend to borrow. Each asset has a loan-to-value (LTV) cap. For example, if ETH has an 80% LTV, depositing $1,000 of ETH lets you borrow up to $800 of another asset.

A typical use case: deposit ETH as collateral, borrow USDC to spend or trade, while keeping your ETH exposure. You repay the loan (plus interest) to unlock your collateral.

The health factor and liquidation

Every borrowed position has a health factor, a number that reflects how safe it is. A health factor above 1 means the position is safe; at 1 it is at the liquidation threshold; below 1 it becomes eligible for liquidation.

Here is what happens during liquidation:

  1. The collateral's value falls (market drop) or the borrowed asset's value rises.
  2. The health factor drops to or below 1.
  3. Liquidators (often bots) repay part of your debt and seize a portion of your collateral plus a liquidation bonus (typically 5–10%).
  4. Your position is partially or fully closed, and you lose collateral worth more than the debt repaid.

The liquidation bonus is the penalty for letting your position become unsafe. It is paid to whoever triggers the liquidation, which is why bots compete to liquidate positions the instant they qualify.

How to avoid being liquidated

  • Keep a low LTV — borrow well below the maximum. A 30–40% LTV gives you a large buffer before liquidation.
  • Monitor your health factor — set alerts and check during volatility.
  • Use less volatile collateral — stablecoin collateral is far less likely to be liquidated than a volatile altcoin.
  • Beware of oracles and flash crashes — sharp intraday moves can liquidate positions even if they recover minutes later.
  • Have a repayment plan — keep some liquid assets ready to repay debt if needed.
  • Do not over-borrow — the most common beginner mistake is borrowing near the maximum and getting liquidated on a normal pullback.

Interest rate models

Interest rates in Aave and Compound are set algorithmically based on utilization — the share of a pool that is borrowed out.

  • Low utilization → low rates → incentive to borrow more.
  • High utilization → high rates → incentive to supply more and repay loans.

When utilization spikes (e.g., everyone wants to borrow a hot token), rates can jump dramatically. This is why borrowing rates are not fixed in the variable model. Aave's "stable rate" option lets borrowers lock a rate, but it can still be rebalanced under certain conditions.

Risks for beginners

  • Liquidation loss — the most common way beginners lose money in lending. Always maintain a healthy buffer.
  • Smart contract risk — a bug in Aave or Compound could affect deposited funds, though both have strong audit histories.
  • Oracle risk — if the price feed malfunctions, positions can be liquidated incorrectly.
  • Asset depeg — if a collateral or borrowed asset loses its peg, both sides of your position can move against you.
  • Variable rate spikes — borrowing costs can rise sharply during stress.
  • Liquidation cascades — large liquidations can pressure prices, triggering further liquidations market-wide.
  • Protocol governance risk — parameter changes (LTV caps, listing/delisting assets) can affect your position.

Bottom line

DeFi lending is a powerful tool: earn interest on idle assets or unlock liquidity without selling. But the system is unforgiving. Borrow conservatively, watch your health factor, prefer stable collateral, and never borrow to the limit. The protocols work exactly as coded — which means mistakes are punished instantly and automatically.

This article is for educational purposes only and does not constitute financial advice. DeFi lending and borrowing involve significant risk, including loss of collateral through liquidation; always do your own research and never deposit or borrow more than you can afford to lose.

Related market data, powered by TradingView.

AI-assisted content · Not financial advice · Trade at your own risk