Skip to content

Commit

Permalink
fix comment on DSCEngineTest.t.sol (#44)
Browse files Browse the repository at this point in the history
* fix comment ( where do the 200 come from?)

* fixing comment in DSCEngineTest.t.sol
  • Loading branch information
yehoudaB authored Sep 25, 2023
1 parent a6f5bf8 commit 1d89023
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/unit/DSCEngineTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,12 @@ contract DSCEngineTest is StdCheats, Test {

function testHealthFactorCanGoBelowOne() public depositedCollateralAndMintedDsc {
int256 ethUsdUpdatedPrice = 18e8; // 1 ETH = $18
// Rememeber, we need $150 at all times if we have $100 of debt
// Rememeber, we need $200 at all times if we have $100 of debt

MockV3Aggregator(ethUsdPriceFeed).updateAnswer(ethUsdUpdatedPrice);

uint256 userHealthFactor = dsce.getHealthFactor(user);
// $180 collateral / 200 debt = 0.9
// 180*50 (LIQUIDATION_THRESHOLD) / 100 (LIQUIDATION_PRECISION) / 100 (PRECISION) = 90 / 100 (totalDscMinted) = 0.9
assert(userHealthFactor == 0.9 ether);
}

Expand Down

0 comments on commit 1d89023

Please sign in to comment.