InterestRateModel

Given supply and demand values, the InterestRateModel is queried to calculate and return both fixed and variable rates. Contains parameters as state variables that are used to get the different points in the utilization curve for an asset. There's one InterestRateModel contract per enabled asset.

Public State Variables

fixedCurveA

function fixedCurveA() external view returns (uint256)

Scale factor of the fixed curve.

fixedCurveB

function fixedCurveB() external view returns (int256)

Origin intercept of the fixed curve.

fixedMaxUtilization

function fixedMaxUtilization() external view returns (uint256)

Asymptote of the fixed curve.

floatingCurveA

function floatingCurveA() external view returns (uint256)

Scale factor of the floating curve.

floatingCurveB

function floatingCurveB() external view returns (int256)

Origin intercept of the floating curve.

floatingMaxUtilization

function floatingMaxUtilization() external view returns (uint256)

Asymptote of the floating curve.

View Methods

fixedBorrowRate

function fixedBorrowRate(uint256 maturity, uint256 amount, uint256 borrowed, uint256 supplied, uint256 backupAssets) external view returns (uint256)

Gets the rate to borrow a certain amount at a certain maturity with supply/demand values in the fixed rate pool and assets from the backup supplier.

Parameters

Returns

floatingBorrowRate

function floatingBorrowRate(uint256 utilizationBefore, uint256 utilizationAfter) external view returns (uint256)

Returns the interest rate integral from utilizationBefore to utilizationAfter.

Minimum and maximum checks to avoid negative rate.

Parameters

Returns

Last updated