diff --git a/changelog/3.2.md b/changelog/3.2.md index fe50aea5..0b1e37d0 100644 --- a/changelog/3.2.md +++ b/changelog/3.2.md @@ -11,10 +11,19 @@ While previous upgrades allowed graceful offboarding of stable borrowing, now wi ### Migration guide -The upgrade is 100% backwards compatible. +The upgrade is 100% backwards compatible for anyone only integrating on the pool level. There are no changes to any methods, nor are there changes to emitted events. Parameters emitted in events that relate to stable rate are nulled. +For anyone directly integrating with the InterestRateStrategy the method `calculateInterestRates` will no longer return the stable rate. + +``` +function calculateInterestRates( + DataTypes.CalculateInterestRatesParams memory params +- ) external view returns (uint256, uint256, uint256); ++ ) external view returns (uint256, uint256); +``` + ## Emodes: Removal of the eMode oracle The eMode oracle has never been used and it's usefulnes is debatable. @@ -51,7 +60,6 @@ For example, in a hypothetic eMode with only wstETH and WETH, the normal configu ### BREAKING CHANGES - DataTypes.EModeCategory will return the same data as now, but is flagged deprecated and will be removed at a later point. - - the new version of `PoolDataProvider` no longer exposes `PoolDataProvider.getReserveEModeCategory(address asset)` as there no longer is a `1:1` relation between assets and eModes. - `reserveConfig.getEModeCategory()` will return the current eMode, but will no longer be updated and is flagged deprecated. @@ -80,7 +88,7 @@ Therefore in addition to the **deprecated** `getEModeCategoryData` getter there #### Identifying eModes for an asset -In the previous version of the eModes feature it was possible to query a reserve configration to receive it's unique eMode. +In the previous version of the eModes feature it was possible to query a reserve configuration to receive its unique eMode. The relevant bits on the reseve configuration have been nullified. To identify eModes of a selected asset, there is currently multiple options: @@ -100,3 +108,8 @@ for (uint8 i = 1; i < 256; i++) { ``` - an offchain system could listen to `AssetCollateralInEModeChanged` & `AssetBorrowableInEModeChanged` events and feed the onchain contract with an appropriate categoryId + +### Deprecations + +- `getEModeCategoryData` was deprecated and might be removed in a future version. Use `getEModeCategoryCollateralConfig`, `getEModeCategoryLabel`, `getEModeCategoryCollateralBitmap` & `getEModeCategoryBorrowableBitmap` instead. +- `getReserveDataExtended` was deprecated and might be removed in a future version. Use `getReserveData` & `getLiquidationGracePeriod` instead. diff --git a/src/contracts/interfaces/IPool.sol b/src/contracts/interfaces/IPool.sol index 01e1bcaf..4ed19d05 100644 --- a/src/contracts/interfaces/IPool.sol +++ b/src/contracts/interfaces/IPool.sol @@ -561,6 +561,7 @@ interface IPool { /** * @notice Returns the state and configuration of the reserve, including extra data included with Aave v3.1 + * @dev DEPRECATED use independent getters instead (getReserveData, getLiquidationGracePeriod) * @param asset The address of the underlying asset of the reserve * @return The state and configuration data of the reserve with virtual accounting */ diff --git a/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol b/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol index 43987f47..2008acb6 100644 --- a/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol +++ b/src/contracts/protocol/libraries/configuration/ReserveConfiguration.sol @@ -17,6 +17,7 @@ library ReserveConfiguration { uint256 internal constant ACTIVE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFF; // prettier-ignore uint256 internal constant FROZEN_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFF; // prettier-ignore uint256 internal constant BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFF; // prettier-ignore + // @notice there is an unoccupied hole of 1 bit at position 59 from pre 3.2 stableBorrowRateEnabled uint256 internal constant PAUSED_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFF; // prettier-ignore uint256 internal constant BORROWABLE_IN_ISOLATION_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFDFFFFFFFFFFFFFFF; // prettier-ignore uint256 internal constant SILOED_BORROWING_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBFFFFFFFFFFFFFFF; // prettier-ignore @@ -25,7 +26,7 @@ library ReserveConfiguration { uint256 internal constant BORROW_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFF; // prettier-ignore uint256 internal constant SUPPLY_CAP_MASK = 0xFFFFFFFFFFFFFFFFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore uint256 internal constant LIQUIDATION_PROTOCOL_FEE_MASK = 0xFFFFFFFFFFFFFFFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore - //@notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory + // @notice there is an unoccupied hole of 8 bits from 168 to 176 left from pre 3.2 eModeCategory uint256 internal constant UNBACKED_MINT_CAP_MASK = 0xFFFFFFFFFFF000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore uint256 internal constant DEBT_CEILING_MASK = 0xF0000000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore uint256 internal constant VIRTUAL_ACC_ACTIVE_MASK = 0xEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF; // prettier-ignore