Unstable Protocol
  • Introduction
  • Users
    • Mint nUSD
    • Repay nUSD
    • Interest and Fees
    • Collateralization and Liquidation
    • Redemption
  • Developers
    • Architecture
    • Position Management
    • Interest and Fees
    • Price Oracle
    • Liquidation System
    • Redemption System
    • Emergency Controls
    • Deployments
    • Security & Audits
Powered by GitBook
On this page
Export as PDF
  1. Developers

Interest and Fees

The Interest and Fees component handles fee calculations and interest accumulation.

Action
Description
Function

Update Fees

Force interest accumulation update

updateFeeAccumulator()

Calculate Interest

Calculate interest on a position

Internal operation, automatic

Example: Get Origination Fee

// Get the origination fee percentage for a vault
uint256 originationFee = IVault(vaultAddress).getOriginationFee();

// Calculate the fee amount for a specific mint amount
uint256 feeAmount = (mintAmount * originationFee) / 10000; // Fee is in basis points
PreviousPosition ManagementNextPrice Oracle

Last updated 2 months ago