mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Fix order of calculation of the interest rates
This commit is contained in:
parent
ee0bc07238
commit
6ee4b2725b
|
@ -374,6 +374,14 @@ contract LendingPoolCollateralManager is VersionedInitializable, LendingPoolStor
|
||||||
//updating collateral reserve indexes
|
//updating collateral reserve indexes
|
||||||
collateralReserve.updateState();
|
collateralReserve.updateState();
|
||||||
|
|
||||||
|
//updating collateral reserve interest rates
|
||||||
|
collateralReserve.updateInterestRates(
|
||||||
|
collateral,
|
||||||
|
address(vars.collateralAtoken),
|
||||||
|
0,
|
||||||
|
vars.maxCollateralToLiquidate
|
||||||
|
);
|
||||||
|
|
||||||
vars.collateralAtoken.burn(
|
vars.collateralAtoken.burn(
|
||||||
user,
|
user,
|
||||||
receiver,
|
receiver,
|
||||||
|
@ -424,14 +432,6 @@ contract LendingPoolCollateralManager is VersionedInitializable, LendingPoolStor
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
//updating collateral reserve
|
|
||||||
collateralReserve.updateInterestRates(
|
|
||||||
collateral,
|
|
||||||
address(vars.collateralAtoken),
|
|
||||||
0,
|
|
||||||
vars.maxCollateralToLiquidate
|
|
||||||
);
|
|
||||||
|
|
||||||
emit RepaidWithCollateral(
|
emit RepaidWithCollateral(
|
||||||
collateral,
|
collateral,
|
||||||
principal,
|
principal,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user