M - wrong function name used in _setEModeCategory in AaveV3LeverageStrategyExtension.sol
Summary
Wrong implementation in function _setEModeCategory in AaveV3LeverageStrategyExtension.sol.
Vulnerability Detail
The function _setEModeCategory in AaveV3LeverageStrategyExtension.sol is implemented wrongly. According to the parameters supplied, it is supposed to call setAssetEModeCategory instead of setEModeCategory. As a result, function cannot be called properly.
Impact
Wrong function name is used. As a result, the function cannot be called properly.
Code Snippet
function _setEModeCategory(uint8 _categoryId) internal {
bytes memory setEmodeCallData =
abi.encodeWithSignature("setEModeCategory(address,uint8)", address(strategy.setToken), _categoryId); //@audit-issue Should be setAssetEModeCategory
invokeManager(address(strategy.leverageModule), setEmodeCallData);
}
erictee
medium
M - wrong function name used in _setEModeCategory in AaveV3LeverageStrategyExtension.sol
Summary
Wrong implementation in function
_setEModeCategory
inAaveV3LeverageStrategyExtension.sol
.Vulnerability Detail
The function
_setEModeCategory
inAaveV3LeverageStrategyExtension.sol
is implemented wrongly. According to the parameters supplied, it is supposed to callsetAssetEModeCategory
instead ofsetEModeCategory
. As a result, function cannot be called properly.Impact
Wrong function name is used. As a result, the function cannot be called properly.
Code Snippet
https://github.com/sherlock-audit/2023-05-Index/blob/main/index-coop-smart-contracts/contracts/adapters/AaveV3LeverageStrategyExtension.sol#L66
Tool used
Manual Review
Recommendation
Use
setAssetEModeCategory
instead ofsetEModeCategory
.More Details: https://docs.aave.com/developers/core-contracts/poolconfigurator