Eggstravaganza

First Flight #37
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: high
Invalid

No withdraw function in EggHuntGame contract

Summary

Players can deposit eggs to EggVault from main contract EggHuntGame, but can not withdraw eggs from the main contract
(Only if they don't have access to EggVault functions)

Vulnerability Details

Impossibility of withdrawing eggs from main contract EggHuntGame

Impact

Eggs stuck in EggVault contract

Tools Used

Forge Test, Remix, Manual Review

Recommendations

Add a withdrawEggFromVault() function

/// @notice Allows the original depositor to withdraw their egg from the vault.
function withdrawEggFromVault(uint256 tokenId) external {
require(eggVault.eggDepositors(tokenId) == msg.sender, "Not the original depositor");
require(eggVault.isEggDeposited(tokenId), "Egg is not deposited");
eggVault.withdrawEgg(tokenId);
}
Updates

Lead Judging Commences

m3dython Lead Judge 5 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.