totalAssetsShares, notRegistered) Increase Code Complexity and Gas OverheadIn the BriVault contract, the following state variables are declared but never used anywhere in the contract’s logic or event flow:
Likelihood:
This issue always occurs on every contract deployment since the variables are permanently stored on-chain.
The cost is deterministic: ~20,000 gas per unused storage slot and an increased bytecode size.
Impact:
Increased gas cost during contract deployment due to additional storage layout.
You can verify the absence of references using Foundry’s static analysis:
And by running a quick grep across the codebase:
These commands show only the declaration line, confirming they are not read or written anywhere in the project.
Remove the variables entirely:
Gas optimizations are invalid according to the CodeHawks documentation.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.