MyCut

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

Unconsistent naming convension for variables makes them confusing for everyone reading the code

Summary

The flags for diferent variables do not meet a consistent patters. Some immutable variables have the flag i_, some don't, storage variables don't use any flags, and constant variables don't use any convension.

Vulnerability Details

Impact

This doens't have any direct impact on the functionality of the contract, but it is very confusing for anyone looking at these variables that don't follow any conventions.

Tools Used

Recommendations

Use the i_ flag for immutable variables, s_ for storage variables, and capslock for constant variable:

address[] private players;
uint256[] private s_rewards;
address[] private claimants;
uint256 private immutable i_totalRewards;
uint256 private immutable i_deployedAt;
IERC20 private immutable i_token;
mapping(address => uint256) private playersToRewards;
uint256 private s_remainingRewards;
uint256 private constant MANAGER_CUT_PERCENTAGE = 10;
Updates

Lead Judging Commences

equious Lead Judge 11 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.