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

docs: add note about ir & deprecation of getReserveDataExtended #34

Merged
merged 3 commits into from
Sep 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
19 changes: 16 additions & 3 deletions changelog/3.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.

Expand Down Expand Up @@ -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:
Expand All @@ -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.
1 change: 1 addition & 0 deletions src/contracts/interfaces/IPool.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Loading