IFluidLendingRewardsRateModel

Git Source

Functions

getRate

Calculates the current rewards rate (APR)

function getRate(uint256 totalAssets_) external view returns (uint256 rate_, bool ended_, uint256 startTime_);

Parameters

NameTypeDescription
totalAssets_uint256amount of assets in the lending

Returns

NameTypeDescription
rate_uint256rewards rate percentage per year with 1e12 RATE_PRECISION, e.g. 1e12 = 1%, 1e14 = 100%
ended_boolflag to signal that rewards have ended (always 0 going forward)
startTime_uint256start time of rewards to compare against last update timestamp

getConfig

Returns config constants for rewards rate model

function getConfig()
    external
    view
    returns (
        uint256 duration_,
        uint256 startTime_,
        uint256 endTime_,
        uint256 startTvl_,
        uint256 maxRate_,
        uint256 rewardAmount_,
        address initiator_
    );