diff --git a/contracts/lendingpool/LendingPoolLiquidationManager.sol b/contracts/lendingpool/LendingPoolLiquidationManager.sol index 96f32c96..d0468c53 100644 --- a/contracts/lendingpool/LendingPoolLiquidationManager.sol +++ b/contracts/lendingpool/LendingPoolLiquidationManager.sol @@ -214,6 +214,13 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl } //TODO Burn debt tokens + if(vars.userVariableDebt >= vars.actualAmountToLiquidate){ + IVariableDebtToken(principalReserve.variableDebtTokenAddress).burn(_user, vars.actualAmountToLiquidate); + } + else { + IVariableDebtToken(principalReserve.variableDebtTokenAddress).burn(_user, vars.userVariableDebt); + IStableDebtToken(principalReserve.stableDebtTokenAddress).burn(_user, vars.actualAmountToLiquidate.sub(vars.userVariableDebt)); + } vars.collateralAtoken = AToken(collateralReserve.aTokenAddress);