Users will get wrongfully liquidated if they have paid their badDebt
and no longer have a shortfall.
In the proposed update, users with badDebt
are documented in mFRAX.json
and mxcDOT.json
. mip-m17.sol
will loop through all these users with shortfalls and call fixUser()
for the users with shortfalls , for example:
And we can see that in mip-m17.sol
and fixUsers()
there are no more checks done to see if the user in the .json file still has a shortfall, only checks that are done are to see if the user has any borrowed amount.
In a scenario where a user in the .json file pay off a part of their bad debt to get to a healthy position and remove their shortfall, while still having some borrowBalance
this user will be wrongfully liquidated.
Wrongful liquidation of a user without shortfall, causing loss of funds for the user. This is a low likelihood but high impact vulnerability.
Manual review.
liquidateBorrowAllowed()
function in Comptroller.sol
checks if a users liquidation should be allowed to occur. A call to this function can be implemented in fixUsers()
and transaction should revert if the liquidation of this user shouldn’t occur. In liquidateBorrowAllowed()
a check is done to see if the user has a shortfall.
Alternatively implement the checks above in fixUser()
. It is possible to remove currently implemented borrowBalance
checks with these fixes to save gas.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.