DeFi

DeFi Lending and Borrowing Protocols

DeFi lending and borrowing protocols are smart contract platforms that enable permissionless, non-custodial lending and borrowing of crypto assets without intermediaries. Lenders deposit assets into liquidity pools to earn interest; borrowers provide overcollateralised collateral to take out loans. Leading protocols include Aave, Compound, Spark (MakerDAO's lending arm), and Morpho, with collectively tens of billions in total value locked. Key mechanisms include algorithmic interest rate models, health factors, and liquidation incentives.

How DeFi Lending Works

Traditional lending requires a trusted intermediary — a bank assesses borrower creditworthiness, holds depositor funds, and manages the credit risk of its loan book. DeFi lending replaces this intermediary with smart contracts: code that automatically manages deposits, calculates interest rates, enforces collateral requirements, and executes liquidations without human involvement. The result is a lending market that is globally accessible, operates 24/7, requires no credit check, and maintains transparency because all positions and pool states are visible on-chain.

The key trade-off that makes trust-minimised DeFi lending possible is overcollateralisation. Because DeFi lenders cannot assess a borrower's creditworthiness or repossess off-chain assets in case of default, every DeFi loan requires the borrower to deposit collateral worth more than the loan — typically 130–200% of the borrowed amount. If a borrower deposits $10,000 of ETH as collateral, they can typically borrow up to $7,500–$8,000 of USDC (depending on the protocol's loan-to-value ratio for ETH). The excess collateral creates a buffer that protects lenders from borrower default — if the ETH falls in value, the protocol liquidates the position before the collateral value drops below the loan value.

Algorithmic Interest Rate Models

DeFi lending protocols do not manually set interest rates — rates are determined algorithmically based on supply and demand within each lending pool, typically as a function of the pool's utilisation rate (the percentage of supplied assets currently borrowed). When utilisation is low (plenty of supply, little borrowing), rates are low to incentivise borrowing and reduce incentives for further supply. When utilisation is high (most of the pool is borrowed out), rates increase sharply to incentivise repayments and attract additional lenders.

Aave's interest rate model uses a "kink" design: rates increase gently up to an optimal utilisation (e.g., 80%), then rise steeply above that threshold to prevent pools from reaching 100% utilisation (which would prevent lender withdrawals). The model balances borrower access (keeping rates reasonable below optimal utilisation) with lender liquidity (ensuring rates spike to attract more supply if utilisation threatens pool liquidity).

Interest accrues continuously in real-time and is paid in the same asset being borrowed (stablecoins for stablecoin loans, ETH for ETH loans). Lenders receive aTokens (Aave) or cTokens (Compound) — yield-bearing representations of their deposit that automatically accrue interest. 1 aUSDC, for example, grows in redemption value as interest accrues in the pool.

Major Protocols: Aave, Compound, Spark, Morpho

Aave is the largest DeFi lending protocol by TVL, deployed on Ethereum mainnet, Polygon, Arbitrum, Optimism, Base, and several other chains. Aave V3 introduced efficiency mode (allowing higher LTV for correlated assets), isolation mode (limiting exposure for newly-listed riskier assets), and cross-chain portal functionality. Aave also pioneered flash loans — uncollateralised loans that must be repaid within a single transaction block, used for arbitrage, liquidations, and collateral swaps.

Compound is the protocol that pioneered the liquidity mining model (distributing COMP governance tokens to borrowers and lenders), which catalysed the 2020 DeFi Summer. While Compound's market share has declined relative to Aave, it remains a significant protocol with its own governance and lending markets. Compound V3 (Comet) simplified the architecture to single-asset borrowing markets (borrow USDC with ETH/WBTC/etc. as collateral), improving capital efficiency.

Spark is the lending market built by MakerDAO (now Sky) as an interface to DAI/USDS minting and integrated savings rate. Spark allows users to borrow DAI/USDS against crypto collateral at rates set by MakerDAO governance, directly tied to the DAI Savings Rate (DSR). This integration makes Spark's rates particularly competitive when the DSR is elevated.

