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(liquidate): convert amountOut to assets when comparing to assets (c4 issue 427) #6

Merged
merged 3 commits into from
Aug 15, 2023

Conversation

PierrickGT
Copy link
Contributor

@PierrickGT PierrickGT commented Aug 2, 2023

src/Vault.sol Outdated
if (_amountOut == 0) revert LiquidationAmountOutZero();

uint256 _amountOutToAssets = _convertToAssets(_amountOut, Math.Rounding.Down);
Copy link
Contributor

Choose a reason for hiding this comment

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

suggest renaming this to _assetAmountOut for clarity

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done: 2669cc6

@asselstine asselstine merged commit 184f7c3 into main Aug 15, 2023
1 of 2 checks passed
@asselstine asselstine deleted the pierrick/gen-310-c4-issue-427 branch August 15, 2023 02:57
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.

2 participants