-
Notifications
You must be signed in to change notification settings - Fork 46
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
Document external contracts requirements #414
Conversation
ef72847
Signed-off-by: Merlin Egalite <[email protected]>
632094f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few small changes but it sounds good now 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually it's missing the requirement on the total supply of the token. This one is easy to check and the limit could very well be reached depending on what new tokens decide to use for their decimals
isn't this enough https://github.com/morpho-labs/morpho-blue/blob/47a06190760c8ae321cc6116bcd8f38afbcc0b61/src/interfaces/IMorpho.sol#L123 |
I don't think it's enough because the requirement is needed for every computation, not just when entering a position. For example, it can happen that interest accumulated make so that the amount that you are owed increases and that now the funds are stuck. Another example is if the total amount changes, and now the bigger positions revert but not smaller ones |
Co-authored-by: Romain Milon <[email protected]> Signed-off-by: MathisGD <[email protected]>
f01e08b
Fixes #125