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

Feat/repay withdraw all gas cost #184

Closed

Conversation

Rubilmax
Copy link
Collaborator

@Rubilmax Rubilmax commented Jul 26, 2023

The gas cost of a withdrawAll in this case is:
image

In other words, it saves almost 3k gas (~4%) to have a withdrawAll mechanism inside Blue

Note that the benefit of #183 is that amount needs to be calculated upfront by the integrator, which allows them to also have access to it afterwards. To have similar usecases, I use balanceOf to calculate the amount actually withdrawn. Gas savings can be up to 4.5k if a return value is added to withdraw, just like in #181 (gas diff showcased in #185).

Rubilmax and others added 29 commits July 11, 2023 14:37
feat(extsload): expose generic storage getter
@Rubilmax Rubilmax mentioned this pull request Jul 31, 2023
@Rubilmax Rubilmax self-assigned this Jul 31, 2023
@MathisGD MathisGD mentioned this pull request Aug 2, 2023
@Rubilmax Rubilmax deleted the feat/repay-withdraw-all-gas-cost branch August 28, 2023 13:18
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