Algo Ssstablecoinsss

First Flight #30
Beginner FriendlyDeFi
100 EXP
View results
Submission Details
Severity: low
Invalid

Irrational value for the health_factor from the _calculate_health_factor function.

Summary

The goal of the _calculate_health_factor function is to determine the health factor of a collateralized debt position. This value is used to assess the risk associated with the debt and collateral and to ensure that the collateral's value sufficiently covers the minted debt.

Vulnerability Details

in the function

if total_dsc_minted == 0:
return max_value(uint256)

return max value for uint256, here can be value between 0 and 1.

Impact

If max_value(uint256) is used in the rest of the code, it may cause an overflow.

Tools Used

manual review

Recommendations

Better normalization can be used here for the health factor.

Updates

Lead Judging Commences

bube Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Design choice

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.