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

fix: revert on reallocate if cap == 0 #231

Merged
merged 6 commits into from
Oct 20, 2023
Merged

Conversation

Jean-Grimal
Copy link
Contributor

Fixes #218

src/MetaMorpho.sol Outdated Show resolved Hide resolved
Copy link
Contributor

@MerlinEgalite MerlinEgalite left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could add several markets and just one of them has no cap?

test/forge/ReallocateWithdrawTest.sol Show resolved Hide resolved
src/MetaMorpho.sol Outdated Show resolved Hide resolved
@MerlinEgalite
Copy link
Contributor

This PR need to be updated I think

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.

Very clean !

At first I thought we could do something similar to what is done in _supplyMorpho, but this is actually better, and it costs almost nothing to do this check 🔥

@MerlinEgalite MerlinEgalite merged commit 083e20c into main Oct 20, 2023
6 checks passed
@MerlinEgalite MerlinEgalite deleted the fix/check-cap-reallocate branch October 20, 2023 10:14
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 this pull request may close these issues.

[protocol review] Pre-checking caps in reallocate supply loop
4 participants