The EggVault contract requires manual initialization of the eggNFT parameter after deployment, creating a critical vulnerability where the entire vault system becomes non-functional if initialization is forgotten.
The EggVault contract relies on the eggNFT address being set to function properly, but this parameter is not initialized in the constructor:
This creates a critical vulnerability:
The eggNFT variable remains uninitialized (address(0)) after deployment
All calls to depositEgg and withdrawEgg will revert with errors when trying to interact with the uninitialized NFT contract
The entire vault system becomes non-functional until the owner manually calls setEggNFT
If initialization is forgotten, the entire vault system becomes non-functional
Users cannot deposit or withdraw eggs, breaking the core functionality of the vault
No clear error messages to indicate what went wrong
Requires manual intervention by the owner to fix
Manual code review
Initialization vulnerability analysis
Implement proper initialization controls by setting the NFT contract address in the constructor:
This ensures the NFT contract is set during deployment, eliminating the risk of forgotten initialization.
Owner is trusted and is not expected to interact in ways that would compromise security
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.