The CreditDelegationBranch contract implements a dynamic auto-deleverage system where the getAutoDeleverageFactor function scales restrictions from 1.0 (none) to 0.0 (full) based on market stress levels. However, a severe logical flaw has been identified where the early return condition produces the maximum deleverage factor (1.0) during critical market conditions, completely inverting the intended risk management behavior.
The vulnerability creates a paradoxical feedback loop in the risk management system. Under stress conditions where credit falls below debt levels, the system maximizes risk exposure by returning the highest possible deleverage factor (1.0). This inverts the intended protection mechanism, allowing unlimited minting and profit taking precisely when the system requires maximum restrictions.
The flaw penetrates multiple critical system layers. At the token minting level, it enables unrestricted issuance during market stress:
The profit calculation system similarly fails to apply needed restrictions:
The vulnerability enables a destructive feedback cycle:
Market stress reduces credit below debt threshold
System returns maximum factor instead of minimum
Unrestricted minting and profit extraction becomes possible
Further credit deterioration occurs
Cycle amplifies until system insolvency
This creates opportunities for malicious actors to deliberately stress markets and extract value through unrestricted operations when controls should be tightest.
The fix requires inverting the early return logic to provide maximum protection during stress:
This ensures the system applies maximum restrictions during periods of market stress, protecting system solvency and preventing exploit scenarios.
The severity is critical as the flaw fundamentally compromises system risk management, enabling catastrophic failure scenarios during market stress events.
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.