IRCLState

Methods

getEpoch

function getEpoch(uint256 rate, uint256 epochId) external view returns (uint256 deposited, uint256 borrowed, uint256 accruals, uint256 loanId, bool isBaseEpoch, uint256 precedingLoanId, uint256 positionsCount)

Gets the target epoch data

Parameters

Name
Type
Description

rate

uint256

Rate of the queried tick

epochId

uint256

ID of the queried epoch

Returns

Name
Type
Description

deposited

uint256

Amount of funds deposited into the epoch

borrowed

uint256

Amount of funds borrowed from the epoch

accruals

uint256

Accruals generated by the epoch

loanId

uint256

ID of the first loan of the epoch

isBaseEpoch

bool

Boolean to signify whether the epoch is a base epoch or not

precedingLoanId

uint256

Id of the loan before that epoch loan

positionsCount

uint256

Number of positions in the epoch

getLoanDuration

function getLoanDuration() external view returns (uint256 loanDuration)

Retrieve the pool loan duration

Returns

Name
Type
Description

loanDuration

uint256

The pool loan duration

getMaturity

function getMaturity() external view returns (uint256 maturity)

Retrieve the current maturity

Returns

Name
Type
Description

maturity

uint256

The current maturity

Last updated