Healthy accounts can be liquidated unfairly, leading to a loss of funds to the user.
The function's logic aims to prevent a scenario where a batch of liquidations revert because one of the accounts in the liquidation batch was healthy. However, this can lead to a situation where a healthy account is liquidated unfairly. If the account's position is healthy, and the contract continues execution without reverting , the healthy account's position will be liquidated.
LiquidationBranch.sol#L146-#L148
Assume there is one account in the liquidator list in the array of accounts to be liquidated.
The account is healthy so TradingAccount.isLiquidatable(requiredMaintenanceMarginUsdX18, ctx.marginBalanceUsdX18)
is false.
The function continues execution instead of reverting and the healthy account's position gets liquidated.
Healthy accounts can be liquidated unfairly, leading to a loss of funds to the user.
Manual Review
The protocol should do a returnn if the account to liquidate is healthy.
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.