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

Document external contracts requirements #414

Merged
merged 8 commits into from
Aug 25, 2023

Conversation

MathisGD
Copy link
Contributor

Fixes #125

@MathisGD MathisGD requested review from a team August 22, 2023 11:42
@MathisGD MathisGD self-assigned this Aug 22, 2023
@MathisGD MathisGD requested review from Rubilmax, MerlinEgalite, pakim249CAL, Jean-Grimal, makcandrov, QGarchery and peyha and removed request for a team August 22, 2023 11:42
Rubilmax
Rubilmax previously approved these changes Aug 22, 2023
src/interfaces/IMorpho.sol Outdated Show resolved Hide resolved
src/interfaces/IMorpho.sol Outdated Show resolved Hide resolved
Jean-Grimal
Jean-Grimal previously approved these changes Aug 22, 2023
src/interfaces/IMorpho.sol Outdated Show resolved Hide resolved
Signed-off-by: Merlin Egalite <[email protected]>
MerlinEgalite
MerlinEgalite previously approved these changes Aug 22, 2023
Jean-Grimal
Jean-Grimal previously approved these changes Aug 22, 2023
src/interfaces/IMorpho.sol Outdated Show resolved Hide resolved
src/interfaces/IMorpho.sol Show resolved Hide resolved
src/interfaces/IMorpho.sol Outdated Show resolved Hide resolved
src/interfaces/IMorpho.sol Outdated Show resolved Hide resolved
Copy link
Contributor

@QGarchery QGarchery left a 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 🎉

src/interfaces/IMorpho.sol Outdated Show resolved Hide resolved
src/interfaces/IMorpho.sol Outdated Show resolved Hide resolved
src/interfaces/IMorpho.sol Outdated Show resolved Hide resolved
src/interfaces/IMorpho.sol Outdated Show resolved Hide resolved
Copy link
Contributor

@QGarchery QGarchery left a 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

@MathisGD MathisGD linked an issue Aug 23, 2023 that may be closed by this pull request
5 tasks
@MathisGD
Copy link
Contributor Author

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

@QGarchery
Copy link
Contributor

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

MerlinEgalite
MerlinEgalite previously approved these changes Aug 25, 2023
QGarchery
QGarchery previously approved these changes Aug 25, 2023
src/interfaces/IMorpho.sol Outdated Show resolved Hide resolved
src/interfaces/IMorpho.sol Outdated Show resolved Hide resolved
src/interfaces/IMorpho.sol Outdated Show resolved Hide resolved
src/interfaces/IMorpho.sol Outdated Show resolved Hide resolved
Jean-Grimal
Jean-Grimal previously approved these changes Aug 25, 2023
pakim249CAL
pakim249CAL previously approved these changes Aug 25, 2023
Co-authored-by: Romain Milon <[email protected]>
Signed-off-by: MathisGD <[email protected]>
@MathisGD MathisGD merged commit cd1e467 into main Aug 25, 2023
4 checks passed
@MathisGD MathisGD deleted the docs/external-contracts-requirements branch August 25, 2023 21:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
6 participants