The redeem function is designed to allow users to redeem index tokens for collateral assets from the vault. The vault enforces a locked capacity, meaning that after a user withdrawal, the remaining vault balance should never fall below this locked capacity.
However, the function incorrectly implements the locked capacity check:
It checks if the difference between the credit capacity before and after redemption is ≤ locked capacity.
This check is flawed because it allows users to fully withdraw their deposits without triggering a revert.
The function should ensure that vault balance after withdrawal remains above the locked capacity.
Instead, it only checks the difference between pre- and post-redeem credit capacity, which does not guarantee that the vault maintains its required balance.
This means users can withdraw all their funds, bypassing the locked capacity restriction.
Users can bypass the locked capacity of the vault
Manual Review
Instead of comparing the difference between credit capacities, check that the vault balance after redeeming remains greater than or equal to the locked 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.