xln

XLN External Security Audit Brief

This is the handoff brief for an independent reviewer before any open testnet or mainnet exposure. The goal is not a broad style review. The goal is to prove that runtime consensus, storage recovery, J-layer settlement, transport ingress, and cross-jurisdiction swaps fail closed under adversarial inputs.

Last refreshed: 2026-07-09. Current internal evidence includes green bun run security:audit-pack and green bun run check on 2026-07-09, focused remote-runtime import/switch browser coverage on 2026-07-09, green bun run security:contract-governance, bun run security:consensus-hanko, and bun run security:failure-taxonomy, bun run security:delivery-boundary, bun run security:canonical-identity, bun run security:canonical-fill, and bun run security:swap-cancel-canonical on 2026-07-09, and a green bun run test:all:fast run on 2026-07-08 with scenarios exiting 0 and 95/95 isolated browser shards passing. The required current mainnet evidence is the operator-facing preflight gate plus its one-hour soak. This is handoff evidence only; it is not external audit sign-off.

Scope

Review these surfaces first:

Out of scope unless a scoped issue depends on it:

Main Invariants

Required Commands

The reviewer should run these commands from a clean checkout and include exact versions, commit hash, and logs in the report:

bun run gate:ci
bun run security:contract-governance
bun run security:consensus-hanko
bun run security:failure-taxonomy
bun run security:delivery-boundary
bun run security:canonical-identity
bun run security:canonical-fill
bun run security:swap-cancel-canonical
bun run test:e2e:coverage
bun run test:rpc-settlement
bun run soak:quick
bun run prod:health

Before mainnet approval, also run the full release bar:

bun run gate:release
bun run soak:release
bun run gate:mainnet-preflight
bun run gate:mainnet

The soak release command is deliberately long. gate:mainnet is the current operator-facing mainnet preflight with the one-hour soak enabled. These are operational evidence for restart/load stability, not unit-test substitutes.

High-Risk Files

Known Non-Goals

Known Open Mainnet Blockers

Auditor Deliverables

The final report must include:

The report is not complete if it does not cover storage restore, J-event authentication, cross-j route lifecycle, network ingress, and Lending.