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

call to maxDeposit could be avoided #378

Closed
MathisGD opened this issue Nov 28, 2023 · 0 comments · Fixed by #379
Closed

call to maxDeposit could be avoided #378

MathisGD opened this issue Nov 28, 2023 · 0 comments · Fixed by #379

Comments

@MathisGD
Copy link
Contributor

on any erc4626 deposit, the bundlers calls the maxdeposit function of the 4626.

assets = Math.min(assets, IERC4626(vault).maxDeposit(receiver));

I don't think that it's useful, depositing the maximum depositable is super super niche to my knowledge. But it costs a lot: for example for a mm deposit, we waste ~50k gas. I'm in favor of removing it.

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 a pull request may close this issue.

1 participant