EarnerRateModel
Inherits: IEarnerRateModel
Author: M^0 Labs
State Variables
RATE_CONFIDENCE_INTERVAL
The interval over which there's confidence cash flow to earners will not exceed cash flows from minters.
RATE_MULTIPLIER
The percent (in basis points) of the earner rate that will be effectively used.
ONE
100% in basis points.
_MAX_EARNER_RATE
The name of parameter in TTG that defines the max earner rate.
_EXP_SCALED_ONE
The scaling of rates in for exponent math.
_WAD_TO_EXP_SCALER
The scaling of _EXP_SCALED_ONE
for wad maths operations.
mToken
The M Token contract address.
minterGateway
The Minter Gateway contract address.
ttgRegistrar
The TTG Registrar contract address.
Functions
constructor
Constructs the EarnerRateModel contract.
Parameters
minterGateway_
address
The address of the Minter Gateway contract.
rate
Returns the current yearly rate in BPS. This value does not account for the compounding interest.
maxRate
The max rate in basis points.
getSafeEarnerRate
Returns the safe earner rate.
Parameters
totalActiveOwedM_
uint240
totalEarningSupply_
uint240
minterRate_
uint32
Returns
<none>
uint32
The safe earner rate.