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

Deposit function is taking more assets than needed for the corresponding amount of shares #57

Closed
miguelmtzinf opened this issue Feb 22, 2023 · 0 comments · Fixed by #58
Assignees

Comments

@miguelmtzinf
Copy link
Collaborator

It is possible for the deposit function to pull more assets from the user than needed for the same amount of shares because of rounding issues.
The amount of shares are being calculated on the line 530, but due to rounding issues (previewDeposit is rounding down), the function could make use of more assets than needed.
https://github.com/aave/wrapped-atoken-vault/blob/8374fb5ead3bb67848bfc4cd782035c62bff9da7/src/ATokenVault.sol#L522-L533

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