Bank8:Lending - lending as a product line
Loan products with versioned, simulatable amortization templates, origination, disbursement, repayment with rule-driven allocation, daily accrual, delinquency and collections, restructure and write-off - every money movement posted through the ledger.
A loan is a ledger account with tside='ASSET'. Lending owns the
schedule and the lifecycle; the ledger owns the money. That is why a
repayment can never bypass double-entry.
Use cases
Origination
- Loan products as data - a product version carries the term bounds, rate, amortization method, interest method, day count and allocation order. Changing a product is a new version, not a deploy.
- Simulation before commitment -
POST /v1/schedule-templates/{id}/simulatepreviews a schedule with no writes, so a product decision has evidence. - Application state machine - draft -> submitted -> approved/rejected, with the approval actor recorded. A decision is guarded on the current status, so a concurrent approve cannot double-apply.
Servicing
- Schedules that close exactly - the final period absorbs the rounding
residual so
SUM(principal_due) == principal. A schedule that does not close is refused rather than silently drifting by cents across a book. - Repayment with a declared allocation order - penalty, fee, interest, principal by default; the order is product data, so a product that pays fees before interest behaves differently without a code change. An overpayment is reported, never absorbed.
- Daily accrual - one accrual per (loan, date), so a cron retry cannot double-accrue interest and overstate income.
Distress
- Delinquency ladder and collections queue - ageing buckets and a worklist for the officer, with a grace period so a payment on its due date is never late.
- Restructure, write-off and charge-off - all audited and posted. A restructure adds a new schedule revision and supersedes the previous one; history is additive, never deleted.
- Floating-rate repricing - a rate change with an effective date reprices the remaining schedule and posts any adjustment.
Normative posting mapping
The ledger classifies an instruction by type, not by arithmetic. On an asset (loan) account a credit increases outstanding debt, so the mapping below is the only correct one and must not be inverted:
| Business event | Batch legs | Effect |
|---|---|---|
| Disburse | WITHDRAWAL: customer DDA -> loan account | DDA down, loan debt up |
| Principal repayment | WITHDRAWAL: customer DDA -> loan account | DDA down, loan debt down |
| Interest repayment | WITHDRAWAL: customer DDA -> Interest Received | DDA down, income up |
| Fee at disbursal | WITHDRAWAL: loan account -> Upfront Fee Income | loan down, fee income up |
| Write-off | WITHDRAWAL: loan account -> Principal Write-off | loan down, loss recognised |
How it fits
| Depends on | For |
|---|---|
| Bank8:Ledger | the loan account and every posting - lending never writes a balance |
| Bank8:Accounting | interest income and fee income land in GL accounts via the projection |
Scope surface
| Area | What it covers | Scope family |
|---|---|---|
| Products | loan products, template versions | bank8:lending:products:* |
| Applications | origination | bank8:lending:applications:* |
| Loans | accounts, disbursement, repayment | bank8:lending:loans:* |
| Schedules | generation and revisions | bank8:lending:schedules:* |
| Collections | delinquency, worklist | bank8:lending:collections:* |
| Collateral | collateral and guarantors | bank8:lending:collateral:* |
Further reading
DESIGN.md- architecture, schema and the amortization engine.BUSINESS.md- business requirements and the product narrative.SECURITY.md- threat model and the isolation guarantees.