Raisebox Faucet

First Flight #50
Beginner FriendlySolidity
100 EXP
View results
Submission Details
Impact: low
Likelihood: low
Invalid

Unused variable

Unused blockTime Variable

Description

  • The blockTime variable is defined to store the timestamp of contract deployment but is never used in the contract's logic.

  • This unused variable increases code complexity and storage costs without providing any functionality.

uint256 public blockTime = block.timestamp;

Risk

Likelihood:

  • The variable is declared and initialized during contract deployment, consuming storage.

  • It remains unused throughout the contract lifecycle, as no functions reference it.

Impact:

  • Wastes gas for unnecessary storage allocation.

  • Increases code maintenance complexity, potentially confusing developers.

Proof of Concept

The variable is defined but has no functional use

uint256 public blockTime = block.timestamp;

Recommended Mitigation

Remove this line.

- uint256 public blockTime = block.timestamp;
Updates

Lead Judging Commences

inallhonesty Lead Judge 9 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity

Support

FAQs

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