Closed sherlock-admin closed 9 months ago
1 comment(s) were left on this issue during the judging contest.
takarez commented:
invalid
Invalid, if insufficient allowance is assigned to user withdrawing, allowed-shares
will underflow and revert, no explicit checks required
anya
medium
Insufficient Allowance Handling in withdraw Function and redeem in Tranche.sol
Summary
The withdraw function in the provided code snippet does not explicitly check if the user's allowance is sufficient to cover the desired withdrawal amount before proceeding. This could lead to vulnerabilities and unexpected behaviour if the allowance is less than the requested shares.
Vulnerability Detail
Impact
Code Snippet
https://github.com/sherlock-audit/2023-12-arcadia/blob/main/lending-v2/src/Tranche.sol#L208-L230
https://github.com/sherlock-audit/2023-12-arcadia/blob/main/lending-v2/src/Tranche.sol#L239-L260
Tool used
Manual Review
Recommendation