Skip to content

liquidate does not transfer collateral to liquidator or repay pool #21

Description

@Escelit

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:

  1. Open a loan for 60 000 USDC against a property worth 100 000.
  2. Drop the property valuation to 70 000 (LTV > 80 %).
  3. Call liquidate().
  4. 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

Metadata

Metadata

Assignees

Labels

bugSomething isn't workinghelp wantedExtra attention is needed

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions