diff --git a/contracts/protocol/libraries/logic/GenericLogic.sol b/contracts/protocol/libraries/logic/GenericLogic.sol index 36d50fa2..8ba155b3 100644 --- a/contracts/protocol/libraries/logic/GenericLogic.sol +++ b/contracts/protocol/libraries/logic/GenericLogic.sol @@ -116,6 +116,7 @@ library GenericLogic { vars.totalCollateralInETH = vars.totalCollateralInETH.add(vars.userBalanceETH); vars.exposureCap = currentReserve.configuration.getExposureCap(); vars.exposureCapped = + vars.exposureCap != 0 && IERC20(currentReserve.aTokenAddress).totalSupply().div(10**vars.decimals) > vars.exposureCap; vars.avgLtv = vars.avgLtv.add(vars.exposureCapped ? 0 : vars.userBalanceETH.mul(vars.ltv));