# Ledger and Reconciliation

**Status: LOCAL SANDBOX.** This guide describes the in-memory SQLite fixture used by `npm run sandbox`; it does not describe custody or blockchain settlement.

## What the ledger records

The ledger is a double-entry projection over Backstop's local simulated state. It records asset-denominated account deltas and transaction evidence, including buyer debits, merchant credits, pool available/reserved balances and the external clearing counterpart. Every transaction's entries must balance to zero. Amounts are integer minor units; the sandbox UI formats `TEST-USD` to two decimals.

Payment settlement and a later approved refund are separate protocol transitions. A refund debits reserved pool coverage and credits the original buyer. It does not debit a merchant account. Merchant transfers are simulator movements to an external test account.

The sandbox fixture uses in-memory SQLite and resets when the process stops. SQLite ledger evidence is not coupled atomically to the separate local EVM vault.

## Reconciliation report

The pool-operator view reads a scoped report; it never mutates balances, reservations, cases or payments. It checks consistency among locally available protocol state, ledger entries, reservations and pool coverage. Interpret statuses conservatively:

| Status | Meaning |
|---|---|
| `PASS` | Checks that were verifiable in this fixture reported no inconsistency |
| `WARNING` | A non-critical discrepancy or limitation is present |
| `FAIL` | A verifiable critical integrity check failed |
| `NOT_VERIFIABLE` | Evidence needed to establish a check is unavailable |

`PASS` is not proof of solvency, custody, provider settlement, external bank/payment status or blockchain finality. A `NOT_VERIFIABLE` report must not be presented as a successful integrity check. Findings require operator investigation; there is no automatic repair.

## Try it

Start with [Sandbox Quickstart](sandbox-quickstart.md), complete a sandbox payment/refund, then inspect the reconciliation workspace as the seeded pool operator.

