Skip to content

Commit

Permalink
refactor: revert repayIncentive temp variable
Browse files Browse the repository at this point in the history
  • Loading branch information
QGarchery committed Dec 20, 2023
1 parent 47aaecf commit 90fb045
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/Morpho.sol
Original file line number Diff line number Diff line change
Expand Up @@ -375,11 +375,8 @@ contract Morpho is IMorphoStaticTyping {
market[id].totalBorrowAssets, market[id].totalBorrowShares
);
} else {
uint256 repayIncentive = repaidShares.toAssetsDown(
market[id].totalBorrowAssets, market[id].totalBorrowShares
).wMulDown(liquidationIncentiveFactor);

seizedAssets = repayIncentive.mulDivDown(ORACLE_PRICE_SCALE, collateralPrice);
seizedAssets = repaidShares.toAssetsDown(market[id].totalBorrowAssets, market[id].totalBorrowShares)
.wMulDown(liquidationIncentiveFactor).mulDivDown(ORACLE_PRICE_SCALE, collateralPrice);
}
}
uint256 repaidAssets = repaidShares.toAssetsUp(market[id].totalBorrowAssets, market[id].totalBorrowShares);
Expand Down

0 comments on commit 90fb045

Please sign in to comment.