mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Updated DefaultInterestRateStrategy
This commit is contained in:
parent
56d25e81cb
commit
3f5822f5f6
|
@ -31,7 +31,7 @@ contract ATokensAndRatesHelper is Ownable {
|
||||||
function initDeployment(
|
function initDeployment(
|
||||||
address[] calldata tokens,
|
address[] calldata tokens,
|
||||||
string[] calldata symbols,
|
string[] calldata symbols,
|
||||||
uint256[5][] calldata rates,
|
uint256[][6] calldata rates,
|
||||||
address incentivesController
|
address incentivesController
|
||||||
) external onlyOwner {
|
) external onlyOwner {
|
||||||
require(tokens.length == symbols.length, 't Arrays not same length');
|
require(tokens.length == symbols.length, 't Arrays not same length');
|
||||||
|
@ -55,7 +55,8 @@ contract ATokensAndRatesHelper is Ownable {
|
||||||
rates[i][1],
|
rates[i][1],
|
||||||
rates[i][2],
|
rates[i][2],
|
||||||
rates[i][3],
|
rates[i][3],
|
||||||
rates[i][4]
|
rates[i][4],
|
||||||
|
rates[i][5]
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -23,7 +23,7 @@ contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy {
|
||||||
* @dev this constant represents the utilization rate at which the pool aims to obtain most competitive borrow rates
|
* @dev this constant represents the utilization rate at which the pool aims to obtain most competitive borrow rates
|
||||||
* expressed in ray
|
* expressed in ray
|
||||||
**/
|
**/
|
||||||
uint256 public constant OPTIMAL_UTILIZATION_RATE = 0.8 * 1e27;
|
uint256 public immutable OPTIMAL_UTILIZATION_RATE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @dev this constant represents the excess utilization rate above the optimal. It's always equal to
|
* @dev this constant represents the excess utilization rate above the optimal. It's always equal to
|
||||||
|
@ -31,7 +31,7 @@ contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy {
|
||||||
* expressed in ray
|
* expressed in ray
|
||||||
**/
|
**/
|
||||||
|
|
||||||
uint256 public constant EXCESS_UTILIZATION_RATE = 0.2 * 1e27;
|
uint256 public immutable EXCESS_UTILIZATION_RATE;
|
||||||
|
|
||||||
LendingPoolAddressesProvider public immutable addressesProvider;
|
LendingPoolAddressesProvider public immutable addressesProvider;
|
||||||
|
|
||||||
|
@ -52,12 +52,16 @@ contract DefaultReserveInterestRateStrategy is IReserveInterestRateStrategy {
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
LendingPoolAddressesProvider provider,
|
LendingPoolAddressesProvider provider,
|
||||||
|
uint256 optimalUtilizationRate,
|
||||||
uint256 baseVariableBorrowRate,
|
uint256 baseVariableBorrowRate,
|
||||||
uint256 variableRateSlope1,
|
uint256 variableRateSlope1,
|
||||||
uint256 variableRateSlope2,
|
uint256 variableRateSlope2,
|
||||||
uint256 stableRateSlope1,
|
uint256 stableRateSlope1,
|
||||||
uint256 stableRateSlope2
|
uint256 stableRateSlope2
|
||||||
) public {
|
) public {
|
||||||
|
|
||||||
|
OPTIMAL_UTILIZATION_RATE = optimalUtilizationRate;
|
||||||
|
EXCESS_UTILIZATION_RATE = WadRayMath.ray().sub(optimalUtilizationRate);
|
||||||
addressesProvider = provider;
|
addressesProvider = provider;
|
||||||
_baseVariableBorrowRate = baseVariableBorrowRate;
|
_baseVariableBorrowRate = baseVariableBorrowRate;
|
||||||
_variableRateSlope1 = variableRateSlope1;
|
_variableRateSlope1 = variableRateSlope1;
|
||||||
|
|
|
@ -321,12 +321,8 @@ export enum EthereumNetwork {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IProtocolGlobalConfig {
|
export interface IProtocolGlobalConfig {
|
||||||
OptimalUtilizationRate: BigNumber;
|
|
||||||
ExcessUtilizationRate: BigNumber;
|
|
||||||
ApprovalAmountLendingPoolCore: string;
|
|
||||||
TokenDistributorPercentageBase: string;
|
TokenDistributorPercentageBase: string;
|
||||||
MockUsdPriceInWei: string;
|
MockUsdPriceInWei: string;
|
||||||
EthereumAddress: tEthereumAddress;
|
|
||||||
UsdAddress: tEthereumAddress;
|
UsdAddress: tEthereumAddress;
|
||||||
NilAddress: tEthereumAddress;
|
NilAddress: tEthereumAddress;
|
||||||
OneAddress: tEthereumAddress;
|
OneAddress: tEthereumAddress;
|
||||||
|
|
|
@ -33,12 +33,8 @@ export const CommonsConfig: ICommonConfiguration = {
|
||||||
ConfigName: 'Commons',
|
ConfigName: 'Commons',
|
||||||
ProviderId: 0,
|
ProviderId: 0,
|
||||||
ProtocolGlobalParams: {
|
ProtocolGlobalParams: {
|
||||||
OptimalUtilizationRate: new BigNumber(0.8).times(RAY),
|
|
||||||
ExcessUtilizationRate: new BigNumber(0.2).times(RAY),
|
|
||||||
ApprovalAmountLendingPoolCore: '1000000000000000000000000000',
|
|
||||||
TokenDistributorPercentageBase: '10000',
|
TokenDistributorPercentageBase: '10000',
|
||||||
MockUsdPriceInWei: '5848466240000000',
|
MockUsdPriceInWei: '5848466240000000',
|
||||||
EthereumAddress: '0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE',
|
|
||||||
UsdAddress: '0x10F7Fc1F91Ba351f9C629c5947AD69bD03C05b96',
|
UsdAddress: '0x10F7Fc1F91Ba351f9C629c5947AD69bD03C05b96',
|
||||||
NilAddress: '0x0000000000000000000000000000000000000000',
|
NilAddress: '0x0000000000000000000000000000000000000000',
|
||||||
OneAddress: '0x0000000000000000000000000000000000000001',
|
OneAddress: '0x0000000000000000000000000000000000000001',
|
||||||
|
|
4898
package-lock.json
generated
4898
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user