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

avgBorrowRate uses the unbounded value of newBorrowRate #42

Closed
Rubilmax opened this issue Sep 29, 2023 · 0 comments · Fixed by #54
Closed

avgBorrowRate uses the unbounded value of newBorrowRate #42

Rubilmax opened this issue Sep 29, 2023 · 0 comments · Fixed by #54

Comments

@Rubilmax
Copy link
Contributor

Context

https://github.com/morpho-labs/morpho-blue-irm/blob/8440cb45c70866542330b97db0b8ebc03aec284b/src/SpeedJumpIrm.sol#L152

Issue

avgBorrowRate is calculated using the unbounded value of newBorrowRate, so there may be a case where newBorrowRate > MAX_RATE leading to avgBorrowRate being over-evaluated with regard to the bounded value newBorrowRate returned by _borrowRate
The same applies symmetrically to the minimum bound

@MathisGD MathisGD mentioned this issue Oct 30, 2023
@MerlinEgalite MerlinEgalite linked a pull request Nov 5, 2023 that will close this issue
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.

2 participants