Attacker could frontrun deposit nft in vault and withdraw nft after that on own address.
User could deposit nft in vault directly, without using funciton depositEggToVault() from EggHuntGame.
User transfer nft on vault contract address.
[Frontrun] Attacker look this tx in mempool and send own tx with call depositEgg(user's nft id, attacker.address). Contract store info, that attacker is owner of this nft.
User send his tx to depositEgg function, but tx will revert.
Attacker call withdrawEgg(user's nft id) and receive nft on his address.
User could lost his nft, if use depositEgg function directly.
Manual review
Add check in EggVault.depositEgg that caller is EggHuntGame contract and do not allow users call deposit function directly.
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.