# Accounting Mapping: Classical Double-Entry ↔ Kuatia Kuatia gives double-entry-style safety with a UTXO-style model. The ledger holds value as signed postings. Every committed transfer must satisfy per-asset conservation. The accounting goal is the same as the goal of classical bookkeeping. The mechanical model is different: | Classical double-entry | Kuatia | |---|---| | `Σ debits = Σ credits` | `sum(consumed) == sum(created)` per asset | This page maps classical accounting vocabulary onto Kuatia's types. It also separates the terms that are easy to confuse. See [journaling.md](journaling.md) for a direct description of journaling. That page covers single, compound and multi-asset entries, and the transfer log as the journal. Here is the most important correction. In classical accounting a journal is the append-only book of original entry. A journal entry is one committed accounting event. In Kuatia the closest equivalent of the classical journal is the transfer log. The closest equivalent of a journal entry is a committed `Transfer` or `Envelope`. Kuatia's `Book` is neither. It is a transfer policy scope, not the accounting journal. ## Core mapping | Classical accounting | Kuatia | Notes | |---|---|---| | **Journal** (book of original entry) | **Transfer log**, `TransferStore` of `TransferRecord`s | Append-only, ordered source of truth for committed transfers. | | **Journal entry** (one balanced event) | Committed **`Transfer`** (intent) → **`Envelope`** (resolved) | One atomic accounting event. | | **Compound journal entry** | `Transfer` with multiple `Movement`s | One event that touches many accounts or assets. | | **Entry line / leg** | **`Posting`** effect (often derived from a `Movement`) | A concrete account-level value fragment. A `Movement` is two-sided intent, an amount that moves `from` one account `to` another. It resolves into consumed and created postings, not into a 1:1 debit or credit line. | | **Σ debits = Σ credits** | **Per-asset conservation** `sum(consumed) == sum(created)` | `validate_and_plan` enforces it, and reports `ConservationViolation` otherwise. | | **Ledger** (accounts + running balances) | **Accounts + live postings** | A balance is a projection over the live (unspent) postings. The ledger never stores one. | | **Posting a transaction** (the verb) | **resolve + commit** (`Transfer` → `Envelope` → apply) | A collision that confuses: in Kuatia a *posting* is a noun, a value fragment, not the act of a record. | | **Accounting book** | *no direct equivalent unless modeled separately* | Kuatia `Book` is **not** this. | | **Transfer policy scope** | **`Book`** | Gates which accounts and assets can participate. See [below](#where-book-fits-and-doesnt). | | **Chart of accounts** (accounts grouped by class) | *no equivalent* | An account carries no asset, liability, equity, income or expense dimension. See [accounts carry no accounting class](accounts.md#accounts-carry-no-accounting-class). | > A journal entry is one committed accounting event. Many accounting texts also > call this event a transaction. That word is overloaded in a ledger library: a > database transaction, a business transaction, an atomic transfer. So this > document prefers "committed accounting event". ## A journal entry is multi-account A double-entry entry is multi-account by nature, and that is the entire point. A minimal entry has two legs. A compound entry has more. So a Kuatia transfer that touches many accounts is not a mismatch. It is a compound journal entry. Classical compound journal entry: ``` 2026-06-26 Cash sale of goods Dr Cash ................. 115 Cr Revenue .......... 100 Cr Sales tax payable . 15 ``` The same business effects as a Kuatia transfer, with several movements that commit atomically: ```rust let transfer = TransferBuilder::new() .book(sales_book) .pay(customer, revenue, ("100.00", &usd)) .pay(customer, tax_payable, ("15.00", &usd)) .build()?; // One Transfer → one Envelope → one TransferRecord in the transfer log. ``` > Note: this is not a literal debit and credit translation. It shows the > business effects as movements. In a production POS model, cash, revenue and > tax can be separate effects that pass through system or offset accounts. A > literal multi-hop `customer → cash → revenue` chain inside one transfer needs > a posting that the same envelope created earlier. The resolver does not do > that. It selects from postings that are already committed. Both are one balanced event. In the classical entry, `Σ Dr (115) = Σ Cr (115)`. In Kuatia, the resolved `Envelope` satisfies per-asset conservation: `sum(consumed) == sum(created)` for USD. ## One entry vs the journal: `Transfer`/`Envelope` vs the transfer log These differ in grain: one record against the collection of all records. - `Transfer` / `Envelope` = one record, which is one journal entry. - `Transfer` is the intent: `{ movements: Vec, book, metadata }`. A caller expresses what must happen, not which postings. - `Envelope` is the resolved form that `resolve()` produces: `{ consumes: Vec, creates: Vec, account_snapshots, book, … }`. It names the concrete postings to spend and to create. - A commit through `commit` or `commit_envelope` returns a `Receipt { transfer_id }`. The `TransferId` in it identifies the committed envelope. It is content-addressed: the double-SHA-256 of the canonical envelope bytes. - Transfer log = the accounting journal. It is the append-only, ordered sequence of every committed envelope. `TransferStore` persists it as `TransferRecord { envelope, receipt, created_at }`. Each transfer is one entry in it. > Transfer/Envelope : transfer log :: one journal entry : the journal. A replay of the transfer log audits the whole system. Re-apply every `TransferRecord` in order, and you reconstruct all balances. No stored balance can drift, because there is none. ## Two append-only logs: don't conflate "log" Kuatia keeps two distinct append-only sequences. Only the first one is the accounting journal. | Log | Type | Records | Role | |---|---|---|---| | **Transfer log** | `TransferStore` → `TransferRecord` | Full posting-level detail of each committed transfer | The accounting **journal**, the source of truth for balances. | | **Event log** | `EventStore` → `LedgerEvent` | High-level lifecycle notifications | Projections and subscribers. It is *not* the journal. | `LedgerEvent { seq, timestamp, kind }` carries a monotonic `seq` and a `kind`. The kind is one of `TransferCommitted | AccountCreated | AccountFrozen | AccountUnfrozen | AccountClosed`. An event tells you that something happened. The transfer log tells you exactly which postings moved. ## The UTXO wrinkle A classical ledger posts an entry and changes each account's balance total. Kuatia is UTXO-style and posting-based. So the mechanism differs, and the event grain stays identical. Postings are signed, so debit and credit are not the native primitive. Resolution works with consumed postings and created postings: - In a simple movement, the resolver consumes `Live` postings from the source account. It creates a change posting if the selected postings exceed the amount. - New postings on the destination account represent the destination side. - An account's balance is the sum of its `Live` postings. The ledger computes it on demand and never stores it. So an entry line maps to a `Posting` effect. A `Movement`, which is two-sided intent, usually derives that effect. The movement resolves into one or more postings: a created posting, consumed postings, and possibly change. The balance rule does not change: per asset, `sum(consumed) == sum(created)`. ## Where `Book` fits (and doesn't) `Book` is the one Kuatia concept with no classical counterpart. It is a transfer policy scope. It gates which accounts and assets can participate in a transfer, through `BookPolicy { allowed_assets, allowed_flags, allowed_accounts }`. It is explicitly not: - the journal, which is the transfer log, - a journal entry, which is a `Transfer` or an `Envelope`, - a balance partition, because balances are global and a Book only gates participation, - a tenant boundary, for which see [books are not a tenancy boundary](glossary.md#books-are-not-a-tenancy-boundary). > Despite the name, do not confuse a Kuatia `Book` with an accounting book. The > accounting journal is the transfer log. `Book` is purely a policy scope. See the [glossary](glossary.md#book) for the Book model and worked examples. ## Quick reference | Classical accounting | Kuatia | Notes | |---|---|---| | Journal | Transfer log / `TransferStore` | Append-only source of truth for committed transfers. | | Journal entry | Committed `Transfer` / `Envelope` | One atomic accounting event. | | Entry line / leg | `Posting` effect | A concrete account-level value fragment. A movement is intent that resolves into postings. | | Compound journal entry | `Transfer` with multiple movements | One event that touches many accounts or assets. | | Σ debits = Σ credits | Per-asset conservation | `sum(consumed) == sum(created)` per asset. | | Ledger | Accounts + live postings | A balance is a projection over the live postings. | | Posting a transaction (verb) | Resolve + commit | Avoid the confusion: Kuatia `Posting` is a noun. | | Accounting book | No direct equivalent unless modeled separately | Kuatia `Book` is not this. | | Transfer policy scope | `Book` | Gates the allowed accounts and assets. | | Chart of accounts | No equivalent | An account carries no class. A class lives in metadata or in a user flag bit. | | Proof that a transfer was recorded | `Receipt { transfer_id }` | Content-addressed `TransferId`. | | Lifecycle notifications | Event log (`LedgerEvent`) | Separate from the transfer log. | In one line: Kuatia's transfer log is the accounting journal, and each committed envelope is a journal entry. Kuatia's `Book` is a policy scope. It is not a journal and not a balance partition.