Skip to main content

ICREDTv1

Git Source

Baseline Credit Module

Imported at commit 88bb34b23b1627207e4c8d3fcd9efad22332eb5f

Functions

bAsset

bAsset token

function bAsset() external view returns (ERC20);

creditAccounts

Individual credit account state

function creditAccounts(
address
) external view returns (uint256 credit, uint256 collateral, uint256 expiry);

defaultList

List of aggregate credits and collateral that must be defaulte when a timeslot is reached

function defaultList(uint256) external view returns (uint256 credit, uint256 collateral);

lastDefaultedTimeslot

Last timeslot that was defaulted, acts as queue iterator

function lastDefaultedTimeslot() external view returns (uint256);

totalCreditIssued

Total reserves issued as credit

function totalCreditIssued() external view returns (uint256);

totalCollateralized

Total bAssets collateralized

function totalCollateralized() external view returns (uint256);

totalInterestAccumulated

Total interest accrued

function totalInterestAccumulated() external view returns (uint256);

getCreditAccount

Gets current credit account for user.

Returns zeroed account after full repayment or default.

function getCreditAccount(address _user) external view returns (CreditAccount memory account_);

updateCreditAccount

function updateCreditAccount(
address _user,
uint256 _newCollateral,
uint256 _newCredit,
uint256 _newExpiry
) external;

Structs

Defaultable

Container for aggregate credit and collateral to be defaulted at a timeslot

struct Defaultable {
uint256 credit;
uint256 collateral;
}