-
Notifications
You must be signed in to change notification settings - Fork 118
Closed
Description
In GhoAaveSteward, among the checks done in _validateReservesUpdate there are two which might be conflicting to achieve the same result.
The first is maxAllowed change on the individual borrowRateConfigs (optimalUsageRatio, baseVariableBorrowRate, variableRateSlope1, variableRateSlope2) and the maxVariableBorrowRate (baseVariableBorrowRate + variableRateSlope1 + variableRateSlope2).
The former is configurable (with borrowRateConfig) but the latter has a hard cap of 25%
| uint32 public constant GHO_BORROW_RATE_MAX = 0.25e4; // 25.00% |
which does not make sense practically for remote chains (arb currently is at 52.5%) as the value seems too low.
One suggestion is to remove the maxVariableBorrowRate check or make the maxAllowed value configurable which can be adjusted on a market-to-market basis.
gho-core/src/contracts/misc/GhoAaveSteward.sol
Lines 221 to 237 in 3684128
| require( | |
| _updateWithinAllowedRange( | |
| currentRates.variableRateSlope2, | |
| newRates.variableRateSlope2, | |
| _borrowRateConfig.variableRateSlope2MaxChange, | |
| false | |
| ), | |
| 'INVALID_VARIABLE_RATE_SLOPE2' | |
| ); | |
| require( | |
| uint256(newRates.baseVariableBorrowRate) + | |
| uint256(newRates.variableRateSlope1) + | |
| uint256(newRates.variableRateSlope2) <= | |
| GHO_BORROW_RATE_MAX, | |
| 'BORROW_RATE_HIGHER_THAN_MAX' | |
| ); |
Metadata
Metadata
Assignees
Labels
No labels