The function Market::isAutoDeleverageTriggered incorrectly returns false when delegatedCreditUsdX18 is less than or equal to totalDebtUsdX18. This logic should return true, as the system has already exceeded a debt ratio of 1:1, which should trigger auto deleveraging. This bug could prevent the auto deleverage system from activating when required, leading to potential insolvency risks.
The function checks:
If the delegated credit is less than or equal to total debt, it returns false, meaning auto deleverage does not activate. When delegated credit ≤ total debt, the system is already over-leveraged, so ADL should be triggered. Returning false in this case prevents ADL activation, operations that worsen the market's condition.
If delegated credit is less than total debt, the market is already in a risk state, so the function should return true immediately.
The market could remain in an over-leveraged state, increasing insolvency risks.
If ADL does not activate when needed, the system could mint excessive USD tokens, reducing their backing and stability.
return true when delegated credit is less than debt
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.