Normally, buying an NFT should be an atomic operation where payment, fee accounting, and NFT transfer complete exactly once.
The contract transfers the NFT to the buyer before fully finalizing internal state, allowing a malicious buyer contract implementing onERC721Received to reenter and execute marketplace logic again.
Likelihood:
Occurs when the buyer is a contract implementing onERC721Received.
Happens during normal buy() execution.
Impact:
Marketplace state can be reentered and manipulated.
Fees, listings, or collateral can be double-processed, enabling fund loss.
Attacker deploys malicious buyer contract
Calls buy(tokenId)
NFT transfer triggers onERC721Received
Reentrant buy() executes with partially updated state
Apply Checks-Effects-Interactions
Add reentrancy guard
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.
The contest is complete and the rewards are being distributed.