When liquidate() is called on an underwater loan, the function sets loan.status = Liquidated and emits an event — but it never transfers the borrower's collateral to the liquidator, and never credits the repaid amount back to TotalLiquidity. This means the pool permanently loses the loaned funds with no recovery mechanism.
Steps to reproduce:
- Open a loan for 60 000 USDC against a property worth 100 000.
- Drop the property valuation to 70 000 (LTV > 80 %).
- Call
liquidate().
- Check
TotalLiquidity — it remains reduced by the original loan amount.
Expected behaviour:
- Collateral (property ownership or fraction tokens) should be seized and transferred to the liquidator or auction contract.
TotalLiquidity should be restored (minus any bad-debt shortfall).
Labels: bug, contracts, mortgage-pool, high-priority
When
liquidate()is called on an underwater loan, the function setsloan.status = Liquidatedand emits an event — but it never transfers the borrower's collateral to the liquidator, and never credits the repaid amount back toTotalLiquidity. This means the pool permanently loses the loaned funds with no recovery mechanism.Steps to reproduce:
liquidate().TotalLiquidity— it remains reduced by the original loan amount.Expected behaviour:
TotalLiquidityshould be restored (minus any bad-debt shortfall).Labels:
bug,contracts,mortgage-pool,high-priority