As we can see depositEgg requires the NFT to be sent in advance to the vault and then call such function to register the deposit:
An attacker can simply scan the mempool for a EggNFT transfer to the vault and simply frontrun the depositEgg()
transaction of the NFT's owner by setting himself as the depositor
... effectively stealing the NFT.
Manual review
Restrict depositEgg()
to be only callable by the associated EggHuntGame which will transfer the NFT and deposit it into the vault in a single transaction making it impossible to frontrun it.
Front-running depositEgg allows deposit ownership hijacking.
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.