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

N-01 Gas Inefficiencies #1919

Conversation

sparrowDom
Copy link
Member

Audit notes:

  • Throughout the _withdraw and withdrawAll, functions the storage array poolAssets
    and its length are loaded from the storage multiple times in each function. Consider
    loading it into a memory array and then reading from there.
  • Throughout the strategy, ++i is used in all for loops. Consider changing this i++
    occurrence to ++i as well in order to maintain consistency and save some gas.

When performing these changes, aim to reach an optimal tradeoff between gas optimization
and readability. Having a codebase that is easy to understand reduces the chance of errors in
the future and improves transparency for the community.

Copy link

github-actions bot commented Nov 7, 2023

Warnings
⚠️ 👀 This PR needs at least 2 reviewers

Generated by 🚫 dangerJS against dc79aa0

Copy link

codecov bot commented Nov 7, 2023

Codecov Report

❗ No coverage uploaded for pull request base (sparrowDom/balancer-composable-st-pool@b2313d5). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head 9b14cfe differs from pull request most recent head dc79aa0. Consider uploading reports for the commit dc79aa0 to get more accurate results

@@                            Coverage Diff                            @@
##             sparrowDom/balancer-composable-st-pool    #1919   +/-   ##
=========================================================================
  Coverage                                          ?   57.35%           
=========================================================================
  Files                                             ?       51           
  Lines                                             ?     2727           
  Branches                                          ?      703           
=========================================================================
  Hits                                              ?     1564           
  Misses                                            ?     1160           
  Partials                                          ?        3           

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

@sparrowDom sparrowDom requested a deployment to preview-ousd-sparrowdom-spdm1b November 8, 2023 20:32 Abandoned
@sparrowDom sparrowDom temporarily deployed to preview-ousd-sparrowdom-spdm1b November 8, 2023 20:33 Inactive
@sparrowDom sparrowDom merged commit 5b6066c into sparrowDom/balancer-composable-st-pool Nov 8, 2023
8 of 15 checks passed
@sparrowDom sparrowDom deleted the sparrowDom/N-01-gas-inefficiencies branch November 8, 2023 20:34
Copy link
Collaborator

@DanielVF DanielVF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

x

Copy link
Collaborator

@DanielVF DanielVF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somehow I can't mark this as approved - no UI for it.

(Now I understand, it's merged)

@sparrowDom
Copy link
Member Author

Yup I've merged it to submit it to OZ team. Though I probably wouldn't need to be trigger happy with merging

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants