-
Notifications
You must be signed in to change notification settings - Fork 80
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
N-01 Gas Inefficiencies #1919
Conversation
Codecov Report
@@ 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! |
contracts/contracts/strategies/balancer/BalancerMetaPoolStrategy.sol
Outdated
Show resolved
Hide resolved
…/N-01-gas-inefficiencies
5b6066c
into
sparrowDom/balancer-composable-st-pool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x
There was a problem hiding this 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)
Yup I've merged it to submit it to OZ team. Though I probably wouldn't need to be trigger happy with merging |
Audit notes:
withdrawAll
, functions the storage arraypoolAssets
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.
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.