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 static withdraw #205

Merged
merged 2 commits into from
Oct 16, 2023
Merged

Fix static withdraw #205

merged 2 commits into from
Oct 16, 2023

Conversation

MerlinEgalite
Copy link
Contributor

Indeed there was a bug

Fixes #203

@MerlinEgalite MerlinEgalite requested review from a team, Rubilmax and Jean-Grimal and removed request for a team October 13, 2023 15:06
@@ -169,4 +169,34 @@ contract InternalTest is Test, MetaMorpho {

assertEq(withdrawable, expectedWithdrawable, "withdrawable");
}

function testStaticWithdraw(uint256 suppliedAmount, uint256 amountBorrowed, uint256 assets) public {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe we should do those tests on several markets

@Jean-Grimal
Copy link
Contributor

Oh yes that's the bug I spotted on withdraw while writing BTT. I forgot to fix it in static withdraw as well

@Rubilmax
Copy link
Contributor

Rubilmax commented Oct 16, 2023

Oh yes that's the bug I spotted on withdraw while writing BTT. I forgot to fix it in static withdraw as well

Are you referring to #142?
Because it's not similar (and thought so as well at first sight)

test/forge/InternalTest.sol Outdated Show resolved Hide resolved
@MerlinEgalite MerlinEgalite merged commit 673b09e into main Oct 16, 2023
6 checks passed
@MerlinEgalite MerlinEgalite deleted the fix/withdraw-static branch October 16, 2023 10:13
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.

Underflow in _staticWithdrawMorpho
3 participants