The function withdrawAllFailedCredits(address _receiver) attempts to send failedTransferCredits[_receiver] to msg.sender, but mistakenly clears failedTransferCredits[msg.sender] instead of _receiver. This allows an attacker to call the function with a victim’s address, receive the victim’s credits, and leave the victim’s mapping intact — enabling repeated theft and inconsistent contract state.
Likelihood: Medium
exploitation is straightforward if the contract holds enough ETH for payouts and the attacker can invoke withdrawAllFailedCredits. Failed transfers naturally occur in normal operations, making the risk realistic.
Impact: High
direct loss of ETH: the attacker can drain credits belonging to others.
The victim’s mapping remains unchanged, allowing repeated exploitation until the contract runs out of funds.
Paste this code in BidBeastsMarketPlaceTest.t.sol
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.