Closed sherlock-admin closed 9 months ago
1 comment(s) were left on this issue during the judging contest.
auditsea commented:
Gas
1 comment(s) were left on this issue during the judging contest.
auditsea commented:
Gas
Invalid, gas optimization findings are not valid based on sherlock rules
- Gas optimizations: The user/protocol ends up paying a little extra gas because of this issue.
r0ck3tz
medium
Missing alignment of storage to 256 may result in excessive gas consumption
Summary
The protocol uses namespaced storage layout ERC-7201 across all contracts but incorrectly defines the storage location.
Vulnerability Detail
The storage location should be aligned to 256 which is an optimization in anticipation of gas schedule changes after the Verkle state tree migration, which may cause groups of 256 storage slots to become warm all at once.
Impact
Not aligning storage to 256 will result in significantly higher gas consumption.
Code Snippet
Tool used
Manual Review
Recommendation
It is recommended to align the storage location to 256 by setting the last byte of the hash to 0: