Submitted by cmichel
The LendingPair.liquidateAccount function tries to pay out underlying supply tokens to the liquidator using _safeTransfer(IERC20(supplyToken), msg.sender, supplyOutput) but theres no reason why there should be enough supplyOutput amount in the contract, the contract only ensures minReserve.
As a result, no liquidations can be performed if all tokens are lent out.
Example: User A supplies 1k$ WETH, User B supplies 1.5k$ DAI and borrows the ~1k$ WETH (only leaves minReserve). The ETH price drops but user B cannot be liquidated as theres not enough WETH in the pool anymore to pay out the liquidator.
Recommend minting LP supply tokens to msg.sender instead, these are the LP supply tokens that were burnt from the borrower. This way the liquidator basically seizes the borrowers LP tokens.
talegift (Wild Credit) confirmed but disagreed with severity:
ghoul-sol (Judge) commented:
