# Liquidation does not prioritize lowest LTV tokens

Liquidators can seize the highest-LTV collateral in partial liquidations, lowering the borrower's health factor instead of improving it, enabling repeated liquidation.

- Payout: Contest reward
- Severity: medium
- Program: Interest Rate Model
- Credited: 0x73696d616f
- Disclosed: 2024-04-06
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2024-04-interest-rate-model-judging/issues/155
- Library page: https://bugbountylibrary.com/r/sherlock%3A2024-04-interest-rate-model%3AM-14
- Tags: domain:web3 impact:dos impact:funds-loss kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:source-review vuln:business-logic vuln:liquidation

**Target:** Lending market liquidate() / Auditor health factor accounting
**Root cause:** Health factor uses average risk-adjust factor across all collateral, but liquidate() lets the liquidator pick any seize market without checking the post-liquidation health factor improves.
**Steps:**
1. Set adjust factors: volatile asset 0.3e18, stablecoin 0.9e18 via `auditor.setAdjustFactor`.
2. ALICE deposits 15_000 of both assets, enters both markets, borrows 4000 volatile and 8000 stable.
3. Drop stablecoin price via `daiPriceFeed.setPrice(1e18)` so ALICE is liquidatable.
4. BOB calls `market.liquidate(ALICE, 6000 ether, market)` seizing the high-LTV stablecoin market.
5. Observe health factor after <= before, contradicting expected improvement.
**How found:** Reasoned from the health-factor formula: since borrowing power depends on the average risk-adjust factor, seizing the highest-LTV asset lowers that average, so they built a PoC to confirm HF does not improve.
**Exploitation:** Liquidator repeatedly seizes the highest-LTV collateral market, each partial liquidation failing to restore solvency, allowing repeated liquidations and pushing protocol toward bad debt.
**Insight:** In multi-collateral lending, check that partial liquidation math actually raises the health factor for every allowed seize/repay market pair, not just the average; a liquidator choosing the seize market can game the average risk-adjust factor.
