Supply & Borrow Interest
Helios keeps the well-tested “index” model of AAVE : deposit yield accrues linearly into a liquidity index, while borrow debt compounds continuously in a variable-borrow index. Both indexes start at 1 RAY (10²⁷) and grow multiplicatively; Whenever anyone supplies, borrows, repays, or withdraws, the contract updates both indexes—so deposit APY compounds discretely on each touch, while borrow APR compounds every second through a gas-saving binomial approximation.
1 Overview
BTC in, hToken out (for suppliers) Suppliers receive hTokens that rebase upward as the liquidity index grows; borrowers watch their BTC debt rise as the variable-borrow index ticks.
2 Deposit Interest
2.1 Linear-rate accrual
r
= per-second liquidityRate;Δt
= seconds since the last update.Because the factor (1 + r Δt) multiplies the previous index, interest already earned also earns interest → true compounding.
Indexes update only on state-changing calls (supply, withdraw, borrow, repay, liquidation). Between touches the index is flat; over many touches the multiplicative chain matches continuous compounding.
3 Borrow Interest
3.1 Binomial approximation
Accurate to <0.01 % for multi-year loans, but far cheaper than full exponentiation.
Variable-rate debt compounds for every borrower interaction; stable-rate debt compounds only when the holder touches their own position.
4 Putting It Together
Utilization
U
borrowed BTC ÷ total BTC
Drives both borrow & supply rates.
Borrow APR
rᵦ
interestRateModel(U)
Piece-wise “kink” curve.
LiquidityRate
rₗ
rᵦ × U × (1 – reserveFactor)
Portion paid to suppliers.
LiquidityIndex
Iₗ
Iₗ₍prev₎ × (1 + rₗ Δt)
Updated on every touch.
VariableBorrowIndex
Iᵥ
Iᵥ₍prev₎ × binomial(rᵦ, Δt)
Ticks each second.
Reserve-factor BAC diverts a slice of borrower interest to the Helios treasury; the rest becomes deposit yield.
5 What Suppliers Should Know
hToken balances grow only when the pool is touched—quiet markets mean the bump shows on the next transaction.
Borrowers pay every second via the variable-borrow index, even if no one interacts.
High utilisation (> 90 %) or congested mempool condition spikes rates. Borrow APR jumps sharply; liquidityRate climbs more gently, attracting fresh BTC to restore balance.
6 Key Contract Hooks
updateState()
Refreshes both indexes at the start of every mutative call.
calculateLinearInterest()
Computes the supply slice for deposits.
calculateCompoundedInterest()
Applies the binomial borrow interest step.
Summary
Deposits: simple-interest slices multiplied into a growing liquidity index → discrete but effectively compound yield.
Borrows: continuous compounding via binomial math → debt grows each second.
Indexes: both start at 1 RAY and scale every balance without touching individual accounts, keeping gas low and accounting transparent.
Last updated