Skip to main content

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}/simulate previews 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 eventBatch legsEffect
DisburseWITHDRAWAL: customer DDA -> loan accountDDA down, loan debt up
Principal repaymentWITHDRAWAL: customer DDA -> loan accountDDA down, loan debt down
Interest repaymentWITHDRAWAL: customer DDA -> Interest ReceivedDDA down, income up
Fee at disbursalWITHDRAWAL: loan account -> Upfront Fee Incomeloan down, fee income up
Write-offWITHDRAWAL: loan account -> Principal Write-offloan down, loss recognised

How it fits​

Depends onFor
Bank8:Ledgerthe loan account and every posting - lending never writes a balance
Bank8:Accountinginterest income and fee income land in GL accounts via the projection

Scope surface​

AreaWhat it coversScope family
Productsloan products, template versionsbank8:lending:products:*
Applicationsoriginationbank8:lending:applications:*
Loansaccounts, disbursement, repaymentbank8:lending:loans:*
Schedulesgeneration and revisionsbank8:lending:schedules:*
Collectionsdelinquency, worklistbank8:lending:collections:*
Collateralcollateral and guarantorsbank8: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.