-
Notifications
You must be signed in to change notification settings - Fork 40
Expand file tree
/
Copy pathIAaveV2ConfigEngine.sol
More file actions
52 lines (46 loc) · 1.8 KB
/
IAaveV2ConfigEngine.sol
File metadata and controls
52 lines (46 loc) · 1.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import {ILendingPoolConfigurator} from 'aave-address-book/AaveV2.sol';
import {IV2RateStrategyFactory} from './IV2RateStrategyFactory.sol';
/// @dev Examples here assume the usage of the `AaveV2Payload` base contracts
/// contained in this same repository
interface IAaveV2ConfigEngine {
/**
* @dev Example (mock):
* PoolContext({
* networkName: 'Polygon',
* networkAbbreviation: 'Pol'
* })
*/
struct PoolContext {
string networkName;
string networkAbbreviation;
}
/**
* @dev Example (mock):
* RateStrategyUpdate({
* asset: AaveV2EthereumAssets.AAVE_UNDERLYING,
* params: IV2RateStrategyFactory.RateStrategyParams({
* optimalUtilizationRate: _bpsToRay(80_00),
* baseVariableBorrowRate: EngineFlags.KEEP_CURRENT,
* variableRateSlope1: EngineFlags.KEEP_CURRENT,
* variableRateSlope2: _bpsToRay(75_00),
* stableRateSlope1: EngineFlags.KEEP_CURRENT,
* stableRateSlope2: _bpsToRay(75_00),
* })
* })
*/
struct RateStrategyUpdate {
address asset;
IV2RateStrategyFactory.RateStrategyParams params;
}
/**
* @notice Performs an update on the rate strategy params of the assets, in the Aave pool configured in this engine instance
* @dev The engine itself manages if a new rate strategy needs to be deployed or if an existing one can be re-used
* @param updates `RateStrategyUpdate[]` list of declarative updates containing the new rate strategy params
* More information on the documentation of the struct.
*/
function updateRateStrategies(RateStrategyUpdate[] memory updates) external;
function RATE_STRATEGIES_FACTORY() external view returns (IV2RateStrategyFactory);
function POOL_CONFIGURATOR() external view returns (ILendingPoolConfigurator);
}