The CreditDelegation.sol
will fail to account for the credit capacity correctly since it will add the debt instead of subtracting it.
The credit capacity is used to represent the amount available for the market to give as credit. The totalDebt is the amount that was already given to the perp engine. In order to find the credit capacity it should subtract the totalDebtUsdX18
instead of adding it.
Wrong creditCapacityUsdX18 could result in the vault distributing more debt even if it does not have any capacity left.
Manual Review
Subtract instead of adding it.
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.