Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0
Why this matters
In loan_manager/src/lib.rs liquidate, seized collateral up to total_debt is transferred to the lending pool and apply_debt_recovery reduces the loan's accrued interest/late fee/principal, but total_outstanding is not adjusted on liquidation (unlike repay, check_default, and approve_loan which call adjust_total_outstanding). After liquidation the loan's principal portion remains counted in TotalOutstanding(token), permanently understating available liquidity in approve_loan's pool_balance - total_outstanding check.
Acceptance criteria
Files to touch
Out of scope
- Changing the collateral-to-pool transfer destination
- Bad-debt socialization design
Why this matters
In loan_manager/src/lib.rs liquidate, seized collateral up to total_debt is transferred to the lending pool and apply_debt_recovery reduces the loan's accrued interest/late fee/principal, but total_outstanding is not adjusted on liquidation (unlike repay, check_default, and approve_loan which call adjust_total_outstanding). After liquidation the loan's principal portion remains counted in TotalOutstanding(token), permanently understating available liquidity in approve_loan's pool_balance - total_outstanding check.
Acceptance criteria
Files to touch
Out of scope