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

refactor: move condition shares calculation and save gas #353

Merged
merged 1 commit into from
May 18, 2021
Merged

refactor: move condition shares calculation and save gas #353

merged 1 commit into from
May 18, 2021

Conversation

t4sk
Copy link
Contributor

@t4sk t4sk commented May 18, 2021

https://github.com/yearn/yearn-vaults/blob/master/contracts/Vault.vy#L1044
https://github.com/yearn/yearn-vaults/blob/master/contracts/Vault.vy#L1089-L1090

this condition does not change unless tokens are withdrawn from strategies, so move the code to where it can possibly be true.

@ghost
Copy link

ghost commented May 18, 2021

@fubuloubu that seems right.

@ghost ghost requested a review from fubuloubu May 18, 2021 07:11
@fubuloubu fubuloubu merged commit cc691c4 into yearn:master May 18, 2021
ghost pushed a commit to Grandthrax/yearn-vaults that referenced this pull request May 19, 2021
orbxball pushed a commit to orbxball/yearn-vaults that referenced this pull request Aug 8, 2021
sambacha pushed a commit to sambacha/yearn-vaults that referenced this pull request Sep 7, 2021
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.

2 participants