The withdrawEgg function in EggVault performs an external call (transferFrom) before updating state, opening a reentrancy attack vector.
The function updates storedEggs and eggDepositors after transferring the NFT.
If eggNFT is a malicious contract overriding onERC721Received, it could re-enter withdrawEgg to drain the vault.
An attacker could recursively withdraw the same egg multiple times or manipulate vault state.
Manual review of state changes and external calls.
Follow Checks-Effects-Interactions (CEI) pattern: update state before calling transferFrom.
Use OpenZeppelin’s ReentrancyGuard for critical functions.
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.