The resolveTrick
function includes a refund mechanism that can be exploited to create a Denial of Service (DoS) condition. The vulnerability lies in the ETH refund logic which could be blocked by a malicious contract, preventing legitimate users from completing their NFT purchases.
Function relies on msg.sender.call
for issuing refunds, which is prone to failure in cases where msg.sender
is a contract that deliberately blocks the transfer.
The vulnerability can be exploited in this way:
If a refund fails, the entire transaction reverts. NFT transfer is rolled back. Stored state remains unchanged. Token remains locked in pending state.
Even though mappings are deleted, their storage slots can still be read. A malicious contract could track and manipulate these values across multiple transactions
Manual Review
Foundry
Slither
A suggestion to fix the issue is to implement Pull Pattern for Refunds like:
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.