Expected behavior: Users should only be able to withdraw their own accumulated credits from failedTransferCredits.
Issue: The current implementation reads the balance from failedTransferCredits[_receiver] but resets failedTransferCredits[msg.sender]. This creates a mismatch between the retrieved amount and the cleared balance, which can lead to stuck funds or unauthorized withdrawals.
Likelihood: High
Every time the function is called with _receiver != msg.sender, balances will not align correctly.
This can either delete the wrong balance or leave funds stuck in the contract permanently.
Impact: Medium
Users may not be able to withdraw their credits correctly.
Potential for lost funds or the need for a contract upgrade/manual intervention.
Remove _receiver parameter → users can only withdraw their own credits (msg.sender).
Fix balance reset → zero out failedTransferCredits[msg.sender] before sending funds, preventing stuck funds or double payouts.
Add event → FailedCreditsWithdrawn logs withdrawals for transparency and easier auditing.
withdrawAllFailedCredits allows any user to withdraw another account’s failed transfer credits due to improper use of msg.sender instead of _receiver for balance reset and transfer.
withdrawAllFailedCredits allows any user to withdraw another account’s failed transfer credits due to improper use of msg.sender instead of _receiver for balance reset and transfer.
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.