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

No default liquidationThresholdPercent #28

Open
code423n4 opened this issue Apr 7, 2021 · 0 comments
Open

No default liquidationThresholdPercent #28

code423n4 opened this issue Apr 7, 2021 · 0 comments
Labels
2 (Med Risk) bug Something isn't working

Comments

@code423n4
Copy link
Collaborator

Email address

mail@cmichel.io

Handle

@cmichelio

Eth address

0x6823636c2462cfdcD8d33fE53fBCD0EdbE2752ad

Vulnerability details

The IsolatedMarginTrading contract does not define a default liquidationThresholdPercent which means it is set to 0.

The belowMaintenanceThreshold function uses this value and anyone could be liquidated due to 100 * holdings >= liquidationThresholdPercent * loan = 0 being always true.

Impact

Anyone can be liquidated immediately.
If the faulty belowMaintenanceThreshold function is fixed (see other issue), then nobody could be liquidated which is bad as well.

Recommended mitigation steps

Set a default liquidation threshold like in CrossMarginTrading contracts.

@code423n4 code423n4 added 2 (Med Risk) bug Something isn't working labels Apr 7, 2021
code423n4 added a commit that referenced this issue Apr 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 (Med Risk) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant