# Liquidators Must Supply Collateral Asset Before Redeeming Seized Rewards

Liquidators who never supplied the seized collateral asset have it missing from userSuppliedAssets, so redeem computes zero collateral and reverts, trapping seized rewards.

- Payout: Audit contest
- Severity: medium
- Program: Lend Audit Contest
- Found by: Brene
- Disclosed: 2025-05-22
- Write-up quality: 6/10
- Original: https://github.com/sherlock-audit/2025-05-lend-audit-contest-judging/issues/905
- Library page: https://bugbountylibrary.com/r/sherlock%3A2025-05-lend-audit-contest%3AM-9
- Tags: area:web3 domain:web3 impact:dos kind:contest platform:sherlock sev:medium tech:evm tech:solidity technique:source-review vuln:business-logic

**Target:** CoreRouter.liquidateSeizeUpdate / LendStorage.getHypotheticalAccountLiquidityCollateral
**Root cause:** liquidateSeizeUpdate updates totalInvestment for the liquidator but never calls addUserSuppliedAsset, so the seized lToken is absent from userSuppliedAssets. getHypotheticalAccountLiquidityCollateral iterates userSuppliedAssets, yielding zero collateral while redeemTokens adds to borrow effects.
**Steps:**
1. Liquidator with no prior supply of lTokenA calls `coreRouterA.liquidateBorrow(borrower, repayAmount, lTokenA, tokenB)`.
2. Seizure updates `totalInvestment(liquidator, lTokenA)` but `getUserSuppliedAssets(liquidator)` stays empty.
3. Call `getHypotheticalAccountLiquidityCollateral(liquidator, lTokenA, seizeRewards, 0)` returns collateral=0, borrowed>0.
4. Call `coreRouterA.redeem(seizeRewards, lTokenA)` reverts with `Insufficient liquidity`.
5. Liquidator must first `_supplyA(liquidator, amount, 0)` to register the asset, then redeem succeeds.
**How found:** Code review of liquidateSeizeUpdate noting totalInvestment is updated but the supplied-assets registry is not, then tracing redeem's liquidity check through getHypotheticalAccountLiquidityCollateral which only iterates userSuppliedAssets.
**Insight:** When a protocol tracks positions via an enumerable asset list separate from per-asset balance mappings, any path that credits a balance (seizure, reward, transfer-in) without registering the asset in the list will silently zero out that collateral in liquidity math; grep for balance-mapping writes lacking the corresponding list-add.

## Proof of concept (copied exactly from the original report)

**Forge command to run the PoC test**

```
forge test --mt test_liquidator_must_supply_tokens_to_redeem_reward -vvvv
```

