Skip to main content
The CreditAccountInfo struct contains essential information about a credit account’s state.

Struct Definition

struct CreditAccountInfo {
    uint256 debt;
    uint256 cumulativeIndexLastUpdate;
    uint128 cumulativeQuotaInterest;
    uint128 quotaFees;
    uint256 enabledTokensMask;
    uint16 flags;
    uint64 lastDebtUpdate;
    address borrower;
}

Fields

debt
uint256
Current debt principal amount (excluding accrued interest and fees)
cumulativeIndexLastUpdate
uint256
Cumulative base interest index at the time of last debt update in ray units. Used to calculate accrued base interest.
cumulativeQuotaInterest
uint128
Cumulative quota interest accrued by the account. This value increases over time based on quota usage.
quotaFees
uint128
Quota fees owed by the account
enabledTokensMask
uint256
Bitmask representing which tokens are currently enabled as collateral on this account. Each bit corresponds to a token.
flags
uint16
Flags bitmap for account state (e.g., special permissions or status indicators)
lastDebtUpdate
uint64
Block number of the last debt update. Used to prevent multiple debt updates in the same block.
borrower
address
Address of the account owner/borrower

Usage

This struct is returned by ICreditManagerV3.creditAccountInfo() and provides a snapshot of a credit account’s current state. It’s useful for:
  • Checking account ownership
  • Viewing current debt (need to calculate accrued interest separately)
  • Seeing which tokens are enabled as collateral
  • Determining when the account last updated its debt

Build docs developers (and LLMs) love