According to the current implementation some percentage of assets should within the contract to prevent the credit system from being insolvent this amounts are restricted by a check after every redemption but this check doesn't prevent this has users will be able to withdraw all the asset without leaving anything.
Lockedcredit ratio is used to calculate the amount of assets that should still remain in the vault to secure the delegation system but the check implemented during redemption will not handle this correctly.
Before redemption , Credit capacity = $ 1000
User withdraws shares worth = $ 995
Using a locked ratio of 2% = 1000 * 2 % = $ 20
Afteer withdrawing we should not be able to go less than the locked Credit but instead we do this
New Credit Capacity = $ 5
Check 1000 - 5 < 20
995 < 20
will pass but the remain credit capacity is actually 5 and it is less than the amount that should remain locked 20 .
FOR a user withdrawing just 1 dollar the current check will revert his redemption even though the capacity is 999 dollars and higher than 20 dollars.
The check DOS a user when the vault is healthy and doesn't prevent users from redeeming assets that will send the capacity below the locked ratio.
Instead we should be checking
e.g 1 . After withdrawal is the new capacity below the former locked
5 USD below 20 USD => revert
For the smaller amount withdrawn also
999 USD below 20 USD => allow withdrawal
Bypass check that can lead to vault being unable to maintain the credit delegation system and DOS when users are withdrawing just a fraction with the vault still solvent.
Manual Review
Following the comment
Change the Check. check the Present vault credit capacity and revert if less than the locked ratio before making this call.
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.