Helios Finance
  • Introduction
    • Problem - Solution
    • How Helios Differs from Other Protocols
    • Summary of Capabilities
  • Quickstart
    • Installing Leather Wallet
    • Add MIDL regtest on Leather
    • Get test tokens from faucet
    • Experience the new BTC Defi
  • Architecture
    • Overview
      • Helios & MIDL Architecture Overview
      • MIDL Validator Network (DPoS Consensus Layer)
      • Threshold Signature Scheme
      • Lending Logic Layer by Helios
      • Roles and Responsibilities Summary
    • Bitcoin-Native Smart Contracts
    • Bitcoin Settlement Flow and One-Step Transactions
    • Bitcoin Settlement & Finality
  • Core Concepts
    • Overview
    • BTC-Native Liquidity, Expanded Asset Support
      • Interest Mechanics
      • Supported Assets
    • Partial Collateral Swap (Flexible Position Management)
  • Risk Framework
    • Overview
    • Adaptive Risk Optimization (Mempool- & Volatility-Aware LTVs)
      • More on Adaptive Risk Engine
    • Liquidation Mechanics
  • Capital Efficiency and Use Cases
    • Overview
    • Delta-Neutral Yield Strategies
    • Enhanced Yield for Bitcoin Holders
    • Arbitrage and Market Efficiency
    • Tax-Optimized Borrowing
  • Institutional Compliance and Security
    • Overview
    • KYC-Ready Architecture and Permissioned Pools
      • More on Dual-Layer Market
    • AML, Monitoring, and Auditability
    • Regulatory Alignment (MiCA, BIS/IOSCO, etc.)
  • For Developers
    • Overview
    • Interest Rate Model
    • Supply & Borrow Interest
    • Functions
      • Common Functions
      • Supply & Withdraw
      • Borrow & Repay & Liquidate
      • Flashloan
    • SDK Release Plan
    • Smart Contract Interface via MIDL (EVM on Bitcoin)
    • Transaction Fees
  • Oracles and Price Feeds
  • Running a Liquidator or Integration with Exchanges
Powered by GitBook
On this page
  • 1 Overview
  • 2 Deposit Interest
  • 3 Borrow Interest
  • 4 Putting It Together
  • 5 What Suppliers Should Know
  • 6 Key Contract Hooks
  1. For Developers

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

nextLiquidityIndex = prevIndex * (1e27 + r * Δt);
  • 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

(1+r)Δt≈1+rΔt+(Δt(Δt−1)/2)r2+(Δt(Δt−1)(Δt−2)/6)r3(1 + r)^{Δt} ≈ 1 + rΔt + (Δt(Δt−1) / 2) r² + (Δt(Δt−1)(Δt−2) / 6) r³(1+r)Δt≈1+rΔt+(Δt(Δt−1)/2)r2+(Δt(Δt−1)(Δt−2)/6)r3
  • 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

Metric
Symbol
Formula
Why it matters

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

  1. hToken balances grow only when the pool is touched—quiet markets mean the bump shows on the next transaction.

  2. Borrowers pay every second via the variable-borrow index, even if no one interacts.

  3. 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

Function
Role

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.

PreviousInterest Rate ModelNextFunctions

Last updated 28 days ago