code-423n4 / 2022-12-tigris-findings

8 stars 4 forks source link

Gas Optimizations #550

Open code423n4 opened 1 year ago

code423n4 commented 1 year ago

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

GalloDaSballo commented 1 year ago

1- State variables only set in the constructor should be declared immutable :

14.7k

At least 14.7k

c4-sponsor commented 1 year ago

GainsGoblin marked the issue as sponsor confirmed

GalloDaSballo commented 1 year ago

2- Variables inside struct should be packed to save gas :

On average it will save one Cold Slot SLOAD, 2k

3- Multiple address/IDs mappings can be combined into a single mapping of an address/id to a struct :

Valid but looks like marginal savings

Rest is minor let's say 300 gas

GalloDaSballo commented 1 year ago

17000

c4-judge commented 1 year ago

GalloDaSballo marked the issue as grade-a