Problem
There is no mechanism to detect or process loan
defaults. If a learner stops paying, the loan
stays Active forever. Sponsors never recover their
locked funds. The protocol has no loss management.
What To Build
- Add check_default(env, loan_id) to creditline
- Add can_default(env, loan_id) view function
- Add LOANDEFAULTED event to events.rs
- Update liquidity pool liquidate_funds()
- Write comprehensive tests
Files To Touch
- contracts/creditline-contract/src/lib.rs
- contracts/creditline-contract/src/events.rs
- contracts/creditline-contract/src/errors.rs
- contracts/liquidity-pool-contract/src/lib.rs
- contracts/creditline-contract/src/tests.rs
Acceptance Criteria
Mandatory Checks Before PR
Problem
There is no mechanism to detect or process loan
defaults. If a learner stops paying, the loan
stays Active forever. Sponsors never recover their
locked funds. The protocol has no loss management.
What To Build
Files To Touch
Acceptance Criteria
Mandatory Checks Before PR