Hawk High

First Flight #39
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Severity: low
Valid

Immutable Review Time Prevents Contract Upgradeability

Summary

The LevelOne.sol contract uses an immutable variable for reviewTime which cannot be modified after deployment, making it impossible to adjust this parameter in future upgrades.

Vulnerability Details

uint256 public immutable reviewTime = 1 weeks;

ReviewTime is declared as immutable with a fixed value of 1 week. Immutable variables are set at contract creation and cannot be changed, so this prevents any flexibility in adjusting review periods through upgrades.

Impact

Low:

  • Makes the contract less flexible for future changes

  • Could require a new contract deployment if review time needs to change

Tools Used

Manual code review

Recommendations

  1. Remove the immutable keyword.

  2. Initialize the review time in the initialize function.

Updates

Lead Judging Commences

yeahchibyke Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

unsafe immutable use

Immutable variables are stored in the bytecode of the contract. hence, they should only be used for values that will not change across upgrades.

Appeal created

mishoko Auditor
6 months ago
yeahchibyke Lead Judge 6 months ago
Submission Judgement Published
Validated
Assigned finding tags:

unsafe immutable use

Immutable variables are stored in the bytecode of the contract. hence, they should only be used for values that will not change across upgrades.

Support

FAQs

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