In DSCEngine::burnDsc function, the line in the link above checks and reverts if the burning of certain amount of DSC causes the health Factor to go below the MIN_HEALTH_FACTOR
. However, this check seems unnecessary as when a user burns a certain amount of their DSC, the DSCEngine::_burnDsc private function reduces the Dsc balance of the user by that amount(see link #2) and in the formula that calculates the Health Factor(link #3), the dsc balance of the user is in the denominator. It means that when the collateral amount of user
is divided by the reduced dsc balance
, the value of health factor will only increase and improve it.
Remove the _revertIfHealthFactorIsBroken(msg.sender)
line in DSCEngine::burnDsc
to save a lot of gas by avoiding the unnecessary check
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.