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 Type | Module | Payer | Recipient | Description | Purpose |
|---|---|---|---|---|---|
| Borrow Interest | IRM / Market | Borrowers | Market Vault | Continuous interest accrual on debt balances, reflected via debt token price. | Compensates liquidity providers |
| Delegation Fee | Collateral Vault | Delegated Borrowers | Collateral Vault | Compensation paid by borrowers who receive delegated collateral from depositors. | Rewards collateral delegation |
| Lending Fee | Lending Market | Borrowers (via interest) | Protocol Treasury | Portion of interest or fees routed to protocol reserves and curators. | System reserves / growth |
| Liquidation Bonus | Lending Market | Defaulted Borrowers | Liquidators | Discount 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:
where
computed from the IRM’s dynamic utilization formula.
Interest Model Types
- Fixed Rate: Constant
- Dynamic Rate: PI controller using ,
- Kinked Rate: Penalty above
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:
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:
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:
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:
| Function | Module | Description |
|---|---|---|
get_total_fees_accrued() | Collateral Vault | Total delegation fees accumulated |
get_delegation_fee_bps() | Collateral Vault | Fee rate per borrower |
get_total_debt_assets() | Lending Market | Debt principal + accrued interest |
get_r_i() | Interest Rate Model | Base per-second interest rate |
get_price() | Interest Rate Model | Current debt token price (with interest) |
get_reserve_factor() | Lending Market | Portion 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.