code-423n4 / 2022-12-Stealth-Project-findings

0 stars 0 forks source link

Gas Optimizations #79

Open code423n4 opened 1 year ago

code423n4 commented 1 year ago

See the markdown file with the details of this report here.

kirk-baird commented 1 year ago

The issue USING STORAGE INSTEAD OF MEMORY FOR STRUCTS/ARRAYS SAVES GAS is not valid for most of the cases listed. The optimisation does not apply if all values in the storage are read or if the value is already in memory / calldata.

The optimisation is only valid if we load a struct from storage into memory but do not use all of the struct fields.

c4-judge commented 1 year ago

kirk-baird marked the issue as grade-b