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

[OZ: H-03] Incorrect calculations #74

Closed
Robsonsjre opened this issue Oct 16, 2022 · 0 comments · Fixed by #75
Closed

[OZ: H-03] Incorrect calculations #74

Robsonsjre opened this issue Oct 16, 2022 · 0 comments · Fixed by #75

Comments

@Robsonsjre
Copy link
Collaborator

We found the following instances of incorrect calculations in view functions that are not
currently called internally:

  • In the previewWithdraw function, the DENOMINATOR over invertedFee is always bigger than 1 when the fee is non-zero. Hence, the final returned shares are always an
    overestimate. Further, the withdrawFeeRatio is multiplied to shares instead of
    assets as in other instances such as _getFee . Consider correcting the withdrawal
    fee calculation.

  • The calculation in the assetsOf function over-estimates the actual commitment by an
    additional committedAssets . Consider removing the extra component.

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