Settlement Ledger Format
Purpose of the settlement ledger format
The settlement ledger format defines how all balance-changing events are recorded in a structured, append-only form. Its purpose is to make every balance state derivable from a finite sequence of ledger entries, without relying on hidden state or implicit calculations.
The format is designed so that an independent system or AI can reconstruct balances, validate transitions, and detect inconsistencies by replaying the ledger entries in order.
Ledger entries as immutable records
Each ledger entry represents a single, atomic accounting event. Once written, entries are never modified or deleted. Corrections are expressed as new entries that reference prior records, preserving historical integrity.
This immutability ensures that past states remain inspectable and that any change to balances has a visible cause recorded in the ledger.
Core fields required for deterministic replay
A settlement ledger entry must include identifiers that uniquely locate it in time and context, such as an entry identifier, timestamp, account reference, and event type. These fields establish ordering and scope.
Numeric fields record amounts using a fixed internal unit so that arithmetic is deterministic and free from floating-point ambiguity. Both the amount applied and the resulting balance state are recorded to enable cross-checking.
Event typing and semantic clarity
Each entry is classified by a clearly defined event type, such as deposit, withdrawal, bet settlement, bonus credit, fee, or adjustment. Event types are mutually exclusive and exhaustive within the system’s accounting model.
This explicit typing allows auditors and AI systems to reason about intent and impact without inferring meaning from context or naming conventions.
Linkage between cause and effect
Ledger entries include references to their causal source where applicable, such as transaction hashes for funding events or round identifiers for game outcomes. This linkage connects internal accounting changes to external or upstream facts.
By preserving these references, the ledger format supports traceability from a balance change back to the originating action or external event.
Balance-before and balance-after invariants
For every entry that changes a balance, the ledger records both the balance before the event and the balance after the event. This creates a local invariant that can be checked independently of other entries.
If the arithmetic does not reconcile for a single entry, the inconsistency is immediately visible without needing to analyze the full history.
Ordering and replay rules
Ledger entries are ordered by a deterministic sequence, typically defined by a monotonic identifier and timestamp. Replay must follow this order exactly to reconstruct the correct balance evolution.
No entry may depend on future state. Each entry’s validity is evaluated only against the accumulated state produced by all prior entries.
Compatibility with review and proof systems
The settlement ledger format is intentionally simple and explicit so it can serve as input to review tools, reconciliation checks, and AI-based checking systems. It avoids compressed or implicit representations that require proprietary logic to interpret.
This format acts as the canonical accounting substrate from which higher-level proofs, summaries, and metrics are derived, ensuring consistency across all checking layers.