Ther is a flawed credit capacity check in the redeem
function that allows users to withdraw more collateral assets than the vault’s available unlocked liquidity. This can drain the vault’s reserves, rendering it insolvent and unable to honor legitimate withdrawal requests.
flawed code
The condition checks if the withdrawal amount (delta) is ≤ locked credit capacity, not unlocked. This allows withdrawals to exceed unlocked liquidity if delta > lockedCredit.
A Scenario of the flawed vault check
Vault State:
Total Credit Capacity: 1,000 USD (assets available).
Locked Credit Capacity: 300 USD (reserved for pending withdrawals).
Unlocked Credit Capacity: 700 USD (available for immediate withdrawals).
Malicious Redemption:
A user attempts to redeem shares worth 800 USD (exceeding the unlocked 700 USD).
The flawed check incorrectly approves the withdrawal because 800 <= 300 evaluates to false.
The vault transfers 800 USD to the user, overdrawing its liquidity by 100 USD.
Manual review.
The correct approach should have been recalculating the unlocked credit correctly and ensuring that the redeemed amount doesn't exceed it. The corrected condition should check if the delta (redeemed amount) is greater than the unlocked credit and revert if true.
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.