In VaultRouterBranch
-> when a withdraw is redeemed , at the end of the redeem
function, there is a final check to ensure that the locked credit capacity is greater than the delta of the credit capacity.
This would mean that there is enough locked credit capacity to facilitate and handle the change in credit capacity that the withdraw being redeemed would impact.
However the check of the two values is wrong, the check is less than or equal
but should be greater than or equal
The function calculates the credit capacity delta
-> and then uses the operand .lte
.lte
checks that the first value is less than or equal to the subsequent value.
As is:
This goes against the intended functionality and checks that the credit capacity delta
is less than or equal to the locked credit capacity
. And reverts if the locked credit capacity
is greater.
The locked credit capacity
being greater than the delta is a good thing, and means that the withdraw being redeem should be completed because THERE IS ENOUGH credit capacity to facilitate it.
But, it will revert.
In redeem
-> withdraws being redeemed will revert and fail if the locked credit capacity
is greater than the delta, when it should succeed.
Subsequently, withdraws being redeemed will succeed when locked credit capacity
is less than the delta, when it should fail -> because there is not enough credit capacity to facilitate and handle the withdraw.
The check as is implements the total opposite of the intended functionality, which is the ensure there is enough locked credit capacity
to facilitate the withdraw. This as is, actual ensures that there is not enough locked credit capacity
to facilitate the withdraw, and succeeds if so.
Manual Review
Change the check from .lte
to -> .gte
.
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.