Interest Rate Strategy

The InterestRateStrategy contract manages loan interest rates with theses being dependent on the utilisation of liquidity within the lending pool reserve

Methods

calculateInterestRate()​

function calculateInterestRate(uint256 reserveId, uint256 availableLiquidity, uint256 totalStableDebt, uint256 totalVariableDebt, uint256 averageStableBorrowRate, uint256 reserveFactor)​

Calculates the interest rate depending on the reserve's state and configurations.

Parameter Name
Type
Description

reserveId

uint256

id of the targeted reserve

availableLiquidity

uint256

amount of liquidity available in the reserve

totalStableDebt

uint256

total amount of stable debt

totalVariableDebt

uint256

total amount of variable debt

averageStableBorrowRate

uint256

average stable borrow rate

reserveFactor

uint256

reserve factor for the reserve, i.e. percentage of yield going to the protocol

Returns

Parameter Name
Type
Description

liquidityRate

uint256

liquidity rate of the reserve

stableBorrowRate

uint256

stable borrow interest rate

variableBorrowRate

uint256

variable borrow interest rate

calculateInterestRates()​

function calculateInterestRate(uint256 reserveId, address asset, address fToken, uint256 liquidityAdded, uint256 liquidityTaken, uint256 totalStableDebt, uint256 totalVariableDebt, uint256 averageStableBorrowRate, uint256 reserveFactor)​

Parameter Name
Type
Description

reserveId

uint256

id of the targeted reserve

asset

address

address of the currency

fToken

address

address of the fToken proxy

liquidityAdded

uint256

amount of liquidity added

liquidityTaken

uint256

amount of liquidity taken

totalStableDebt

uint256

total amount of stable debt

totalVariableDebt

uint256

total amount of variable debt

averageStableBorrowRate

uint256

average stable borrow rate

reserveFactor

uint256

reserve factor for the reserve, i.e. percentage of yield going to the protocol

Calculates the interest rate depending on the reserve's state and configurations.

Returns

Parameter Name
Type
Description

liquidityRate

uint256

liquidity rate of the reserve

stableBorrowRate

uint256

stable borrow interest rate

variableBorrowRate

uint256

variable borrow interest rate

View Methods

variableRateSlope1()​

function variableRateSlope1()​

Returns slope1 of the variable interest rate.

variableRateSlope2()​

function variableRateSlope2()​

Returns slope2 of the variable interest rate.

stableRateSlope1()​

function stableRateSlope1()​

Returns slope1 of the stable interest rate.

stableRateSlope2()​

function stableRateSlope2()​

Returns slope2 of the stable interest rate.

baseVariableBorrowRate()​

function baseVariableBorrowRate()​

Returns the base variable borrow rate.

maxVariableBorrowRate()​

function maxVariableBorrowRate()​

Returns the max variable borrow rate.

ABI

Interest Rate Strategy ABI

Last updated