For the complete documentation index, see llms.txt. This page is also available as Markdown.

Audit and Proof

Every event in Brain (ingestion, extraction, query, proposal, policy decision, approval, execution, settlement) emits an audit record into an append-only log. Records form a per-tenant Merkle tree. Tree roots are batched and anchored on-chain through BrainAuditAnchor.

Three Properties This Gives You

πŸ“œ Tenant-verifiable History

A tenant can prove a specific decision occurred at a specific time, based on specific evidence, under a specific policy version.

🀝 Counterparty-verifiable Proofs

A counterparty can verify a payment was authorized without seeing the underlying data, by checking a Merkle proof against an anchored root.

πŸ”’ No Silent Rewrites

Brain itself cannot silently rewrite history. Anchors commit the past state to a public chain.

What Every Audit Event Commits To

Audit events are content-addressed. Each event commits to:

Field
Description

event_type

proposal, policy.evaluated, action.executed, etc

tenant_id

Which tenant generated the event

actor

Human user ID or agent address

timestamp

When the event was recorded

inputs_hash

Hash of Ledger / Wiki / Raw IDs the event depended on

policy_version

The policy version evaluated, if any

decision

The outcome of the event (where applicable)

reason

Structured reason code (where applicable)

prev_event_hash

Forms a per-tenant hash chain

The prev_event_hash field means each event references the one before it, building a chain that breaks if anything is altered.

The Hash Chain in Pictures

Tamper with event_002 and B changes. event_003 still references the old B via its prev=B pointer. The chain breaks. Detection is automatic.

Merkle Batching and on-Chain Anchoring

Events are batched into a per-tenant Merkle tree. Roots are anchored to Base L2 through BrainAuditAnchor.

Property
Value

Anchor cadence

Hourly (default)

Immediate anchoring

On high-severity events (large transfers, new counterparties, policy changes)

Anchor target

BrainAuditAnchor on Base L2

Anchor authority

Brain anchorer key, EIP-712 signed

Reorg tolerance

Anchors reference previous batch; small reorg windows tolerated; off-chain log is canonical until anchored

Pulling a Proof

Counterparties verify Brain audit proofs by checking a Merkle proof against the on-chain anchored root.

To verify, the counterparty:

  1. Reads anchored_root from BrainAuditAnchor.rootAt(tenantId, batchIndex) on Base

  2. Reconstructs the leaf hash from the event data

  3. Walks merkle_path to compute the candidate root

  4. Compares against anchored_root

If they match, the event is provably part of the anchored history. Brain is not a trusted intermediary in this verification. It is just a publisher.

Privacy

On-chain anchors must not leak tenant data.

What's On-Chain
What's Off-Chain

Merkle roots

Event payloads (encrypted at rest)

Hashed tenantId

Raw artifacts

Anchor timestamp

Ledger records, Wiki entities

Anchorer signature

Policy text and compiled rules

Counterparties verifying a proof receive only the specific event(s) the tenant chooses to share, plus the Merkle path. Everything else stays private.

Compliance Exports

The Audit Layer also exposes structured exports for compliance reviews.

Standard
Coverage

SOC 2 Type II

Full event log with provenance

ISO 27001

Access logs, key management events, change records

Financial controls

Approval chains, segregation of duties evidence

A public verifier endpoint is also available for counterparties to verify proofs without a Brain account.

What's Next

πŸ“ Policy

How decisions feed the audit trail.

πŸ“œ BrainAuditAnchor

The on-chain anchor contract.

🌐 Audit API

Pull proofs programmatically.

Last updated