Vault::_updateCreditDelegations is susceptible to underflow (0x11) error making the protocol unusable.
For current marketId the old delegated value is cached in UD60x18 previousCreditDelegationUsdX18. Then this value is subtracted from current credit capacity, newCreditDelegationUsdX18. Since the result is expected to be a positive number, UD60x18 creditDeltaUsdX18, the function will revert with a 0x11 underflow panic error when previousCreditDelegationUsdX18 > getTotalCreditCapacityUsd(self).
This can happen, for example, when the asset drops in value.
Protocol DoS.
_updateCreditDelegations is called from all critical contexts, rendering protocol unusable.
In _updateCreditDelegations define creditDeltaUsdX18 as SD59x18 and do the necessary casting
Update Market::updateTotalDelegatedCredit to accept a SD59x18 type to allow the market to decrease its delegated credit.
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.