The 'buy' and 'cancelListings' functions do exactly as the function names say they
They however do not follow the Checks-Effects-Interactions pattern which could lead to possible reentrancy attacks. They perform external calls—specifically _safeTransfer (NFT) and usdc.safeTransfer (ERC20)—before updating the internal state variable s_listings[_listingId].isActive = false.
Likelihood:
This occurs when a malicious contract calls the 'buy' and 'cancelListings' functions
Impact:
Asset theft
This is a real reentrancy point, but not an exploitable one. The transaction will revert on the second ERC721 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.