The withdrawAllFailedCredits function is designed to allow users to withdraw failed transfer credits that could not be sent directly
The function has a critical parameter/state variable mismatch where it uses _receiver for checking balance but msg.sender for state updates and transfers, enabling a reentrancy attack
Likelihood:HIGH
Any malicious contract can exploit this by calling the function repeatedly during the ETH transfer callback
The parameter/variable mismatch makes this trivially exploitable
Impact:HIGH
Complete drainage of contract's ETH balance is possible
All legitimate users' failed transfer credits could be stolen
step1:use a contract to buy an NFT via the buyNowPrice logic, and send more ETH than the buyNowPrice. Make sure this contract does not have a receive() or fallback() function. When the market tries to return the excess ETH, the transfer will fail, and the contract’s address will be recorded in the failedTransferCredits mapping
step2:use another contract to attack,and param _target should use the contract address in step1
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.