Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certora #11

Open
wants to merge 123 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
123 commits
Select commit Hold shift + click to select a range
1997ee9
forge install: ccip
CheyenneAtapour Jul 8, 2024
de4d2f5
feat: add ability to change bridge limit
CheyenneAtapour Jul 8, 2024
d2f41fa
feat: add change rate limit
CheyenneAtapour Jul 8, 2024
1bc20cd
feat: add arb gho steward
CheyenneAtapour Jul 9, 2024
612ebe4
test: deploy gho pool in base test
CheyenneAtapour Jul 9, 2024
eb204c4
test: update bridge limit
CheyenneAtapour Jul 10, 2024
554ded7
test: update token pool rate limit
CheyenneAtapour Jul 10, 2024
703c063
test: arb gho steward tests wout rate limit
CheyenneAtapour Jul 11, 2024
2b87923
test: rate limit test
CheyenneAtapour Jul 11, 2024
cd06a01
feat: remove ccip dependencies
CheyenneAtapour Jul 18, 2024
d358066
feat: consolidate dependencies to 1 file
CheyenneAtapour Jul 20, 2024
b2d1c93
fix: rename dependency folder
CheyenneAtapour Jul 22, 2024
242aa04
fix: remove unnecessary code
CheyenneAtapour Jul 22, 2024
01acca6
feat: remove struct input for rate limit
CheyenneAtapour Jul 23, 2024
7312cf3
test: add more rate limit tests
CheyenneAtapour Jul 23, 2024
ff72dbf
test: use new remote pool
CheyenneAtapour Jul 23, 2024
0e1b728
feat: initial upload seperated interfaces
CheyenneAtapour Jul 23, 2024
677363a
feat: implement ccip steward
CheyenneAtapour Jul 24, 2024
56cf9d6
feat: implement gsm steward
CheyenneAtapour Jul 24, 2024
01e16d4
feat: implement gho aave steward
CheyenneAtapour Jul 24, 2024
fdf6c2b
fix: add get set facilitators
CheyenneAtapour Jul 24, 2024
c5298a1
chore: prettier
CheyenneAtapour Jul 24, 2024
ab18643
test: deploy new stewards
CheyenneAtapour Jul 25, 2024
e057ad9
test: eth ccip steward
CheyenneAtapour Jul 25, 2024
20ba63f
test: gho aave steward constructor
CheyenneAtapour Jul 25, 2024
c850a0d
test: gho aave steward
CheyenneAtapour Jul 25, 2024
091ce89
test: gho gsm steward
CheyenneAtapour Jul 25, 2024
f5edd0c
test: ccip steward arb
CheyenneAtapour Jul 25, 2024
e0a9b16
test: gho aave steward arb
CheyenneAtapour Jul 25, 2024
1194aa3
fix: remove old stewards
CheyenneAtapour Jul 25, 2024
97ce269
test: bucket capacity manager eth
CheyenneAtapour Jul 25, 2024
9d83320
test: bucket capacity manager arbitrum
CheyenneAtapour Jul 25, 2024
db4aa51
fix: remove gho borrow rate change
CheyenneAtapour Jul 26, 2024
8dd4da7
chore: remove ccip empty dir
CheyenneAtapour Jul 26, 2024
835e347
fix: put inherited interfaces at end per convention
CheyenneAtapour Jul 26, 2024
010ca6f
fix: risk council
CheyenneAtapour Jul 26, 2024
a5652ec
fix: document required roles
CheyenneAtapour Jul 26, 2024
05d78dd
fix: clarify required roles
CheyenneAtapour Jul 26, 2024
861adb5
chore: remove unnecessary comment
CheyenneAtapour Jul 29, 2024
489b7b7
fix: bridge limit flag for ccip steward
CheyenneAtapour Jul 30, 2024
b0d60a9
fix: rename bucket capacity manager
CheyenneAtapour Jul 30, 2024
e1285bf
fix: reorder functions per style guidelines
CheyenneAtapour Jul 30, 2024
eefe810
fix: remove ownable where not required
CheyenneAtapour Jul 30, 2024
279886b
fix: remove unused imports
CheyenneAtapour Jul 30, 2024
236e093
feat: add update gho supply cap
CheyenneAtapour Jul 30, 2024
c2a8c14
test: fuzz rate limit update
CheyenneAtapour Jul 30, 2024
0e01972
fix: grant roles in steward setup
CheyenneAtapour Jul 30, 2024
70ae6fc
fix: enforce bridge limit update conditions
CheyenneAtapour Jul 31, 2024
4c38368
fix: enforce rate limit update conditions
CheyenneAtapour Jul 31, 2024
dd539c4
test: add change ownership test
CheyenneAtapour Jul 31, 2024
135fce9
fix: replace functions with constants
CheyenneAtapour Jul 31, 2024
9359796
fix: change dependency structure
CheyenneAtapour Aug 1, 2024
25edbf7
feat: implement gsm fee strategy factory
CheyenneAtapour Aug 2, 2024
de43b37
fix: reorg files
CheyenneAtapour Aug 2, 2024
1762d1f
feat: add borrow rate update
CheyenneAtapour Aug 3, 2024
2015f8c
fix: use bps instead of ray
CheyenneAtapour Aug 6, 2024
df771f1
test: add back borrow rate tests
CheyenneAtapour Aug 6, 2024
158e021
feat: add all 4 params for borrow rate update
CheyenneAtapour Aug 6, 2024
d53d8e7
fix: rename fixed fee strategy factory
CheyenneAtapour Aug 6, 2024
fe8b115
fix: rename to getStrategyByFees
CheyenneAtapour Aug 6, 2024
7daef90
fix: minor fixes
CheyenneAtapour Aug 6, 2024
a6a6832
fix: remove unnecessary checks
CheyenneAtapour Aug 6, 2024
7e35891
fix: remove unnecessary getter
CheyenneAtapour Aug 6, 2024
5d6c8b8
feat: add timelocks to all steward functions
CheyenneAtapour Aug 7, 2024
586c327
fix: reorder functions
CheyenneAtapour Aug 7, 2024
5cefb60
fix: use internal constant for max borrow rate
CheyenneAtapour Aug 7, 2024
597855b
fix: remove comments
CheyenneAtapour Aug 7, 2024
335fbd1
fix: change from ray to bps
CheyenneAtapour Aug 7, 2024
f8ecd17
fix: name fixedFeeStrategyFactory
CheyenneAtapour Aug 7, 2024
9fb1e29
fix: comments
CheyenneAtapour Aug 7, 2024
3ad1f7e
fix: add docs
CheyenneAtapour Aug 7, 2024
66c7510
fix: remove unused strategy factory
CheyenneAtapour Aug 7, 2024
c8de856
fix: docs
CheyenneAtapour Aug 7, 2024
9e20b2a
test: bridge limit disabled
CheyenneAtapour Aug 7, 2024
d538a77
fix: comments and imports
CheyenneAtapour Aug 7, 2024
a03081b
fix: comments
CheyenneAtapour Aug 7, 2024
64f1ae8
fix: local variable for clarity
CheyenneAtapour Aug 7, 2024
bfe7393
test: revert case for ownership
CheyenneAtapour Aug 7, 2024
3617fd8
test: bucket capacity decrease
CheyenneAtapour Aug 7, 2024
b34db2f
fix: remove unneeded code
CheyenneAtapour Aug 7, 2024
577f656
feat: use pool configurator instead of engine
CheyenneAtapour Aug 8, 2024
561dbbe
fix: remove config engine
CheyenneAtapour Aug 8, 2024
207342d
feat: cut down dependencies
CheyenneAtapour Aug 8, 2024
bd71cd8
feat: put pool into separate file
CheyenneAtapour Aug 8, 2024
0302cdf
feat: cut unnecessary code from ccip pools
CheyenneAtapour Aug 8, 2024
2971b41
fix: put ccip pools in mock folder
CheyenneAtapour Aug 8, 2024
cf1b3d1
fix: move ccip pools to deps
CheyenneAtapour Aug 8, 2024
8b8c5e9
fix: added dev comment link to original
CheyenneAtapour Aug 8, 2024
77b4d54
fix: rename gho bucket steward
CheyenneAtapour Aug 8, 2024
879f742
fix: misc
CheyenneAtapour Aug 8, 2024
29ed300
fix: typo
CheyenneAtapour Aug 8, 2024
3b1123c
fix: do not deploy new borrow rate strategy
CheyenneAtapour Aug 8, 2024
24a6ba9
feat: remove ccip dependency
CheyenneAtapour Aug 9, 2024
81a0ed1
fix: add reduced interface
CheyenneAtapour Aug 9, 2024
1ded1e4
fix: remove unused events
CheyenneAtapour Aug 9, 2024
ab80340
fix: add missing docs
CheyenneAtapour Aug 9, 2024
3a1aadc
fix: function ordering
CheyenneAtapour Aug 9, 2024
2575898
fix: remove unused functions
CheyenneAtapour Aug 9, 2024
9eb0922
fix: remove unused functions
CheyenneAtapour Aug 9, 2024
4d3f137
fix: remove unused events
CheyenneAtapour Aug 9, 2024
957c84f
fix: comment to reflect new name
CheyenneAtapour Aug 9, 2024
1096260
fix: remove unused constant
CheyenneAtapour Aug 18, 2024
d92d7cc
fix: disallow updates with no changed values
CheyenneAtapour Aug 18, 2024
d1fcac2
test: no update checks
CheyenneAtapour Aug 19, 2024
255ddfa
fix: change risk config to borrow config, remove delay
CheyenneAtapour Aug 19, 2024
90770bd
feat: only owner can set borrow rate config
CheyenneAtapour Aug 19, 2024
5115df8
fix: remove check interest rate not set
CheyenneAtapour Aug 19, 2024
ef472d6
fix: update gsm fees works without set strategy
CheyenneAtapour Aug 20, 2024
b050051
test: add 2 of 3 remaining config tests
CheyenneAtapour Aug 20, 2024
2f4eeb7
test: variable rate slope 2 tests
CheyenneAtapour Aug 20, 2024
a229cc1
fix: address pr comments
CheyenneAtapour Aug 21, 2024
7440451
fix: requested changes
CheyenneAtapour Aug 21, 2024
0a09941
fix: requested changes
CheyenneAtapour Aug 22, 2024
a41f8a2
fix: clearer comments and tests
CheyenneAtapour Aug 23, 2024
fe72684
Fix CI (#422)
CheyenneAtapour Sep 4, 2024
4e645f6
test: add fork tests (#416)
CheyenneAtapour Sep 12, 2024
81265c1
fix: Change minimum delay to 1 day
CheyenneAtapour Sep 12, 2024
703087b
fix: Change borrow rate config to 5%
CheyenneAtapour Sep 12, 2024
945fcf8
fix: Change eth fork tests config to 5%
CheyenneAtapour Sep 13, 2024
c8b9c61
fix: Use 5% for config on arbitrum fork tests
CheyenneAtapour Sep 13, 2024
c9d5f9b
fix: Fix solc warnings
miguelmtzinf Sep 13, 2024
c82c63b
fix: add cleanups
miguelmtzinf Sep 13, 2024
c24441d
Certora Review of Modular Gho Steward
MichaelMorami Sep 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: change risk config to borrow config, remove delay
CheyenneAtapour committed Aug 19, 2024
commit 255ddfa6df1fa00780f491b58c285bac0a4f6ddf
41 changes: 27 additions & 14 deletions src/contracts/misc/GhoAaveSteward.sol
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ contract GhoAaveSteward is RiskCouncilControlled, IGhoAaveSteward {
/// @inheritdoc IGhoAaveSteward
address public immutable GHO_TOKEN;

Config internal _riskConfig;
BorrowRateConfig internal _borrowRateConfig;

GhoDebounce internal _ghoTimelocks;

@@ -59,14 +59,14 @@ contract GhoAaveSteward is RiskCouncilControlled, IGhoAaveSteward {
* @param poolDataProvider The pool data provider of the pool to be controlled by the steward
* @param ghoToken The address of the GhoToken
* @param riskCouncil The address of the risk council
* @param riskConfig The initial risk configuration for the Gho reserve
* @param borrowRateConfig The initial borrow rate configuration for the Gho reserve
*/
constructor(
address addressesProvider,
address poolDataProvider,
address ghoToken,
address riskCouncil,
Config memory riskConfig
BorrowRateConfig memory borrowRateConfig
) RiskCouncilControlled(riskCouncil) {
require(addressesProvider != address(0), 'INVALID_ADDRESSES_PROVIDER');
require(poolDataProvider != address(0), 'INVALID_DATA_PROVIDER');
@@ -75,7 +75,7 @@ contract GhoAaveSteward is RiskCouncilControlled, IGhoAaveSteward {
POOL_ADDRESSES_PROVIDER = addressesProvider;
POOL_DATA_PROVIDER = poolDataProvider;
GHO_TOKEN = ghoToken;
_riskConfig = riskConfig;
_borrowRateConfig = borrowRateConfig;
}

/// @inheritdoc IGhoAaveSteward
@@ -137,17 +137,30 @@ contract GhoAaveSteward is RiskCouncilControlled, IGhoAaveSteward {
}

/// @inheritdoc IGhoAaveSteward
function setRiskConfig(
Config calldata riskConfig
function setBorrowRateConfig(
uint256 optimalUsageRatioMaxChange,
uint256 baseVariableBorrowRateMaxChange,
uint256 variableRateSlope1MaxChange,
uint256 variableRateSlope2MaxChange
) external onlyRiskCouncil notTimelocked(_ghoTimelocks.riskConfigLastUpdate) {
_riskConfig = riskConfig;
_borrowRateConfig.optimalUsageRatioMaxChange = optimalUsageRatioMaxChange;
_borrowRateConfig.baseVariableBorrowRateMaxChange = baseVariableBorrowRateMaxChange;
_borrowRateConfig.variableRateSlope1MaxChange = variableRateSlope1MaxChange;
_borrowRateConfig.variableRateSlope2MaxChange = variableRateSlope2MaxChange;

_ghoTimelocks.riskConfigLastUpdate = uint40(block.timestamp);
emit RiskConfigSet(riskConfig);

emit BorrowRateConfigSet(
optimalUsageRatioMaxChange,
baseVariableBorrowRateMaxChange,
variableRateSlope1MaxChange,
variableRateSlope2MaxChange
);
}

/// @inheritdoc IGhoAaveSteward
function getRiskConfig() external view returns (Config memory) {
return _riskConfig;
function getBorrowRateConfig() external view returns (BorrowRateConfig memory) {
return _borrowRateConfig;
}

/// @inheritdoc IGhoAaveSteward
@@ -225,7 +238,7 @@ contract GhoAaveSteward is RiskCouncilControlled, IGhoAaveSteward {
_updateWithinAllowedRange(
currentOptimalUsageRatio,
optimalUsageRatio,
_riskConfig.optimalUsageRatio.maxPercentChange,
_borrowRateConfig.optimalUsageRatioMaxChange,
false
),
'INVALID_OPTIMAL_USAGE_RATIO'
@@ -234,7 +247,7 @@ contract GhoAaveSteward is RiskCouncilControlled, IGhoAaveSteward {
_updateWithinAllowedRange(
currentBaseVariableBorrowRate,
baseVariableBorrowRate,
_riskConfig.baseVariableBorrowRate.maxPercentChange,
_borrowRateConfig.baseVariableBorrowRateMaxChange,
false
),
'INVALID_BORROW_RATE_UPDATE'
@@ -243,7 +256,7 @@ contract GhoAaveSteward is RiskCouncilControlled, IGhoAaveSteward {
_updateWithinAllowedRange(
currentVariableRateSlope1,
variableRateSlope1,
_riskConfig.variableRateSlope1.maxPercentChange,
_borrowRateConfig.variableRateSlope1MaxChange,
false
),
'INVALID_VARIABLE_RATE_SLOPE1'
@@ -252,7 +265,7 @@ contract GhoAaveSteward is RiskCouncilControlled, IGhoAaveSteward {
_updateWithinAllowedRange(
currentVariableRateSlope2,
variableRateSlope2,
_riskConfig.variableRateSlope2.maxPercentChange,
_borrowRateConfig.variableRateSlope2MaxChange,
false
),
'INVALID_VARIABLE_RATE_SLOPE2'
56 changes: 32 additions & 24 deletions src/contracts/misc/interfaces/IGhoAaveSteward.sol
Original file line number Diff line number Diff line change
@@ -8,13 +8,21 @@ pragma solidity ^0.8.10;
*/
interface IGhoAaveSteward {
/**
* @notice Emitted when the risk configuration for the risk params has been set
* @param riskConfig struct containing the risk configurations
* @notice Emitted when the borrow rate configuration has been updated
* @param optimalUsageRatioMaxChange The new allowed max percentage change for optimal usage ratio
* @param baseVariableBorrowRateMaxChange The new allowed max percentage change for base variable borrow rate
* @param variableRateSlope1MaxChange The new allowed max percentage change for variable rate slope 1
* @param variableRateSlope2MaxChange The new allowed max percentage change for variable rate slope 2
*/
event RiskConfigSet(Config indexed riskConfig);
event BorrowRateConfigSet(
uint256 optimalUsageRatioMaxChange,
uint256 baseVariableBorrowRateMaxChange,
uint256 variableRateSlope1MaxChange,
uint256 variableRateSlope2MaxChange
);

/**
* @notice Struct storing the last update by the steward of each risk param
* @notice Struct storing the last update by the steward of each borrow rate param
*/
struct GhoDebounce {
uint40 ghoBorrowCapLastUpdate;
@@ -24,21 +32,13 @@ interface IGhoAaveSteward {
}

/**
* @notice Struct storing the minimum delay and maximum percent change for a risk param
* @notice Struct storing the configuration for the borrow rate params
*/
struct RiskParamConfig {
uint40 minDelay;
uint256 maxPercentChange;
}

/**
* @notice Struct storing the risk configuration for all the risk param
*/
struct Config {
RiskParamConfig optimalUsageRatio;
RiskParamConfig baseVariableBorrowRate;
RiskParamConfig variableRateSlope1;
RiskParamConfig variableRateSlope2;
struct BorrowRateConfig {
uint256 optimalUsageRatioMaxChange;
uint256 baseVariableBorrowRateMaxChange;
uint256 variableRateSlope1MaxChange;
uint256 variableRateSlope2MaxChange;
}

/**
@@ -78,16 +78,24 @@ interface IGhoAaveSteward {
function updateGhoSupplyCap(uint256 newSupplyCap) external;

/**
* @notice method called by the Risk Council to set the risk configuration for the risk params
* @param riskConfig struct containing the risk configurations
* @notice method called by the Risk Council to set the borrow rate configuration params
* @param optimalUsageRatioMaxChange The new allowed max percentage change for optimal usage ratio
* @param baseVariableBorrowRateMaxChange The new allowed max percentage change for base variable borrow rate
* @param variableRateSlope1MaxChange The new allowed max percentage change for variable rate slope 1
* @param variableRateSlope2MaxChange The new allowed max percentage change for variable rate slope 2
*/
function setRiskConfig(Config calldata riskConfig) external;
function setBorrowRateConfig(
uint256 optimalUsageRatioMaxChange,
uint256 baseVariableBorrowRateMaxChange,
uint256 variableRateSlope1MaxChange,
uint256 variableRateSlope2MaxChange
) external;

/**
* @notice method to get the risk configuration set for all the risk params
* @return struct containing the risk configurations
* @notice method to get the borrow rate configuration
* @return struct containing the borrow rate configuration
*/
function getRiskConfig() external view returns (Config memory);
function getBorrowRateConfig() external view returns (BorrowRateConfig memory);

/**
* @notice Returns timestamp of the last update of GHO parameters
90 changes: 61 additions & 29 deletions src/test/TestGhoAaveSteward.t.sol
Original file line number Diff line number Diff line change
@@ -10,8 +10,13 @@ import {DefaultReserveInterestRateStrategyV2} from '../contracts/misc/deps/Depen
contract TestGhoAaveSteward is TestGhoBase {
using ReserveConfiguration for DataTypes.ReserveConfigurationMap;

IGhoAaveSteward.RiskParamConfig public defaultRiskParamConfig;
IGhoAaveSteward.Config public riskConfig;
IGhoAaveSteward.BorrowRateConfig public defaultBorrowRateConfig =
IGhoAaveSteward.BorrowRateConfig({
optimalUsageRatioMaxChange: 10_00,
baseVariableBorrowRateMaxChange: 5_00,
variableRateSlope1MaxChange: 10_00,
variableRateSlope2MaxChange: 10_00
});
IDefaultInterestRateStrategyV2.InterestRateData public defaultRateParams =
IDefaultInterestRateStrategyV2.InterestRateData({
optimalUsageRatio: 1_00,
@@ -21,29 +26,13 @@ contract TestGhoAaveSteward is TestGhoBase {
});

function setUp() public {
defaultRiskParamConfig = IGhoAaveSteward.RiskParamConfig({
minDelay: 2 days,
maxPercentChange: 10_00 // 10%
});
IGhoAaveSteward.RiskParamConfig memory borrowRateConfig = IGhoAaveSteward.RiskParamConfig({
minDelay: 2 days,
maxPercentChange: 5_00 // 5%
});

riskConfig = IGhoAaveSteward.Config({
optimalUsageRatio: defaultRiskParamConfig,
baseVariableBorrowRate: borrowRateConfig,
variableRateSlope1: defaultRiskParamConfig,
variableRateSlope2: defaultRiskParamConfig
});

// Deploy Gho Aave Steward
GHO_AAVE_STEWARD = new GhoAaveSteward(
address(PROVIDER),
address(MOCK_POOL_DATA_PROVIDER),
address(GHO_TOKEN),
RISK_COUNCIL,
riskConfig
defaultBorrowRateConfig
);

// Set a new strategy because the default is old strategy type
@@ -74,22 +63,46 @@ contract TestGhoAaveSteward is TestGhoBase {

function testRevertConstructorInvalidAddressesProvider() public {
vm.expectRevert('INVALID_ADDRESSES_PROVIDER');
new GhoAaveSteward(address(0), address(0x002), address(0x003), address(0x004), riskConfig);
new GhoAaveSteward(
address(0),
address(0x002),
address(0x003),
address(0x004),
defaultBorrowRateConfig
);
}

function testRevertConstructorInvalidDataProvider() public {
vm.expectRevert('INVALID_DATA_PROVIDER');
new GhoAaveSteward(address(0x001), address(0), address(0x003), address(0x004), riskConfig);
new GhoAaveSteward(
address(0x001),
address(0),
address(0x003),
address(0x004),
defaultBorrowRateConfig
);
}

function testRevertConstructorInvalidGhoToken() public {
vm.expectRevert('INVALID_GHO_TOKEN');
new GhoAaveSteward(address(0x001), address(0x002), address(0), address(0x004), riskConfig);
new GhoAaveSteward(
address(0x001),
address(0x002),
address(0),
address(0x004),
defaultBorrowRateConfig
);
}

function testRevertConstructorInvalidRiskCouncil() public {
vm.expectRevert('INVALID_RISK_COUNCIL');
new GhoAaveSteward(address(0x001), address(0x002), address(0x003), address(0), riskConfig);
new GhoAaveSteward(
address(0x001),
address(0x002),
address(0x003),
address(0),
defaultBorrowRateConfig
);
}

function testUpdateGhoBorrowCap() public {
@@ -518,19 +531,38 @@ contract TestGhoAaveSteward is TestGhoBase {
}

function testSetRiskConfig() public {
riskConfig.optimalUsageRatio.minDelay += 1;
defaultBorrowRateConfig.optimalUsageRatioMaxChange += 1;
vm.prank(RISK_COUNCIL);
GHO_AAVE_STEWARD.setRiskConfig(riskConfig);
IGhoAaveSteward.Config memory currentRiskConfig = GHO_AAVE_STEWARD.getRiskConfig();
assertEq(currentRiskConfig.optimalUsageRatio.minDelay, riskConfig.optimalUsageRatio.minDelay);
GHO_AAVE_STEWARD.setBorrowRateConfig(
defaultBorrowRateConfig.optimalUsageRatioMaxChange,
defaultBorrowRateConfig.baseVariableBorrowRateMaxChange,
defaultBorrowRateConfig.variableRateSlope1MaxChange,
defaultBorrowRateConfig.variableRateSlope2MaxChange
);
IGhoAaveSteward.BorrowRateConfig memory currentBorrowRateConfig = GHO_AAVE_STEWARD
.getBorrowRateConfig();
assertEq(
currentBorrowRateConfig.optimalUsageRatioMaxChange,
defaultBorrowRateConfig.optimalUsageRatioMaxChange
);
}

function testSetRiskConfigIfUpdatedTooSoon() public {
vm.prank(RISK_COUNCIL);
GHO_AAVE_STEWARD.setRiskConfig(riskConfig);
GHO_AAVE_STEWARD.setBorrowRateConfig(
defaultBorrowRateConfig.optimalUsageRatioMaxChange,
defaultBorrowRateConfig.baseVariableBorrowRateMaxChange,
defaultBorrowRateConfig.variableRateSlope1MaxChange,
defaultBorrowRateConfig.variableRateSlope2MaxChange
);
vm.expectRevert('DEBOUNCE_NOT_RESPECTED');
vm.prank(RISK_COUNCIL);
GHO_AAVE_STEWARD.setRiskConfig(riskConfig);
GHO_AAVE_STEWARD.setBorrowRateConfig(
defaultBorrowRateConfig.optimalUsageRatioMaxChange,
defaultBorrowRateConfig.baseVariableBorrowRateMaxChange,
defaultBorrowRateConfig.variableRateSlope1MaxChange,
defaultBorrowRateConfig.variableRateSlope2MaxChange
);
}

function _setGhoBorrowCapViaConfigurator(uint256 newBorrowCap) internal {