20,000 USDC
View results
Submission Details
Severity: gas
Valid

Structs can be modified to fit in fewer storage slots

Summary

Structs can be modified to fit in fewer storage slots.

Vulnerability Details

Some member types can be safely modified, and as result, these struct will fit in fewer storage slots. Each slot saved can avoid an extra Gsset (20000 gas) for the first setting of the struct. Subsequent reads as well as writes have smaller gas savings.

Impact

Cost more gas.

Tools Used

Manual Review

Recommendations

Structs can be modified to fit in fewer storage slots.

Support

FAQs

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