How DeFi lending protocols calculate interest
Published 10/22/2026, 12:32:16 AM
DeFi lending protocols don't "set" interest rates like a bank does. They run an algorithmic utilization-driven rate model on-chain: a single formula turns a market's current state into a borrow rate, and the supplier yield is derived from that borrow rate. The chain of calculation is nearly identical across the major protocols (Aave, Compound, Euler), differing mainly in curve shape, parameterization, and governance control.
1. The core input: utilization
Every major pool compresses its state into one number — utilization (U): how much of supplied liquidity is currently borrowed.
- Definition:
Utilization = Total Borrowed / Total Supplied(Spark); alternatively, "the ratio of borrowed funds to available liquidity" (S&P Global). - Compound's original formulation defines it as borrowed assets relative to total available assets in the market (Cube Exchange); Euler computes
borrows / (cash + borrows)(Euler docs). - This is deliberately the opposite of traditional money markets, where rates are set exogenously by monetary policy (Warwick paper).
2. The generic two-part calculation
Any one market produces two yields:
Borrow rate — a piecewise function of utilization, usually with a kink (called U_optimal in Aave):
- Below the kink: rate rises gently along Slope 1 (cheap credit to encourage borrowing).
- Above the kink: rate spikes along Slope 2 to discourage further borrowing and incentivize deposits (Spark, Aave risk docs, Cube Exchange).
Supply rate (the "yield" lenders earn) — the same money that borrowers pay, diluted across all suppliers and net of the protocol's cut:
"The supply rate is calculated as the product of the borrow rate, utilization rate and (1 minus the reserve factor)." (S&P Global)
i.e., Supply rate = Borrow rate × Utilization × (1 − Reserve factor). Because only part of the interest borrowers pay reaches suppliers (the rest goes to the protocol reserve), the lending rate is always lower than the borrow rate in the same market (Otomato). Euler states it even more directly: supply APY = borrow APY × utilization × (1 − interestFee) (Euler docs).
3. How Aave does it (two-slope "kinked" model)
- Aave v2's reference contract hardcodes
OPTIMAL_UTILIZATION_RATE = 0.8 * 1e27andEXCESS_UTILIZATION_RATE = 0.2 * 1e27(i.e., kink at 80%), with "2 slopes, one before the OPTIMAL_UTILIZATION_RATE point of utilization and another from that one to 100%" (Aave protocol-v2 GitHub). - The risk framework: "When U ≤ U_optimal the borrow interest rates increase slowly with utilisation. When U > U_optimal the borrow interest rates increase sharply with utilisation to above 50% APY if the liquidity is fully utilised." (Aave risk-v3 docs).
- Kinks are asset-specific: for USDC on Ethereum, optimal utilization is 90.5%, with Slope 1 ≈ 4% annualized and Slope 2 at 75% above the kink (Spark). [CONTRADICTED: While Spark's comparison tool reported these numbers, Aave governance posts for the Ethereum Core market list optimal utilization at 92% with Slope1 ~3.5% and Slope2 ~10% (see https://governance.aave.com/t/arfc-improve-liquidity-buffer-for-usdc-on-aave-v3-ethereum-core-raise-slope-2-lower-optimal-utilization/24684). The parameters vary across networks and over time; this specific configuration is not independently confirmed.]
- Aave v3 recalculates rates every Ethereum block (Spark, earnpark, talos); v3 still uses "two slopes with an optimal utilization point" (Aave v3 docs).
- How yield accrues mechanically: supplying mints interest-bearing tokens (aTokens like aUSDC) whose balance increases over time from borrowing activity; debt is tracked via variableDebtTokens that accrue interest (Aave v3 docs).
4. How Compound does it (jump-rate model)
- Compound's
JumpRateModelcontract is parameterized bybaseRatePerBlock,multiplierPerBlock,jumpMultiplierPerBlock, andkink(Compound GitHub). - Below the kink, the borrow rate grows linearly (
baseRate + utilization × multiplier); above it, a steeper "jump" multiplier applies — academically, "a kinked interest rate model" described in the loanable-funds literature (Berkeley paper). - Rates compound per Ethereum block, and the interest rate index is updated "each time an interest rate changes, i.e. as users mint, redeem, borrow, repay or liquidate assets" (Berkeley paper).
- Each market has its own curve based on that asset's utilization (Warwick paper).
5. How Euler v2 does it (modular IRMs)
Euler v2 is the modular extreme: each vault deploys its own Interest Rate Model (IRM) contract, chosen by the vault creator. The standard EulerKinkIRMFactory.deploy takes baseRate, slope1, slope2, kink (Euler docs), and the formula is explicit:
if utilization <= kink: rate = baseRate + utilization * slope1
else: rate = baseRate + kink * slope1 + (utilization - kink) * slope2
Two implementation details worth noting:
- Euler's models return a per-second compounded borrow rate (SPY) scaled by 1e27, annualized using an average Gregorian year of 365.2425 × 86,400 seconds:
APY = (1 + r_p)^n − 1(Euler docs). [VERIFIED: The official Euler docs confirm this exact formulation.] - A governed vault can replace its IRM if conditions change; a finalized (ungoverned) vault cannot (Euler docs).
6. Curve shape and governance differences
| Protocol | Model | Kink (typical) | Who sets parameters | Rate update cadence |
|---|---|---|---|---|
| Aave v3 | Two-slope kinked, per-asset slopes | ~80–93% (e.g., USDC 90.5% — contradicted by Aave governance data; see above) | AAVE token holders via governance, advised by risk advisers (S&P Global) | Every block (Spark, earnpark, talos) |
| Compound | Jump-rate model (baseRate, multiplier, jumpMultiplier, kink) | ~80% typical | COMP holders vote "from interest rates to asset listings" (CoinGecko via search) | Per block, via interest index updates (Berkeley) |
| Euler v2 | Plug-in IRM per vault (kink, linear, time-based) | Configurable (e.g., 90% kink example) | Vault creator/governor; finalize makes it immutable (Euler docs) | Continuous (per-second SPY) (Euler docs) |
A common thread: all are examples of kinked/jump utilization curves — "a kinked or jump model instead of a single straight line" is what modern markets use to keep utilization near a target range (Cube Exchange).
7. What "displayed yield" actually includes (the gap to flag)
The base rate is only one layer. In practice, the APY suppliers see frequently bundles:
- protocol base supply rate (from the formula above),
- intrinsic yield (e.g., yield-bearing collateral like stETH) and reward APR (incentive tokens), which Euler explicitly breaks out in its APY breakdown (Euler docs).
- Example from recent market activity: Aave announced USDC supply incentives in Coinbase's Tokenized Stocks Hub on Aave V4 (Base) as "a reward on top of the base rate" (x.com/Joshuwa). Incentives are a governance/integration layer, not the rate model itself.
There is no single canonical "APY" definition that all protocols display identically — compounding conventions (per-block vs per-second vs per-year), reserve fees, and reward layers differ, so cross-protocol APY comparisons require normalizing those (Spark's comparison makes the same caveat). Live per-asset rates (e.g., current supply APY for USDC on Aave vs Compound) are structured on-chain data outside this toolset and would require a direct protocol/analytics query.
Market context (as of the data snapshot)
- AAVE: $155.40, market cap ≈ $2.40B, +0.36% 24h (CoinGecko)
- COMP: $25.78, market cap ≈ $257.8M, −0.49% 24h (CoinGecko)
- EUL: $1.21, market cap ≈ $29.0M, +2.80% 24h (CoinGecko)
Conclusion
DeFi lending yields are computed algorithmically from utilization via a kinked borrow-rate curve, with the supply rate derived as borrow rate × utilization × (1 − reserve factor) — a mechanism consistent across Aave, Compound, and Euler, differing mainly in curve shape, parameterization, and governance control. What remains open is live per-asset rate parameterization (e.g., current USDC slopes), which varies by network and over time and is not independently confirmed in this data.