Auto deleverage will be triggered when the market is in net credit.
In CreditDelegationBranch
's withdrawUsdTokenFromMarket(), protocol calls Market's isAutoDeleverageTriggered() to determine whether the market has reached the auto deleverage start threshold, and reduces the requested USD Token amount by multiplying it by the ADL factor.
CreditDelegationBranch::withdrawUsdTokenFromMarket():
As the code comment says, auto deleverage should only be triggered when the market is in net debt.
Market::getAutoDeleverageFactor():
However, isAutoDeleverageTriggered()
returns False when the market is in net debt (credit <= debt), this means auto deleverage will be triggered when the market is in net credit.
Auto deleverage is triggered when the market is in net credit.
Manual Review
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.