diff --git a/contracts/lendingpool/LendingPoolLiquidationManager.sol b/contracts/lendingpool/LendingPoolLiquidationManager.sol index 888edb93..247c01e9 100644 --- a/contracts/lendingpool/LendingPoolLiquidationManager.sol +++ b/contracts/lendingpool/LendingPoolLiquidationManager.sol @@ -398,6 +398,10 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl vars.collateralAtoken.burn(user, receiver, vars.maxCollateralToLiquidate); + if (vars.userCollateralBalance == vars.maxCollateralToLiquidate) { + usersConfig[user].setUsingAsCollateral(collateralReserve.index, false); + } + address principalAToken = debtReserve.aTokenAddress; // Notifies the receiver to proceed, sending as param the underlying already transferred