Currently, users can redeem from a vault even when its credit capacity is below zero. This can lead to an uncontrolled increase in debt, reducing the vault’s available credit and causing potential insolvency issues.
In the current implementation of redeem
, there is no check to prevent redemption when totalCreditCapacity
is zero or negative. This means:
A user can still withdraw assets from a vault even when it has no credit capacity left.
Each redemption reduces the creditCapacity
, causing it to go negative.
If this continues, the system's debt will increase while the vault’s available credit remains lower than expected.
Negative credit capacity – The vault can end up with a debt larger than its available credit.
Potential insolvency risk – If multiple users exploit this issue, the vault may no longer be able to honor redemptions.
Misleading liquidity assumption – The system might assume that a vault has available credit, when in reality, it does not.
Manual review
To prevent users from redeeming when the vault is out of credit, add a pre-check before allowing redemption.
Modify the redeem
function to verify totalCreditCapacity
before proceeding:
Placing this check at the beginning of the function ensures that redemptions only occur when the vault has sufficient credit capacity.
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.