DatingDapp

First Flight #33
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

Low: Inefficient "fixed fee" declaration

Summary

Best practices for delcaring variables that will never change is to be declared as constant

Vulnerability Details

The fixed fee declared here:

uint256 immutable FIXEDFEE = 10;
  1. Is delared as immutable, declaring it this way should be only if it's going to be assigned in constructor and only once. - This is not happening in the contract.

  2. The name of the variable should be FIXED_FEE - separating the words with underscore making it more easy to read.

Impact

This will have impact on Gas fees and also on code readability.

Tools Used

Manual review

Recommendations

I recoment changing the declaration to:

uint256 constant FIXED_FEE = 10;
Updates

Appeal created

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

Informational or Gas

Please read the CodeHawks documentation to know which submissions are valid. If you disagree, provide a coded PoC and explain the real likelyhood and the detailed impact on the mainnet without any supposition (if, it could, etc) to prove your point.

Support

FAQs

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