mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Updated liquidation
This commit is contained in:
parent
6b2764f760
commit
395e4aa3a7
|
@ -214,6 +214,13 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO Burn debt tokens
|
//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);
|
vars.collateralAtoken = AToken(collateralReserve.aTokenAddress);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user