-
Notifications
You must be signed in to change notification settings - Fork 82
/
IGhoSteward.sol
99 lines (85 loc) · 3.53 KB
/
IGhoSteward.sol
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;
/**
* @title IGhoSteward
* @author Aave
* @notice Defines the basic interface of the GhoSteward
*/
interface IGhoSteward {
struct Debounce {
uint40 borrowRateLastUpdated;
uint40 bucketCapacityLastUpdated;
}
/**
* @dev Emitted when the steward expiration is updated
* @param oldStewardExpiration The old expiration unix time of the steward (in seconds)
* @param oldStewardExpiration The new expiration unix time of the steward (in seconds)
*/
event StewardExpirationUpdated(uint40 oldStewardExpiration, uint40 newStewardExpiration);
/**
* @notice Returns the minimum delay that must be respected between updating a specific parameter twice
* @return The minimum delay between parameter updates (in seconds)
*/
function MINIMUM_DELAY() external view returns (uint256);
/**
* @notice Returns the maximum percentage change for borrow rate updates. The new borrow rate can only differ up to this percentage.
* @return The maximum percentage change for borrow rate updates (e.g. 0.01e4 is 100, which results in 1.0%)
*/
function BORROW_RATE_CHANGE_MAX() external view returns (uint256);
/**
* @notice Returns the lifespan of the steward
* @return The lifespan of the steward (in seconds)
*/
function STEWARD_LIFESPAN() external view returns (uint40);
/**
* @notice Returns the address of the Pool Addresses Provider of the Aave V3 Ethereum Facilitator
* @return The address of the PoolAddressesProvider of Aave V3 Ethereum Facilitator
*/
function POOL_ADDRESSES_PROVIDER() external view returns (address);
/**
* @notice Returns the address of the Gho Token
* @return The address of the GhoToken
*/
function GHO_TOKEN() external view returns (address);
/**
* @notice Returns the address of the Risk Council
* @return The address of the RiskCouncil
*/
function RISK_COUNCIL() external view returns (address);
/**
* @notice Updates the borrow rate of GHO, only if:
* - respects the debounce duration (5 day pause between updates must be respected)
* - the update changes up to 0.50% upwards or downwards
* @dev Only callable by Risk Council
* @param newBorrowRate The new variable borrow rate (expressed in ray) (e.g. 0.0150e27 results in 1.50%)
*/
function updateBorrowRate(uint256 newBorrowRate) external;
/**
* @notice Updates the Bucket Capacity of the Aave V3 Ethereum Pool Facilitator, only if:
* - respects the debounce duration (5 day pause between updates must be respected)
* - the update changes up to 100% upwards
* @dev Only callable by Risk Council
* @param newBucketCapacity The new bucket capacity of the facilitator
*/
function updateBucketCapacity(uint128 newBucketCapacity) external;
/**
* @notice Extends the steward expiration date by `STEWARD_LIFESPAN`
* @dev Only callable by Aave Short Executor
*/
function extendStewardExpiration() external;
/**
* @notice Returns the timelock values for all parameters updates
* @return The Debounce struct with parameters' timelock
*/
function getTimelock() external view returns (Debounce memory);
/**
* @notice Returns the expiration time of the steward
* @return The expiration unix time of the steward (in seconds)
*/
function getStewardExpiration() external view returns (uint40);
/**
* @notice Returns the list of Interest Rate Strategies for GHO
* @return An array of GhoInterestRateStrategy addresses
*/
function getAllStrategies() external view returns (address[] memory);
}