Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gas Optimizations #179

Open
code423n4 opened this issue Dec 14, 2022 · 5 comments
Open

Gas Optimizations #179

code423n4 opened this issue Dec 14, 2022 · 5 comments
Labels
bug Something isn't working G (Gas Optimization) G-01 grade-a sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")

Comments

@code423n4
Copy link
Contributor

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

@code423n4 code423n4 added bug Something isn't working G (Gas Optimization) labels Dec 14, 2022
code423n4 added a commit that referenced this issue Dec 14, 2022
code423n4 added a commit that referenced this issue Dec 14, 2022
@GalloDaSballo
Copy link

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

2.1K + 7 = 14.7k

2. Structs can be packed into fewer storage slots

2k each (saves a Cold SLOAD for end users)

Rest is not as impactful (may count for tie breakers)

16700

@c4-sponsor
Copy link

GainsGoblin marked the issue as sponsor confirmed

@c4-sponsor c4-sponsor added the sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity") label Jan 9, 2023
@GalloDaSballo
Copy link

Rest is not as impactful, let's say 300 gas

@GalloDaSballo
Copy link

17000

@c4-judge
Copy link
Contributor

GalloDaSballo marked the issue as grade-a

@C4-Staff C4-Staff added the G-01 label Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working G (Gas Optimization) G-01 grade-a sponsor confirmed Sponsor agrees this is a problem and intends to fix it (OK to use w/ "disagree with severity")
Projects
None yet
Development

No branches or pull requests

5 participants