Trading Dev AcademyFree quant education

Free lesson · DeFi models

Lending utilization and rate response

Open interactive lessonPractice calculationsExplore labs

Start with the idea

A lending pool becomes less liquid when more supplied funds are borrowed. A rate curve can make additional borrowing more expensive near a utilization threshold.

Symbols, units & horizon
  • U: utilization fraction
  • B: borrowed quote units
  • S: supplied quote units, positive
  • U*: kink fraction
  • r_0: base annual rate
  • s_1,s_2: annual-rate increase per utilization unit below/above kink
  • r_b: annual borrow rate in this slope convention

When and why to use this

Stress carry financing and withdrawal liquidity under rising lending-pool utilization.

A lending pool becomes less liquid when more supplied funds are borrowed. A rate curve can make additional borrowing more expensive near a utilization threshold.

Use a simplified kinked model: a base annual rate plus one slope below a utilization kink and another above it. Rates are decimal annualized fractions, not per-block rates.

Utilization definitions differ by protocol when reserves, unbacked assets or special debt modes exist. Supply yield also differs from borrow rate because only borrowed capital earns interest and part may go to reserves.

U=BS,rb=r0+s1min⁡(U,U∗)+s2max⁡(0,U−U∗)
Model assumptions, derivation and arithmetic

Lending utilization and rate response

  1. Divide borrowed by supplied units under the stated balance definition.
  2. Apply lower slope to utilization up to the kink.
  3. Apply upper slope only to utilization above the kink, then add the base rate.
Work it by hand

B=80, S=100 so U=.8. With r0=.02, s1=.10, kink=.7, s2=1: rate=.02+.10×.7+1×.1=.19 or 19% annualized.

Apply it in a strategy

  • Stress carry financing and withdrawal liquidity under rising lending-pool utilization.
  • Record the input timestamp, executable quantity, currency and horizon. Reconcile the result with a cash-flow or state table.
  • Stress this failure condition: A protocol can define slope parameters differently, and variable rates can change before a trade unwinds.

Research deliverable

Build and explain a lending utilization and rate response worksheet. Stress carry financing and withdrawal liquidity under rising lending-pool utilization.

Evidence boundary: Synthetic arithmetic and scenarios illustrate mechanics. They are not historical returns, a paper replication, or evidence of an executable edge. Research sources and their access limitations are recorded at the end of this module.

Python implementation

Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.

# Python 3.10+; standard library unless NumPy is imported below.
# Inputs and outputs use the units defined in this lesson. Synthetic teaching example.
def borrow_rate(borrowed,supplied,base,slope1,slope2,kink):
    if supplied<=0 or not 0<=borrowed<=supplied or not 0<kink<1 or min(base,slope1,slope2)<0: raise ValueError("Invalid lending inputs")
    u=borrowed/supplied
    return u,base+slope1*min(u,kink)+slope2*max(0,u-kink)

print(borrow_rate(80,100,.02,.10,1,.7))

Continue learning

DeFi: AMMs, Liquidity Provision and Lending — all lessons
  1. Constant-product swaps with an input fee
  2. LP inventory after price changes
  3. LP value versus holding the original tokens
  4. Concentrated liquidity and range boundaries
  5. LVR and the price of stale inventory
  6. Lending utilization and rate response
  7. Collateral health factor and correlated shocks
  8. Liquidation incentives after execution costs

Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations