MyCut

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

The `i_players` and `i_rewards` variables can be removed to save on gas and storage

Summary

Storing players in i_players and rewards in i_rewards is unnecessary. Only i_players.length is used, and it can be stored as uint256 (Additionally, there’s no need to store players.length since it should be claimants.length).

Impact

This results in unnecessary storage use, and reading from storage is more gas-expensive than reading from memory (e.g., in the constructor's for loop).

Recommendation

Remove the i_players and i_rewards variables.

Updates

Lead Judging Commences

equious 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.