CreditAccountInfo struct contains essential information about a credit account’s state.
Struct Definition
Fields
Current debt principal amount (excluding accrued interest and fees)
Cumulative base interest index at the time of last debt update in ray units. Used to calculate accrued base interest.
Cumulative quota interest accrued by the account. This value increases over time based on quota usage.
Quota fees owed by the account
Bitmask representing which tokens are currently enabled as collateral on this account. Each bit corresponds to a token.
Flags bitmap for account state (e.g., special permissions or status indicators)
Block number of the last debt update. Used to prevent multiple debt updates in the same block.
Address of the account owner/borrower
Usage
This struct is returned byICreditManagerV3.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