Back to Tracer

Nemesis Tracing Engine Architecture

Distributed Architecture

The Nemesis Tracing Engine is a high-performance, Multi-Hop, bi-directional blockchain analysis platform built on Cloudflare Workers and Vis.js. It is designed to perform broad recursive sweeps and automatically identify entities, centralized exchanges (CEXs), and victim terminals.

graph TD
    A[Frontend BFS Orchestrator] -->|Dispatch Batch| B(Cloudflare Worker Fleet)
    B -->|Fetch| C{Blockchain APIs}
    B -->|Scrape| D[Browser Rendering API]
    C -->|Edges & Nodes| A
    D -->|Entity Tags & CEX Data| A
    A -->|Render| E[Vis.js Graph Engine]
    A -->|Auto-Forward Trace| A
                

1. Browser-Side BFS Orchestrator

To bypass Cloudflare Worker CPU/time limits (typically 30 seconds), the Breadth-First Search (BFS) orchestration is handled client-side.

  • Queue Management: Browser maintains active queue.
  • Batching: Dispatches batches of 5 addresses.
  • Unlimited Hops: MAX_BATCHES = 99999 for multi-hop sweeps.
  • Auto-Rotation: Automatic rotation across Worker fleet on errors.

2. Cloudflare Worker Backend

The backend serves as a high-speed proxy and coordinator.

  • API Aggregation: Bitquery, Covalent, Etherscan.
  • Trace Coordinator: Durable Object manages distributed state.
  • Migration: SQLite (new_sqlite_classes) for robust storage.

3. OSINT Entity Auto-Resolver

Backend uses Cloudflare Browser Rendering API (env.BROWSER).

  • Scraping: Parses OKLink DOM for entity tags.
  • Extraction: Identifies VASP and CEX terminal names.
  • Auto-Labeling: Returns intelligence to frontend to update nodes.

4. Graph Engine & Visualization

Built on Vis.js with a highly customized renderer.

  • Cryptographic Proofs: OP_RETURN fingerprints on edges.
  • Colors: Red (Suspect), Purple (Victim), Orange (CEX), Blue (Routing).

Execution Workflow: Deep Mass Sweep

1

Seed Initialization

The suspect addresses are injected into the BFS queue.

2

Bi-Directional Query

The orchestrator asks the Worker for both inflows and outflows.

3

Graph Construction

As nodes and edges return, they are rendered instantly via Vis.js.

4

Entity Resolution Hook

Any unclassified node is immediately pushed to the OSINT Auto-Resolver for scraping.

5

Auto-Forward Tracing

If a node resolves to a Suspect or Victim CEX Terminal, the orchestrator triggers a delayed forward-trace (setTimeout(startMassSweep, 2500)) to follow the funds out of the VASP.

6

Clustering & Reporting

Data populates into the Actionable Ledgers and can be exported as JSON or uploaded to an R2 Bucket.