Formance Ledger is a programmable, double-entry accounting database designed for financial applications. It provides an immutable, tamper-evident transaction log with built-in concurrency control, multi-asset support, and a powerful scripting language (Numscript) for modeling complex money movements.
Getting Started#
Product Ledger vs General Ledger#
| Ledger Type | Purpose |
|---|---|
| General Ledger (GL) | Organizes financial events to produce clarity on the financial position of a business. Typically lives in an ERP (Sage) or GL tool (QuickBooks). |
| Product Ledger | Technological foundation for automated flow of funds. Focuses on scarcity, concurrency, auditability, immutability, and performance. |
Formance Ledger enforces the double-entry transaction model by design — every transaction involves two or more accounts in compensating directions, and balances are derived from an immutable log. It is flexible regarding accounting business rules (account classification, debit/credit conventions), letting you choose how much accounting logic to handle in real-time versus delegating to a GL.
Use Formance as a product ledger. Add basic account classification in your Chart of Accounts to lay a foundation for subsequent data mapping to your GL.
Data Immutability#
Each transaction produces a hash from its data combined with the previous transaction's hash, creating a tamper-evident chain. This ensures the ledger remains a permanent, indelible history of transactions — similar to a blockchain mechanism.
Log hashing can be disabled for performance. See Data isolation with buckets for configuration.
Data Model#
| Resource | Description |
|---|---|
| Accounts | Containers for assets. See Accounts. |
| Transactions | Movements of assets between accounts. See Transactions. |
| Logs | Immutable log entries (NEW_TRANSACTION, SET_METADATA) — the primary source of truth. |
All resources are fully isolated per ledger. Two ledgers can have accounts with the same name without interference.
Single vs Multi-Ledger#
Formance Ledger is multi-ledger — you can operate multiple independent ledgers in a single instance. The choice depends on your application:
- Multi-ledger: better horizontal scaling (write locking is per-ledger), good for multi-tenant apps or high write volume with data segregation
- Single ledger: simpler — no need to manage cross-ledger consistency or check which ledger an account belongs to