code-423n4 / 2023-07-pooltogether-findings

12 stars 7 forks source link

Gas Optimizations #402

Open code423n4 opened 1 year ago

code423n4 commented 1 year ago

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

c4-judge commented 1 year ago

Picodes marked the issue as grade-b

PierrickGT commented 10 months ago

G-01: this suggestion does not save any gas G-02: fixed in https://github.com/GenerationSoftware/pt-v5-prize-pool/pull/57 G-03: unchecked { ++i } would have to be at the end of the function and would reduce clarity, so we are not going to implement these kind of suggestions. G-04: same for i = 0, it would reduce clarity. G-05: fixed in the following PR: https://github.com/GenerationSoftware/pt-v5-prize-pool/pull/57 G-06: no need to index amounts G-07: won't fix cause we would lose in code clarity G-08: it's preferable to use memory instead of storage G-09: fixed in the following PR: https://github.com/GenerationSoftware/pt-v5-prize-pool/pull/57 G-10: has been removed