Mystery Box

First Flight #25
Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: low
Invalid

Unindexed storage variables in `Reward` struct

Summary

Unindexed storage variables in Reward struct, which can be costly in terms of gas and not indexed well for storage.

Vulnerability Details

The Reward struct stores string name, which can be costly in terms of gas and not indexed well for storage.

Impact

Storing large strings in the Reward struct can lead to high gas costs and inefficiencies, especially as the reward pool or user reward list grows. For example, storing a large string for each reward (e.g., "Gold Coin") can become unnecessarily expensive, particularly if many rewards are created or transferred.

Tools Used

Manual review.

Recommendations

Consider using shorter, fixed-size data types (e.g., bytes32) or hash representations for names if practical, especially if names do not need to be readable on-chain.

Updates

Appeal created

inallhonesty Lead Judge about 1 year ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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

Give us feedback!