Remove interest calculation and posting logic from go-luca #4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Interest calculation, posting, and application are product-dependent concerns that belong in the product layer (e.g. gobank-products), not in the ledger.
go-luca should provide per-account storage for accrued interest and live balance, but should not own any interest logic.
What to remove
CalculateDailyInterest— computes and posts interestpostInterest— records interest movements (Expense:Interest → account)computeInterest/defaultInterest— calculation logicRunDailyInterest— batch daily interestRunInterestForPeriod— batch period interestEnsureInterestAccounts— creates Expense:Interest / Income:Interest system accountsWhat to keep / expose
InterestAccumulatorfield (get/set) — products use this for sub-unit fraction storageGrossInterestRatefield on Account — products read this for their own calculationBalance,BalanceAt,GetLiveBalance)RecordMovement) — products post their own interest entriesWhy
Different products need different interest models:
Liability:Savings:Alice:Accrual → Expense:Interest)These are all product decisions, not ledger decisions.
Migrated from Codeberg: originally #4, opened 2026-03-25.