This contract implements the calculation of the discount rate depending on the current strategy.
GhoDiscountRateStrategy contract inherits the
Constant State Variables
uint256 public constant GHO_DISCOUNTED_PER_DISCOUNT_TOKEN = 100e18
The amount of debt that is entitled to get a discount per unit of discount token (stkAAVE).
Expressed with the number of decimals of the discounted token (GHO).
uint256 public constant DISCOUNT_RATE = 0.3e4
The percentage of discount to apply to the part of the debt that is entitled to get a discount.
Expressed in bps. For example, a value of 3000 results in 30.00%.
uint256 public constant MIN_DISCOUNT_TOKEN_BALANCE = 1e15
The minimum balance amount of discount token (stkAAVE) a user must hold to be entitled to a discount.
Expressed with the number of decimals of the discount token (stkAAVE).
uint256 public constant MIN_DEBT_TOKEN_BALANCE = 1e18
Minimum balance amount of debt token (variableEthDebtGHO) to be entitled to a discount.
Expressed with the number of decimals of the debt token (GHO).
) external pure override returns (uint256)
Calculates the discount rate depending on the debt token (GHO) and discount token (stkAAVE) balances.
Please see the Discount Rate page for more information and examples of the discount rate implementation.
|The debt balance of the user
|The discount token (stkAAVE) balance of the user
|The discount rate, as a percentage - the maximum can be 10000bps = 100.00%