Skip to main content

Fees

Transparent fee structure

Overview

Fees in OctoLend are designed to balance incentives between liquidity providers, curators, borrowers, and the protocol.
Each component — Lending Market, Collateral Vault, and Interest Rate Model — implements its own fee logic in a modular way.
Together, they form a transparent flow of value from borrowers to lenders, curators, and the OctoLend protocol treasury.

Fee Architecture

OctoLend’s fee model has four components:

Fee TypeModulePayerRecipientDescriptionPurpose
Borrow InterestIRM / MarketBorrowersMarket VaultContinuous interest accrual on debt balances, reflected via debt token price.Compensates liquidity providers
Delegation FeeCollateral VaultDelegated BorrowersCollateral VaultCompensation paid by borrowers who receive delegated collateral from depositors.Rewards collateral delegation
Lending FeeLending MarketBorrowers (via interest)Protocol TreasuryPortion of interest or fees routed to protocol reserves and curators.System reserves / growth
Liquidation BonusLending MarketDefaulted BorrowersLiquidatorsDiscount on seized collateral.Incentivizes risk resolution

Each fee is fully on-chain and queryable.

All accruals are expressed in the underlying asset.

Borrow Interest (Market Layer)

Accrual Mechanism

The Interest Rate Model (IRM) governs how interest accrues for each Lending Market.
Borrowers pay interest continuously, tracked via debt token price increases over time.

Interest compounds each block (or per accrual call) using the compound_interest() function, which updates:

  • The instantaneous rate (get_current_rate())
  • The compounded rate (get_r_comp())
  • The total debt assets in market storage

Formula

Debt growth is exponential in time:

debt_assets(t)=debt_assets(0)×(1+rcomp)\text{debt\_assets}(t) = \text{debt\_assets}(0) \times (1 + r_{\text{comp}})

where

rcomp=ex1r_{\text{comp}} = e^x - 1

computed from the IRM’s dynamic utilization formula.

Interest Model Types

  • Fixed Rate: Constant rir_i
  • Dynamic Rate: PI controller using uoptu_{\text{opt}}, kik_i
  • Kinked Rate: Penalty above ucritu_{\text{crit}}

Interest naturally flows to lenders via vault share price appreciation — no explicit transfer is required.

Delegation Fee

Fee Model

When collateral is delegated through a Collateral Vault, a delegation fee is charged to the borrower receiving delegated collateral.

The fee rate is defined in basis points (delegation_fee_bps) and stored per borrower in the ReceiverConfig struct.
Fees accrue continuously on the borrower's active allocations:

fee=amount×bps10,000×Δtseconds_in_year\text{fee} = \text{amount} \times \frac{\text{bps}}{10{,}000} \times \frac{\Delta t}{\text{seconds\_in\_year}}

Accrual and Payment

  • Fees accrue automatically when allocations are created or modified.
  • Accumulated fees are stored in each borrower’s allocation record (accrued_fee).
  • Borrowers can settle by calling pay_delegation_fee().
  • On default or liquidation, unpaid fees are forfeited via forfeit_fees().

Flow of Funds

Delegation fees are denominated in the collateral asset and accumulate in the vault's fee pool:

TotalFeesAccrued+=calc_fee(allocation_amount, duration, fee_bps)\text{TotalFeesAccrued} += \text{calc\_fee(allocation\_amount, duration, fee\_bps)}

Collected fees can later be distributed to vault depositors, curators, or the protocol treasury.

Market Fees

Market fees represent the fraction of interest income reserved for the protocol.

Example

If the fee factor is 1000 (10%) and a market earns 100 USDC in interest:

  • 10 USDC → reserves
  • 90 USDC → lenders

Fee Distribution

At the system level, market fees can be split between:

  • Curator: managing the Earn Vault
  • Protocol treasury: supporting protocol growth and buybacks

Fees accrue in vault shares and compound until withdrawn.

Liquidation Bonus

While not a fee in the strict sense, liquidations include a bonus incentive:

bonus=repay_amount×liquidation_bonus_bps10,000\text{bonus} = \text{repay\_amount} \times \frac{\text{liquidation\_bonus\_bps}}{10{,}000}

Liquidators earn this extra collateral when repaying part of a defaulted borrower’s debt.
It functions as a risk-adjusted reward for providing stability under stress, funded by the borrower’s collateral.

Transparency

All fees and interest parameters are on-chain and can be read directly:

FunctionModuleDescription
get_total_fees_accrued()Collateral VaultTotal delegation fees accumulated
get_delegation_fee_bps()Collateral VaultFee rate per borrower
get_total_debt_assets()Lending MarketDebt principal + accrued interest
get_r_i()Interest Rate ModelBase per-second interest rate
get_price()Interest Rate ModelCurrent debt token price (with interest)
get_reserve_factor()Lending MarketPortion of income reserved for protocol

This design makes OctoLend fully transparent in how value flows between users and the protocol.

Summary

  • All rates are denominated in basis points (bps) or per-second WAD values.
  • Fee parameters are immutable once the market or vault is deployed — ensuring predictability and preventing governance risk.
  • Each market and vault is self-contained, so fee flows are isolated and cannot affect others.