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 #195

Open
c4-bot-7 opened this issue Mar 21, 2024 · 5 comments
Open

Gas Optimizations #195

c4-bot-7 opened this issue Mar 21, 2024 · 5 comments
Labels
bug Something isn't working G (Gas Optimization) G-01 grade-a high quality report This report is of especially high quality sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons

Comments

@c4-bot-7
Copy link
Contributor

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

@c4-bot-7 c4-bot-7 added bug Something isn't working G (Gas Optimization) labels Mar 21, 2024
c4-bot-6 added a commit that referenced this issue Mar 21, 2024
c4-bot-5 added a commit that referenced this issue Mar 21, 2024
@raymondfam
Copy link

12 well elaborate G.

@c4-pre-sort c4-pre-sort added the high quality report This report is of especially high quality label Mar 22, 2024
@c4-pre-sort
Copy link

raymondfam marked the issue as high quality report

@c4-sponsor c4-sponsor added the sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons label Mar 26, 2024
@c4-sponsor
Copy link

wilsoncusack (sponsor) acknowledged

@c4-judge
Copy link
Contributor

3docSec marked the issue as grade-a

@wilsoncusack
Copy link

G1: will do
G2: will do
G3: will do
G4: will do
G5: won't do, needs to update because version changes and proxy
G6: will do
G7: won't do
G8: won't do
G9: maybe
G10: won't do
G11: won't do
G12: won't do, can't reliably decode

stevieraykatz added a commit to coinbase/magic-spend that referenced this issue Apr 4, 2024
* Check that withdrawAmt > maxCost before updating mapping. Per code-423n4/2024-03-coinbase-findings#195, G04

* Switch validation checks for gas optimization. Per code-423n4/2024-03-coinbase-findings#195 G06

* Reorder validations in withdraw to check signature before validating the full request. Per code-423n4/2024-03-coinbase-findings#137 G02

* Added gas snapshot

* Formatted

* Remove balance check before updating withdrawable mapping, rerun snapshot
stevieraykatz added a commit to coinbase/smart-wallet that referenced this issue Apr 4, 2024
* Leverage solidity overflow check optimization for loop index increment. code-423n4/2024-03-coinbase-findings#38

* Cache storage var for use in loop, update once at the end. Per code-423n4/2024-03-coinbase-findings#195, G-01

* Cache storage pointer and reference in intialization. Per code-423n4/2024-03-coinbase-findings#195, G-02

* Remove no-op assigning of default value. Per code-423n4/2024-03-coinbase-findings#195 G-09

* Add new gas snapshot

* Revert erc1271 change

* Rerun snapshot

* Remove _addOwner method and call _addOwnerAtIndex directly
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 high quality report This report is of especially high quality sponsor acknowledged Technically the issue is correct, but we're not going to resolve it for XYZ reasons
Projects
None yet
Development

No branches or pull requests

7 participants