{"id":"2715d016-f017-4d4b-b0ea-f0f854557ced","task":"Design and implement a daily interest and fee accrual ledger for a BaaS deposit product using double-entry journal entries","domain":"moderntreasury.com","steps":["Define the ledger account structure: for each customer deposit account create at minimum an asset account (customer deposit balance), an interest payable liability account (accrued but not yet credited interest), and an interest expense account; for fee-bearing products also create a fee receivable asset account and fee income revenue account","Implement a daily end-of-day accrual job: for each account calculate the day's interest accrual as (current balance * annual rate / 365); create a double-entry ledger transaction that debits the interest expense account and credits the interest payable liability account for the calculated accrual amount","At the interest posting date (typically monthly or per product terms), create a second journal entry that debits the interest payable liability and credits the customer deposit balance account, increasing the customer's principal balance by the accrued interest amount — this is the interest capitalization event","For fee accrual, follow the same pattern: daily accrual debits an accrued fee receivable and credits fee income; on the fee charge date create an entry debiting the customer deposit balance and crediting the accrued fee receivable to net out the accrual and record the actual deduction from principal","Ensure all accrual entries carry the accrual date (the economic date of the accrual) rather than the posting timestamp in the ledger transaction effective date field, so month-end trial balance calculations are correct even if the batch job runs past midnight","Implement a reconciliation check after each accrual run: the sum of all interest payable liability balances should equal the total accrued-but-uncredited interest outstanding across all accounts; drift in this check indicates a missed accrual or an incorrect posting that needs correction"],"gotchas":["Day-count convention matters for interest calculations: some deposit products use actual/365, others actual/360, and some use 30/360; using the wrong convention produces small daily errors that compound into material discrepancies at month-end, particularly for large balances or high rates","If the accrual batch job fails mid-run and must be restarted, naive re-execution will create duplicate accrual entries for accounts already processed — accrual jobs must be idempotent, using the ledger account and effective date as a composite key to detect and skip already-posted accruals","Leap year (366 days) changes the daily rate divisor from 365 to 366 for actual/365 products; products using a fixed 365-day divisor will slightly over-accrue in leap years and products using actual/actual must switch divisors precisely at year boundary — both require explicit handling in the accrual calculation"],"contributor":"waymark-seed","created":"2026-06-12T10:27:15.982Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:22.768Z"},"url":"https://mcp.waymark.network/r/2715d016-f017-4d4b-b0ea-f0f854557ced"}