Morpho takes a novel approach: it sits on top of Aave and Compound as an optimisation layer, peer-to-peer matching lenders and borrowers at more favourable rates when matches exist and routing to the underlying pool when no match is available. Morpho Blue (V2) is a standalone protocol that allows permissionless creation of isolated lending markets with customisable oracles, liquidation parameters, and collateral types — enabling the long tail of assets that Aave and Compound's governance-constrained model cannot support quickly.

Health Factor and Liquidation

Every DeFi borrowing position has a health factor — a numerical representation of the ratio between the value of collateral (adjusted by liquidation thresholds) and the value of the outstanding debt. In Aave, a health factor above 1.0 means the position is healthy; below 1.0, the position is eligible for liquidation. As collateral prices fall or borrowed asset prices rise (for volatile borrowed assets), the health factor approaches 1.0.

Liquidations are executed by third-party liquidator bots that monitor all open positions. When a position's health factor drops below 1.0, liquidators can repay a portion of the outstanding debt (typically 50%) in exchange for claiming the equivalent value of collateral plus a liquidation bonus (typically 5–10%). This bonus incentivises rapid liquidation, protecting the protocol from accumulating bad debt.

Users who borrow in DeFi need to actively monitor their health factor and maintain sufficient buffer. Volatility spikes can cause rapid health factor deterioration — during sharp market corrections, cascading liquidations in DeFi protocols amplify price moves as liquidated collateral is sold into an already-declining market. The March 2020 COVID crash caused $3M in Maker bad debt (the protocol lacked sufficient liquidation incentives at the time); subsequent protocol upgrades have improved liquidation efficiency.

Flash Loans: Uncollateralised Lending in One Transaction

Flash loans are Aave's most innovative feature — they allow borrowers to take out arbitrarily large uncollateralised loans on the condition that the entire loan plus fee (0.09% of the loan amount) is repaid within the same Ethereum transaction. If the repayment fails, the entire transaction reverts as if it never happened — the protocol's funds are never at risk.

Flash loans are used for: DEX arbitrage (borrow $1M USDC, buy ETH on a cheaper DEX, sell on a more expensive DEX, repay loan, keep profit — all in one transaction); collateral swaps (refinance a Maker CDP from ETH to WBTC collateral in one transaction); self-liquidation (repay your own underwater loan using borrowed funds, avoiding the liquidation penalty); and, infamously, for exploiting smart contract vulnerabilities in other protocols. Flash loan-enabled attacks have been used to drain hundreds of millions from vulnerable DeFi protocols, making flash loan attack vectors a core concern in smart contract security audits.

Risks of DeFi Lending

The primary risks for lenders are smart contract risk (a bug in the protocol's code could allow an attacker to drain the lending pool), oracle risk (a manipulated price oracle could cause incorrect liquidations or allow undercollateralised borrowing), and governance risk (malicious governance proposals could change protocol parameters to drain the protocol). For borrowers, liquidation risk is paramount — borrowers who fail to monitor their health factor during volatile markets can lose their entire collateral through liquidation.

Protocol insurance through platforms like Nexus Mutual and InsurAce can offset smart contract risk for lenders, though coverage limits and costs must be weighed against the yield earned. DennTech's Liquidation Calculator can help borrowers compute their liquidation price at different leverage levels and collateral types to manage health factor risk proactively.

Conclusion

DeFi lending protocols have matured into reliable, high-TVL financial infrastructure that processes tens of billions of dollars of lending volume monthly. Aave, Compound, Spark, and Morpho offer genuinely useful financial services — yield on stablecoins, leverage against crypto holdings, and flash loan capabilities — with trade-offs in smart contract risk and collateral requirements that differ fundamentally from traditional lending. For crypto-native investors, understanding DeFi lending mechanics is increasingly essential as these protocols become central components of on-chain financial strategy.