mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
feat: added exposure cap == 0 means no exposure cap
This commit is contained in:
parent
129a96a3cf
commit
485a41a0ef
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue
Block a user