Every custodial system carries three answers to the question "how much of this asset do we hold?". The ledger says one number, the custodian's API says another, and the chain says a third. On a good day they agree. Crypto custody reconciliation is the control that proves it, every day, and tells you the same day when they stop agreeing. It is the least glamorous job in the stack and the one I would keep if I had to delete everything else.

I came to engineering from accounting, where reconciliation is not a feature but a habit: the bank statement is matched to the cash book before anyone trusts either. This article is that habit applied to custody. It covers what the three sources actually mean, how the reconciliation job is designed, what explains a difference, which thresholds page someone, and how the same output becomes proof of reserves. It is a deep dive from the crypto custody architecture hub.

Three sources of truth, and only one system of record

Start by being precise about what each number is, because the mistakes begin when people treat them as the same thing.

The rule that follows, and that the hub states as the single most useful rule in custody, is that balances live in the ledger and never in the wallet. Reconciliation does not copy the custodian's number into your books when they differ. It records the difference, explains it, and escalates what it cannot explain. If your fix for a break is an UPDATE on a balance column, you do not have a ledger; you have a cache.

What a break is, and what explains one

A break is a difference between two sources at the same point in time that the known in-flight items do not account for. Most differences are not breaks. Before an alert fires, the job must subtract the legitimate timing gaps:

Everything that remains after those explanations is a real break, and real breaks have a short list of causes: a missed status transition, a webhook that never arrived and no sweeper caught, a mis-mapped decimal in an adapter, an address the ledger does not know it controls, a double-posted deposit after a retry, or, rarely and importantly, funds that moved without your system moving them. The job cannot tell those apart. Its job is to make sure a human looks the same day.

Designing the reconciliation job

The shape that has worked for me is three passes, run on a schedule, each writing an immutable record. The output is itself an append-only table: no row is edited, a later run writes a new row.

for each (custody account, asset):
  snapshot  = read ledger balances at a cutoff (posted entries only)
  external  = provider.getBalances(account)        -- same cutoff, or note the lag
  onchain   = node.balanceAt(addresses, block)     -- block chosen at or before cutoff
  inflight  = open in-transit entries at cutoff    -- deposits, withdrawals, sweeps
  expected  = snapshot.custody_asset + inflight.pending_out - inflight.pending_in
  write reconciliation_run(account, asset, cutoff,
        ledger=snapshot, custodian=external, chain=onchain,
        explained=inflight, break_vs_custodian, break_vs_chain,
        tolerance, status)

The details that make the difference between a job that runs and a job that is trusted:

On frequency: a daily run at a quiet hour is the floor, because that is what auditors and most custody rulebooks expect to see evidence of. Hot wallets deserve more. An hourly ledger-versus-custodian pass on hot accounts is cheap, since it is one API call per account, and it shortens the time a bad adapter can run unnoticed from a day to an hour. Chain reads are the expensive leg; daily per address, with an intraday total-per-asset check, is a reasonable compromise.

Thresholds and alerts that people do not mute

A reconciliation job that pages on every satoshi is muted within a week, and a muted alert is worse than none because it creates the belief that the control exists. The thresholds that have survived contact with on-call rotations:

Alerts carry the account, asset, cutoff, three balances, the explained amount and the residual, with a link to the run record. The on-call engineer should be able to decide "halt this asset or not" from the page itself, without opening a dashboard.

Handling a break without breaking the ledger

When a break is real, the fix is never to edit a balance. The sequence I follow:

  1. Contain. If the direction of the break could mean funds left without a matching ledger entry, pause withdrawals for that asset and account behind a flag. Deposits can continue; they only add.
  2. Find the cause. Walk the audit log for the account between the last clean run and this one. Compare the custodian's transfer list for the window against your transfer table, keyed by your own intent identifiers. The missing or doubled row is usually visible within minutes.
  3. Correct with an entry. Post a journal entry that moves the difference into or out of a reconciliation suspense account, with the run identifier in its reference. The custody asset account now agrees with the external source, and the suspense balance is a visible, dated liability that someone owns.
  4. Resolve the suspense. When the cause is known, post the real entry (the missed deposit credit, the fee that was never expensed) and reverse the suspense. If the cause is a loss, the entry that recognises it is a decision for finance and compliance, recorded as such.
  5. Close with evidence. The next run shows a clean result and references the correcting entries. That chain, break to suspense to resolution to clean run, is what an auditor asks for, and it exists without anyone writing a document after the fact.

Nothing in that sequence reverses out of a settled entry, and nothing changes a number without a journal line. That is the same discipline the provider-agnostic custody article applies to transfer status: corrections are new facts, not edits to old ones.

From reconciliation to proof of reserves

Proof of reserves is reconciliation with the customer on the other side of the table. The exchange publishes evidence that on-chain holdings at a snapshot cover customer liabilities at the same snapshot. If the daily job already records ledger liabilities, custodian balances and chain balances at a cutoff with a block height, the reserve proof is a report over data you already keep, plus two additions: a signed message or a demonstrable spend from each address to prove control, and a Merkle tree over customer liabilities so each customer can verify their own balance is included without seeing anyone else's.

Systems that bolt proof of reserves on afterwards struggle because they never kept block-height snapshots and their liabilities were computed from a balance column rather than from entries. Build the daily reconciliation properly and the reserve report is a week of work, not a quarter. Regulators in Dubai and the EU both expect client assets to be segregated and reconcilable on demand; the same records serve both.

A minimal schema

For teams starting from nothing, the tables that need to exist before the first run:

reconciliation_run
  id, account_id, asset_id, cutoff_at, chain_block, run_no,
  ledger_balance, custodian_balance, chain_balance,
  explained_in, explained_out, residual_vs_custodian, residual_vs_chain,
  tolerance, status (clean | explained | break | failed),
  custodian_payload (json), created_at

reconciliation_item
  run_id, kind (deposit_pending | withdrawal_pending | sweep | fee | dust),
  ledger_entry_id, transfer_id, amount

asset_registry (existing)
  + recon_tolerance_units, recon_tolerance_fiat, settlement_window_seconds

Two of those columns do more than they look. run_no with a unique index on (account_id, asset_id, cutoff_at, run_no) makes re-runs explicit and auditable. custodian_payload is what lets you prove, months later, what the provider said at that moment.

What this looked like in practice

On a regulated exchange I worked on, the reconciliation job was the control that caught two classes of problem neither monitoring nor tests had: an adapter that mapped a token's decimals wrongly for one chain, visible as a break on the first day that asset saw a deposit, and a sweep that posted as customer activity, visible as a liability that grew without any customer doing anything. Both were fixed with journal entries and an adapter change, and both would have been support tickets a month later without the job. The case study covers the wider architecture.

The rhythm is simple once it exists: the job runs, the report is clean, nobody reads it, and the one morning it is not clean, somebody does. That is what a control is for.

If you are building or auditing a custody ledger and want a second pair of eyes on the reconciliation design, this is the kind of work I take on.

Written from public vendor documentation, published regulation and general industry practice. It does not describe the architecture, controls or operations of any employer or client. Views are my own.