Lending Without Banks
Traditional lending requires borrowers to apply, prove creditworthiness, wait for approval, and trust that the lender will honor the terms. DeFi lending protocols replace this entire process with smart contracts that hold pooled funds, calculate interest rates algorithmically, and enforce collateral requirements through automated liquidations. No credit checks, no applications, no business hours — just math, code, and cryptoeconomic incentives.
Aave and Compound are the two protocols that established the dominant DeFi lending model. Their whitepapers describe a system built around shared liquidity pools, utilization-based interest rate curves, overcollateralized borrowing, and automated liquidation. Understanding each component reveals why the system works — and where its limits lie.
Supply Pools: How Lenders Deposit
When a user supplies USDC to Aave, they do not lend to a specific borrower. Instead, they deposit into a shared USDC pool. In return, they receive a derivative token — aUSDC on Aave or cUSDC on Compound — that represents their share of the pool plus any accrued interest.
These derivative tokens are interest-bearing: their redemption value grows continuously as borrowers pay interest into the pool. One aUSDC minted when the pool had 1,000,000 USDC and zero interest might be worth 1.05 USDC six months later. Suppliers can redeem their tokens at any time for their pro-rata share of the pool, as long as the pool is not fully borrowed out.
Supplier Risk
Supplying to a DeFi lending pool is not risk-free. The primary risk is smart contract risk — a bug in the protocol code could allow funds to be drained. Beyond this, suppliers face insolvency risk: if a large borrower is liquidated slowly and collateral value falls below the debt, the pool absorbs the loss. Protocols mitigate this with reserve factors — a percentage of interest revenue set aside in a protocol reserve — and conservative loan-to-value ratios on accepted collateral.
Borrow Pools and Utilization Rate
The same pool that accepts USDC deposits also funds USDC loans. Borrowers deposit a different asset as collateral (for example, ETH) and can then borrow up to a specified fraction of that collateral's value in USDC.
The key variable governing both supply and borrow interest rates is the utilization rate: the fraction of deposited funds currently lent out.
Utilization Rate (U) = Total Borrows / Total Deposits
If a pool has 10,000,000 USDC deposited and 7,000,000 USDC borrowed, U = 70%. The remaining 3,000,000 USDC is liquid and available for withdrawals or new loans.
Interest Rate Curves
Neither Aave nor Compound uses fixed interest rates. Instead, they use algorithmic curves that adjust rates continuously based on utilization. The logic is elegant: when demand for borrowing is high (high utilization), rates rise to attract more suppliers and discourage marginal borrowers. When utilization is low, rates fall to stimulate borrowing.
The Two-Slope Model
Aave's interest rate model uses a piecewise linear function with a kink point — an optimal utilization level, typically 80% or 90% for stablecoins.
- Below the kink: The borrow rate rises slowly from a base rate as utilization increases. This regime is designed to be stable and predictable.
- Above the kink: The borrow rate rises steeply — sometimes dramatically. At 100% utilization, rates can reach 100%+ APY, making it extremely expensive to remain borrowed and incentivizing repayments to restore liquidity.
If U < U_optimal:
borrow_rate = base_rate + (U / U_optimal) * slope1
If U >= U_optimal:
borrow_rate = base_rate + slope1 + ((U - U_optimal) / (1 - U_optimal)) * slope2
The supply rate paid to depositors is derived from the borrow rate, adjusted for utilization and the protocol's reserve factor:
supply_rate = borrow_rate × U × (1 - reserve_factor)
The reserve factor (typically 10–20% of interest) accrues to the protocol's treasury and serves as an insurance buffer.
Collateral, LTV, and Borrowing Limits
DeFi lending protocols require overcollateralization — borrowers must post more value in collateral than they borrow. This is the protocol's only protection against default, since there is no legal recourse against an Ethereum address.
Each accepted collateral asset has two critical parameters:
- Loan-to-Value (LTV): The maximum fraction of collateral value that can be borrowed. ETH might have a 80% LTV, meaning depositing $10,000 of ETH allows borrowing up to $8,000 of USDC.
- Liquidation Threshold: The collateral ratio below which a position becomes eligible for liquidation, typically a few percentage points above the LTV. This buffer prevents positions from becoming insolvent before they can be liquidated.
These parameters are set conservatively for volatile assets and more generously for stablecoins. WBTC (wrapped Bitcoin) might carry a 70% LTV; USDC deposited as collateral might carry a 90% LTV.
Health Factor: The Real-Time Risk Score
A borrower's health factor is a single number that summarizes their liquidation risk:
Health Factor = (Collateral Value × Liquidation Threshold) / Total Debt Value
A health factor above 1.0 means the position is solvent. A health factor below 1.0 means it is eligible for liquidation. As collateral prices fall or borrowed asset prices rise (either event increases the debt-to-collateral ratio), the health factor declines toward the liquidation trigger.
Sophisticated DeFi users monitor their health factors continuously and top up collateral or repay debt proactively when it approaches 1.0. Many DeFi dashboards send automated alerts when health factors fall below a safe threshold, such as 1.3 or 1.5.
Liquidation Mechanics
When a position's health factor drops below 1.0, any external actor (a "liquidator") can repay part of the borrower's debt in exchange for a discounted portion of their collateral.
For example, suppose a borrower has $10,000 of ETH collateral and $8,500 of USDC debt, and ETH falls so that their health factor drops to 0.95. A liquidator can repay up to 50% of the debt ($4,250 of USDC) and receive, say, $4,675 of ETH in return — a 5% liquidation bonus (the exact percentage varies by asset and protocol). The liquidator profits $425; the borrower loses some collateral and has their position partially unwound.
Protocols typically limit each liquidation to 50% of the outstanding debt to prevent full liquidation of a position that might be only slightly undercollateralized — giving borrowers a chance to add collateral and save part of their position.
Liquidation Bots
In practice, liquidations are executed by automated bots that monitor every open position's health factor in real time, competing to be the first to submit a profitable liquidation transaction. These bots are essential to protocol solvency: if no one liquidated underwater positions, bad debt would accumulate and eventually threaten suppliers' capital.
During extreme market volatility — the March 2020 COVID crash, the May 2022 Terra collapse — gas prices spike as hundreds of bots compete simultaneously, and some positions may go temporarily unliquidatable if gas costs exceed the liquidation bonus. This is a known risk in the model.
Flash Loans: Uncollateralized Borrowing
One uniquely DeFi feature enabled by smart contract atomicity is the flash loan: an uncollateralized loan that must be borrowed and repaid within the same transaction block.
A user can borrow $10,000,000 of USDC from Aave's pool with no collateral, use it to execute an arbitrage trade or collateral swap across other protocols, and repay the $10,000,000 plus a 0.09% fee — all atomically. If any step fails, the entire transaction reverts and the funds are never actually lent. Flash loans enable:
- Arbitrage between DEXs without requiring capital
- Collateral swaps (swap ETH collateral for WBTC in one transaction)
- Self-liquidations (liquidate your own underwater position using borrowed funds to avoid paying the full liquidation bonus to an external bot)
Flash loans demonstrate the power of atomic composability: financial operations that would be impossible in traditional finance — zero-capital arbitrage, instant collateral swaps — become routine on-chain.
Protocol Risk Management
Beyond individual position management, DeFi lending protocols maintain systemic risk parameters through governance. Governance token holders (AAVE holders for Aave, COMP holders for Compound) vote on risk parameter changes: adding new collateral assets, adjusting LTV ratios, changing reserve factors, setting borrow caps and supply caps.
Supply caps and borrow caps — limits on how much of a given asset can be deposited or borrowed — were introduced after protocols recognized that unlimited exposure to a single volatile asset could create systemic risk. If an attacker manipulates the price oracle for a small-cap token, they could drain a pool by posting inflated collateral. Caps limit the maximum damage from such an attack.
The history of DeFi lending is partly a history of learning from exploits: oracle manipulation attacks, reentrancy vulnerabilities, governance attacks. Each incident has led to protocol improvements and more conservative risk parameters, making the surviving systems more robust over time.