Skip to content

Update impairment logic#496

Open
Tapanito wants to merge 1 commit intomasterfrom
tapanito/lending-impairment
Open

Update impairment logic#496
Tapanito wants to merge 1 commit intomasterfrom
tapanito/lending-impairment

Conversation

@Tapanito
Copy link
Copy Markdown
Collaborator

High Level Overview of Change

A broker can "impair" a loan immediately after it is created. Because the minimum grace period is only 60 seconds, the broker can force a default before the borrower has any realistic time to make the first payment. (This issue was reported from the Bug Bounty Program)
The unimpairLoan function currently rewrites sfNextPaymentDueDate to Now + PaymentInterval. Because only the broker can submit LoanManage transactions, a broker colluding with the borrower can repeatedly impair and unimpair an overdue loan to keep pushing the due date forward without recording any payment. This permanently blocks default eligibility and suppresses late-interest and late-fee accrual, leaving the vault and its depositors with an uncollectable exposure.

Our solution:

  • Allow impairing a Loan only when a payment is late (CurrentLedgerTime > NextPaymentDate).
  • Update the Impairment / Unimpairment logic to not change the NextPaymentDueDate.

Context of Change

Type of Change

  • New XLS Draft
  • XLS Update (changes to an existing XLS)
  • XLS Status Change (e.g., Draft → Final, Draft → Stagnant)
  • Process/Meta (changes to CONTRIBUTING.md, XLS-1, templates, etc.)
  • Infrastructure (CI, workflows, scripts, website)
  • Documentation (README updates, typo fixes)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant