MathFin
Map / Valuation · Static replication and model-free bounds / MathFin.Markets.DeFi.Compound

Compound: utilization, affine borrow rate, cToken exchange-rate monotonicity

MathFin.Markets.DeFi.CompoundMSC 91G80JEL G23 source

Adapted from the Compound whitepaper (R. Leshner and G. Hayes, "Compound: The Money Market Protocol", v1.0, February 2019): §2.3 Interest Rate Model (utilization, affine borrow rate), §3.1 cToken Contracts (exchange rate) and §3.2.1 Market Dynamics (interest-rate index, reserve-factor accrual).

Main definitions

  • utilization: borrows / (cash + borrows).
  • borrowRate: the affine rate base + slope * U.
  • exchangeRate: the cToken rate (cash + borrows - reserves) / totalSupply.

Main results

  • utilization_mem_Icc: for nonnegative cash and borrows, U ∈ [0, 1].
  • borrowRate, borrowRate_monotone: the affine rate r = base + slope · U, monotone in U when slope ≥ 0.
  • exchangeRate_mono: over one accrual period, with cash and a positive total supply unchanged, the exchange rate does not decrease, under the explicit hypothesis that the reserve-factor cut does not exceed the accrued interest (reservesAdded ≤ interest) — the whitepaper's reserve-factor accrual equations give this (reservesAdded = interest · reserveFactor with reserveFactor ∈ [0,1] and interest ≥ 0), but it is stated as a standalone hypothesis on the accrued amounts rather than re-derived from reserveFactor.
  • borrowIndex_eq_mul_pow, borrowIndex_le_inv_zcb, tendsto_borrowIndex: the interest-rate index of §3.2.1, Index_n = Index_{n−1} · (1 + r·t) at a per-block rate r over periods of length t, against the library's zero-coupon bond (Models/Rates/PeriodicCompounding.lean): at a constant rate it is Index_0 · (1 + r t)^n, never above continuous compounding Index_0 / zcb r 0 (n t), and accruing a horizon T in n equal periods converges to Index_0 / zcb r 0 T. Rates that change between periods are not covered.

References

  • J. C. Hull, Options, Futures, and Other Derivatives [Hull], §4.2
  • R. Leshner and G. Hayes, Compound: The Money Market Protocol [LeshnerHayes2019], §3.2.1

Tags

Compound protocol, money market, utilization rate, cToken, exchange rate, borrow index, lending, MSC 91G80, JEL G23

Import neighbourhood

Above: what it imports. Below: what imports it.

Corpus entries

mf-compound-borrow-index-continuous-limit · defi.json · full statement
Compound Interest-Rate Index Against Continuous Compounding

Compound's interest-rate index Index_n = Index_{n-1} * (1 + r*t), at a constant per-block rate r over periods of t blocks, with r*t >= -1 and a nonnegative initial index, never exceeds continuous compounding over the elapsed time: Index_n <= Index_0 / zcb(r, 0, n*t) = Index_0 * exp(r*n*t). Splitting a horizon T into n equal periods, Index_0 * (1 + r*T/n)^n converges to Index_0 / zcb(r, 0, T). Rates that change between periods are not covered.

Declarations 9

defMathFin.DeFi.Compound.utilizationsource
ℝ → ℝ → ℝ

Compound utilization rate: the fraction of the pool's assets (cash + outstanding borrows) that is currently borrowed out, per the whitepaper's §2.3 definition. (The deployed interest-rate-model contract additionally nets reserves out of the denominator; that refinement is not formalized here.)

theoremMathFin.DeFi.Compound.utilization_mem_Iccsource
∀ {cash borrows : ℝ}, 0 ≤ cash → 0 ≤ borrows → utilization cash borrows ∈ Set.Icc 0 1

For nonnegative cash and borrows the utilization lies in [0, 1] (it is 0 for an empty pool, by the x / 0 = 0 convention).

defMathFin.DeFi.Compound.borrowRatesource
ℝ → ℝ → ℝ → ℝ

Compound affine borrow-rate model: r(U) = base + slope · U. Takes U directly (rather than cash/borrows) so it applies uniformly whether U comes from utilization or from the on-chain reserves-netted refinement noted on utilization.

theoremMathFin.DeFi.Compound.borrowRate_monotonesource
∀ {base slope : ℝ}, 0 ≤ slope → Monotone (borrowRate base slope)

Borrow rate is monotone nondecreasing in utilization when the slope is nonnegative.

defMathFin.DeFi.Compound.exchangeRatesource
ℝ → ℝ → ℝ → ℝ → ℝ

Compound cToken exchange rate: the redeemable-underlying-per-cToken rate (Cash + Borrows − Reserves) / TotalSupply.

theoremMathFin.DeFi.Compound.exchangeRate_monosource
∀ {cash borrows reserves totalSupply interest reservesAdded : ℝ}, 0 < totalSupply → reservesAdded ≤ interest → exchangeRate cash borrows reserves totalSupply ≤ exchangeRate cash (borrows + interest) (reserves + reservesAdded) totalSupply

cToken exchange-rate monotonicity under interest accrual. Suppose a period accrues interest of new borrows, of which reservesAdded is cut to reserves. Explicit hypothesis reservesAdded ≤ interest — the whitepaper's reserve-factor accrual equations give this (reservesAdded = interest · reserveFactor with reserveFactor ∈ [0,1] and interest ≥ 0), but we state it as a standalone hypothesis on the accrued amounts rather than re-deriving it from reserveFactor here. Under it, with cash and supply unchanged and totalSupply > 0, the exchange rate after accrual is at least the rate before.

theoremMathFin.DeFi.Compound.borrowIndex_eq_mul_powsource
∀ (index : ℕ → ℝ) (r t : ℝ), (∀ (n : ℕ), index (n + 1) = index n * (1 + r * t)) → ∀ (n : ℕ), index n = index 0 * (1 + r * t) ^ n

Compound interest-rate index (whitepaper §3.2.1, Market Dynamics): each transaction compounds the index by the interest for the period, Index_n = Index_{n−1} · (1 + r·t). At a constant per-block rate r and period length t, the index is Index_0 · (1 + r t)^n.

theoremMathFin.DeFi.Compound.borrowIndex_le_inv_zcbsource
∀ (index : ℕ → ℝ) {r t : ℝ}, 0 ≤ index 0 → -1 ≤ r * t → (∀ (n : ℕ), index (n + 1) = index n * (1 + r * t)) → ∀ (n : ℕ), index n ≤ index 0 * (zcb r 0 (↑n * t))⁻¹

Per-period accrual never exceeds continuous compounding at the same rate. At a constant rate r with r t ≥ −1 and a nonnegative initial index, after n periods of length t the index is at most Index_0 / zcb r 0 (n t) = Index_0 · exp (r · n t).

theoremMathFin.DeFi.Compound.tendsto_borrowIndexsource
∀ (index₀ r T : ℝ), Filter.Tendsto (fun n => index₀ * (1 + r * (T / ↑n)) ^ n) Filter.atTop (nhds (index₀ * (zcb r 0 T)⁻¹))

Accruing ever more often converges to continuous compounding. Splitting a horizon T into n equal accrual periods at the constant rate r, the index Index_0 · (1 + r (T/n))^n tends to Index_0 / zcb r 0 T = Index_0 · exp (r T).