diff --git a/contracts/misc/AaveProtocolDataProvider.sol b/contracts/misc/AaveProtocolDataProvider.sol index 4c4f30f08..9c0e34664 100644 --- a/contracts/misc/AaveProtocolDataProvider.sol +++ b/contracts/misc/AaveProtocolDataProvider.sol @@ -111,7 +111,7 @@ contract AaveProtocolDataProvider { DataTypes.ReserveConfigurationMap memory configuration = IPool(ADDRESSES_PROVIDER.getPool()) .getConfiguration(asset); - (ltv, liquidationThreshold, liquidationBonus, decimals, reserveFactor,) = configuration + (ltv, liquidationThreshold, liquidationBonus, decimals, reserveFactor, ) = configuration .getParams(); (isActive, isFrozen, borrowingEnabled, stableBorrowRateEnabled, ) = configuration.getFlags(); @@ -119,6 +119,17 @@ contract AaveProtocolDataProvider { usageAsCollateralEnabled = liquidationThreshold > 0; } + /** + * Returns the efficiency mode category of the reserve + * @param asset The address of the underlying asset of the reserve + * @return eModeCategory The eMode id of the reserve + */ + function getReserveEModeCategory(address asset) external view returns (uint256) { + DataTypes.ReserveConfigurationMap memory configuration = IPool(ADDRESSES_PROVIDER.getPool()) + .getConfiguration(asset); + return configuration.getEModeCategory(); + } + /** * @notice Returns the caps paramters of the reserve * @param asset The address of the underlying asset of the reserve