The "collectUsdFromSelling()" only checks wether "tokenId" is false. And the protocol desing is to set the "tokenId" active when listing and false after it is sold.
The problem is that, "cancelListing()" also set the "tokenId" false. this is good since the listing was cancel. But malicious user can easily take advantage of it and break the protocol.
Likelihood:
the malicious user can easily break the protocol by just mint, list, 'cancelListing, and 'collectUsdFromSelling()'
Impact:
Breaking the protocol
Stealing the funds in the contract
Below is the proof of code which prove the malicious user successfully steal the funds from the contract by just minting the NFT, list the NFT then cancel the listing and steal the funds with his in active "tokenId"
Add the boolean isSold in the "Listing" struct. So that there will be difference between selling and cancel
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.