Sherlock is a forensic tool that looks at raw Bitcoin data to find hidden patterns. It helps identify who owns which addresses and how they are spending their money by using "heuristics" (smart guesses based on blockchain behavior).
Note: This project was developed for Summer of Bitcoin and represents an upgraded, high-performance version of the original analysis engine.
🌐 Live Demo: [(https://sherlock-pearl.vercel.app/)
Built for the Week 3 Sherlock Challenge, this engine takes raw Bitcoin block files and transforms them into:
- A CLI Tool: Fast analysis that produces machine-readable data (JSON).
- Markdown Reports: Human-friendly summaries of every block analyzed.
- Web Visualizer: An interactive dashboard to explore transactions visually.
- Forensic Logic: 7 different ways to detect privacy leaks and entity behavior.
Prepares the engine and decompresses the raw Bitcoin data. Run this first.
./setup.shAnalyzes a block file and generates a JSON and Markdown report in the out/ folder.
./cli.sh --block fixtures/blk04330.dat fixtures/rev04330.dat fixtures/xor.datStarts the web dashboard.
./web.shOpen http://localhost:3000 to see the interactive analysis.
We implemented 7 core heuristics to analyze transaction behavior:
- CIOH (Common Input Ownership): The foundational heuristic that assumes multiple inputs in a single transaction belong to the same entity.
- Change Detection: A multi-factor analysis (script matching, round numbers) to identify which output returns funds to the original wallet.
- Address Reuse: Detects when the same address is used as both an input and output, or across multiple blocks, signaling a privacy leak.
- CoinJoin Detection: Identifies privacy-mixing transactions by looking for symmetric output values and high input diversity.
- Consolidation Detection: Finds transactions where many small UTXOs are combined into one, typically for wallet maintenance.
- Peeling Chain Detection: Tracks a large initial deposit as it is "peeled" into small payments and large change outputs over a sequence of blocks.
- OP_RETURN Analysis: Extracts and classifies metadata protocols embedded in the blockchain for non-financial data tracking.
This repository is 100% compliant with the challenge requirements:
- CLI Output: Perfect JSON schema with file-level summaries.
- Markdown Reports: Detailed, committed reports for every block.
- Documentation: Full
APPROACH.mdanddemo.mdincluded. - Automated Grader: 100% PASS on all 1,354 checks.
Created for the Sherlock Blockchain Forensics Challenge.