BriVault

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

Unused Custom Error notRegistered()

Root + Impact

Description

  • The custom error error notRegistered(); is declared but never used anywhere in the contract. Solidity reserves a storage slot for error selectors in the bytecode metadata, slightly increasing deployment byte size and gas cost.

Risk

Impact:

  • Minimal gas impact (~200–300 bytes extra in deployed code). However, it creates code clutter and reduces readability.


Proof of Concept

NA

Recommended Mitigation

Remove the unused error definition to reduce bytecode size and maintain cleaner, optimized code.

Updates

Appeal created

bube Lead Judge 19 days ago
Submission Judgement Published
Invalidated
Reason: Non-acceptable severity
Assigned finding tags:

Gas optimizations

Gas optimizations are invalid according to the CodeHawks documentation.

Support

FAQs

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

Give us feedback!