Eggstravaganza

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

No Reentrancy Protection

Summary

Vulnerability Details

withdrawEgg in EggVault contract calls transferFrom, an external call to eggNFT. If EggstravaganzaNFT were modified to include callbacks (e.g., via onERC721Received), a reentrancy attack could repeatedly withdraw the same NFT before storedEggs is set to false.

Impact

Loss of NFTs due to reentrancy.

Tools Used

Recommendations

Add a non-reentrant modifier (e.g., OpenZeppelin’s ReentrancyGuard):

import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
contract EggVault is Ownable, ReentrancyGuard {
function withdrawEgg(uint256 tokenId) public nonReentrant { ... }
}
Updates

Lead Judging Commences

m3dython Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Incorrect statement

Support

FAQs

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

Give us feedback!