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

Redundant healthy position check #1115

Open
codehawks-bot opened this issue Aug 5, 2023 · 0 comments
Open

Redundant healthy position check #1115

codehawks-bot opened this issue Aug 5, 2023 · 0 comments

Comments

@codehawks-bot
Copy link

Redundant healthy position check

Severity

Medium Risk

Summary

liquidate() function can revert when shouldn't.

Vulnerability Details

liquidate() function has a msg.sender's healthy position check at the end of the execution. However, it shouldn't be there as the msg.sender's position has no relation to the liquidated one. Hence, the liquidation can revert when shouldn't. Also, the person that has such an issue can borrow such amount of assets to make the position liquidatable, transfer them to another wallet and call the liquidate() there and it won't revert.

Impact

The liquidation transaction can revert when not expected.

Tools Used

Manually

Recommendations

Remove this check.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants