The debtRatio function divides debt by asset value, but assets may exceed debt, resulting in a divide by zero.
DebtRatio calculates the debt percentage by taking the total debt value and dividing by the asset value. However, it is possible for assets to be greater than debt in some situations, such as when the portfolio has gain. This would cause a divide by zero.
An incorrect debt ratio of infinity could seriously misrepresent the portfolio risk profile and mislead users or liquidation mechanisms.
Manual Review
Validate divisor (asset value) is always greater than or equal to dividend (debt value) before dividing:
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.