mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
55 lines
1.9 KiB
Solidity
55 lines
1.9 KiB
Solidity
// SPDX-License-Identifier: agpl-3.0
|
|
pragma solidity ^0.6.8;
|
|
|
|
|
|
import "../libraries/openzeppelin-upgradeability/VersionedInitializable.sol";
|
|
import "./UintStorage.sol";
|
|
|
|
/**
|
|
* @title LendingPoolParametersProvider
|
|
* @author Aave
|
|
* @notice stores the configuration parameters of the Lending Pool contract
|
|
**/
|
|
|
|
contract LendingPoolParametersProvider is VersionedInitializable {
|
|
|
|
uint256 private constant MAX_STABLE_RATE_BORROW_SIZE_PERCENT = 25;
|
|
uint256 private constant REBALANCE_DOWN_RATE_DELTA = (1e27)/5;
|
|
uint256 private constant FLASHLOAN_FEE_TOTAL = 9;
|
|
uint256 private constant FLASHLOAN_FEE_PROTOCOL = 3000;
|
|
|
|
uint256 constant private DATA_PROVIDER_REVISION = 0x2;
|
|
|
|
function getRevision() internal override pure returns(uint256) {
|
|
return DATA_PROVIDER_REVISION;
|
|
}
|
|
|
|
/**
|
|
* @dev initializes the LendingPoolParametersProvider after it's added to the proxy
|
|
* @param _addressesProvider the address of the LendingPoolAddressesProvider
|
|
*/
|
|
function initialize(address _addressesProvider) public initializer {
|
|
}
|
|
/**
|
|
* @dev returns the maximum stable rate borrow size, in percentage of the available liquidity.
|
|
**/
|
|
function getMaxStableRateBorrowSizePercent() external pure returns (uint256) {
|
|
return MAX_STABLE_RATE_BORROW_SIZE_PERCENT;
|
|
}
|
|
|
|
/**
|
|
* @dev returns the delta between the current stable rate and the user stable rate at
|
|
* which the borrow position of the user will be rebalanced (scaled down)
|
|
**/
|
|
function getRebalanceDownRateDelta() external pure returns (uint256) {
|
|
return REBALANCE_DOWN_RATE_DELTA;
|
|
}
|
|
|
|
/**
|
|
* @dev returns the fee applied to a flashloan and the portion to redirect to the protocol, in basis points.
|
|
**/
|
|
function getFlashLoanFeesInBips() external pure returns (uint256, uint256) {
|
|
return (FLASHLOAN_FEE_TOTAL, FLASHLOAN_FEE_PROTOCOL);
|
|
}
|
|
}
|