The initiateWithdrawal
function lacks a check to ensure the user has sufficient shares before attempting the withdrawal. While the safeTransferFrom
function reverts if the user’s balance is insufficient, the error is not clear, making it difficult for the user to understand the cause of failure.
The function doesn’t verify the user's balance before transferring shares.
If the user doesn't have enough shares, the function silently reverts with no explanation, leading to a poor user experience.
Although the transaction won’t succeed without sufficient balance, the lack of clarity can cause confusion.
Severity: Medium
Likelihood: Medium
Impact: Medium
Business Impact: Users may become frustrated and lose trust due to unclear errors when attempting withdrawals.
Technical Impact: No security risk, but the lack of feedback affects system transparency and user experience.
Manual Review
Add Balance Check:
Before transferring shares, verify that the user has enough to withdraw. Example:
Provide Clear Error Messaging:
Use clear custom error messages to inform users why their withdrawal failed.
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.