SNARKeling Treasure Hunt

First Flight #59
Beginner FriendlyGameFiFoundry
100 EXP
Submission Details
Impact: low
Likelihood: low

Redundant bool initialization in constructor wastes deployment gas

Author Revealed upon completion

Root + Impact

Description

  • The constructor explicitly sets paused = false, but bool variables in Solidity default to false automatically. This results in an unnecessary SSTORE operation during deployment, wasting gas for no effect.

constructor(address _verifier) payable {
if (_verifier == address(0)) revert InvalidVerifier();
owner = msg.sender;
verifier = IVerifier(_verifier);
// @> redundant — bool defaults to false in Solidity
paused = false;
}

Recommended Mitigation

- paused = false;

Support

FAQs

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

Give us feedback!