The EggVault constructor does not initialize the eggNFT address, requiring a separate setEggNFT call, which could lead to misconfiguration or usage of the vault before it’s properly set up.
The constructor:
eggNFT is left uninitialized, and setEggNFT must be called by the owner:
If depositEgg or withdrawEgg is called before setEggNFT, it will revert due to an uninitialized eggNFT, but this reliance on external setup introduces a risk of misconfiguration or delay.
If the owner forgets to call setEggNFT, the vault is unusable until corrected, potentially disrupting game flow.
In a worst-case scenario, a malicious owner could set an incorrect NFT contract, leading to unexpected behavior.
Manual code review.
Understanding of contract initialization patterns.
Initialize eggNFT in the constructor to ensure the vault is fully functional upon deployment:
Remove setEggNFT unless there’s a specific need to change the NFT contract post-deployment (e.g., upgrades).
Changing the NFT contract address doesn't update the storedEggs and eggDepositors mappings
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.