Eggstravaganza

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

State Variable Changes Lack Event Emissions in some functions of `Eggstravaganza` protocol.

Summary

When changing the state of a variable it requires emiting an event. Which is not the case in some functions of the`Eggstravaganza` protocol :
- `setEggFindThreshold()` which is changing the game difficulty in `EggHUntGame.sol`.
- `mintEgg()` creates a new NFT in `EggstravaganzaNFT.sol`.
- `setGameContract()` sets the game contract in `EggstravaganzaNFT.sol`.
- `setEggNFT()` set the NFT contract in `EggVault.sol`.
Since there is no emission of event in `mintEgg()`, users don't know if their NFT got minted.
Emiting events enable offchain indexers to track the changes.

Impact

  • Off-chain systems cannot track protocol changes

  • Users lack visibility into critical parameter updates

Recommendation

Emit Events for Critical State Changes

Updates

Lead Judging Commences

m3dython Lead Judge 8 months ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Event Emission

Standard practice for clarifying important contract behaviors

Support

FAQs

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

Give us feedback!