The burn_dsc function checks the caller's health factor after burning DSC:
Burning DSC reduces debt, which can only improve (or maintain) the health factor. It is mathematically impossible for burning DSC to break the health factor:
Health factor = (collateral_usd * LIQUIDATION_THRESHOLD / LIQUIDATION_PRECISION * 1e18) / total_dsc_minted
Burning DSC decreases total_dsc_minted in the denominator
Decreasing the denominator increases the fraction
Therefore health factor always improves or remains max_value(uint256) (if debt becomes 0)
The _revert_if_health_factor_is_broken check on line 151 will never revert for a burn_dsc call, making it a wasted gas cost (2 SLOAD + oracle calls + arithmetic).
Likelihood: High -- Every burn_dsc call pays for this unnecessary check.
Impact: Informational -- No security impact, only gas waste. Each unnecessary health factor check costs approximately 5,000-10,000 gas (two storage reads for minted amount and collateral, plus oracle call overhead).
Remove the health factor check from burn_dsc:
The contest is live. Earn rewards by submitting a finding.
Submissions are being reviewed by our AI judge. Results will be available in a few minutes.
View all submissionsThe contest is complete and the rewards are being distributed.