What is deterministic accounting software?
The traditional model is imperative: someone posts each journal entry by hand, and the ledger is those stored rows. Deterministic accounting flips that — you declare the inputs and the rules, and the ledger is derived from them. You never hand-edit a row; you change an input or a rule and regenerate the whole thing. The piece doing the deriving is a generator, a pure function from immutable inputs to a full double-entry ledger.
function generateLedger(inputs: Input[]): LedgerRow[] {
const rows: LedgerRow[] = []
for (const input of inputs) {
rows.push(...rulesFor(input).map((rule) => rule.apply(input)))
}
return rows
}The work is in the declaration
Moving an asset across chains should net to nothing, but the generator can only see that if the two chain-local assets are declared equivalent. Miss the entry and the outbound leg books as a disposal, the inbound as a fresh acquisition at market value, and nothing objects. Double-entry catches a whole class of error for free — value cannot appear or vanish without the other leg — which is precisely why every error that survives it balances perfectly. The declaration is where the domain knowledge lives, and it is the thing that has to be maintained.
Why provenance is the mitigation
Every row carries the input and the rule that produced it, so a number that looks wrong resolves to a specific rule that was missing or mis-stated, rather than to a search through rows for the one somebody edited. You fix the declaration and regenerate; you never patch the output.
Scenarios come free
Because the ledger is a function of its inputs and rules, changing a rule is a scenario rather than a migration. A different cost-basis method, or a treatment you are not yet sure about, is a second run and a diff — two ledgers from the same events, compared, rather than one book edited into a new shape.
| On-chain event | Debit | Credit |
|---|---|---|
| deposit 2 ETH | ETH (asset) | Capital |
| buy 1 ETH @ $3,000 | ETH (asset) | USD (asset) |
| sell 1 ETH @ $3,400 | USD (asset) | ETH + Gain |
Deriving the ledger is half of it. How it changes once derived — corrections appended beside mistakes rather than overwriting them — is the immutable ledger.