A lending ledger is distinct because it tracks Time. Unlike a payments ledger where a transaction is instantaneous, a loan is a long-running contract. The ledger must implement an Amortization Engine that automatically accrues interest daily and splits incoming repayments between Principal, Interest, and Fees according to a specific hierarchy (the "Waterfall").
The Waterfall Repayment Logic
When a borrower pays $500, how is it applied?
Fees First: Pay off any Late Fees ($50). Remaining: $450.
Interest Second: Pay off accrued interest ($100). Remaining: $350.
Principal Last: Reduce the loan balance by $350.
Impact: If the logic is wrong and Principal is paid first, the lender loses compounded interest revenue. The ledger must enforce this sequence strictly.
Loan States and DPD (Days Past Due)
The loan entity moves through a lifecycle:
Current: Paid on time.
Grace_Period: Due date passed, no penalty yet.
Delinquent (DPD 1-30): Late fee applied.
Default (DPD 90+): Loan is written off.
Write-Off Logic: When a loan defaults, the ledger must credit the Loan_Asset (removing it) and debit Bad_Debt_Expense. It stops accruing interest to avoid inflating revenue with phantom money.