A scalable, open-source tool for clustering and de-anonymizing transaction patterns on public blockchains (Bitcoin and Ethereum). This project combines advanced graph analytics, machine learning, and blockchain analysis to trace cryptocurrency flows and identify entities behind pseudonymous addresses.
This project represents a comprehensive exploration of blockchain forensics, privacy analysis, and entity resolution in decentralized systems.
While blockchain technology promises transparency, the pseudonymous nature of cryptocurrency addresses creates challenges for:
- Law enforcement investigating illicit activities
- Researchers studying transaction patterns and network effects
- Compliance officers ensuring regulatory adherence
- Users understanding privacy implications of blockchain transactions
This tool addresses these challenges by implementing state-of-the-art clustering algorithms and heuristics to link related addresses and identify real-world entities.
- Clustering Effectiveness: How accurately can we cluster blockchain addresses belonging to the same entity using various heuristics?
- Cross-chain Analysis: Can transaction patterns be traced across different blockchains?
- Privacy Implications: What privacy vulnerabilities exist in current blockchain implementations?
- Scalability: How can forensics tools scale to analyze billions of transactions efficiently?
-
Multi-Blockchain Support
- Bitcoin transaction analysis
- Ethereum transaction and smart contract analysis
- Extensible architecture for additional blockchains
-
Advanced Clustering Algorithms
- Common Input Ownership Heuristic (CIOH)
- Change Address Detection
- Behavior-based clustering
- Machine learning-enhanced entity resolution
-
Transaction Graph Analysis
- Graph database integration for efficient querying
- Path tracing between addresses
- Community detection algorithms
- Temporal pattern analysis
-
De-anonymization Techniques
- Exchange deposit/withdrawal pattern matching
- Address tagging with known entities
- Network topology analysis
- Cross-referencing with public data sources
-
Visualization and Reporting
- Interactive transaction flow diagrams
- Entity relationship maps
- Statistical reports and metrics
- Export capabilities for further analysis
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β User Interface Layer β
β (CLI, Web Dashboard, API Endpoints) β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β Analysis Engine β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β Clustering β β ML Models β β Heuristics β β
β β Algorithms β β & Features β β Engine β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β Data Processing Layer β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β Transaction β β Address β β Entity β β
β β Parser β β Indexer β β Resolver β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β Data Storage & Indexing β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β Graph DB β β Time-Series β β Cache β β
β β (Neo4j) β β DB β β (Redis) β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
ββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ
β
ββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ
β Blockchain Data Sources β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β Bitcoin β β Ethereum β β Public β β
β β Node/API β β Node/API β β Datasets β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
- Language: Python 3.8+
- Blockchain Interaction:
- Bitcoin:
bitcoinlib,bitcoin-rpc - Ethereum:
web3.py,eth-brownie
- Bitcoin:
- Graph Database: Neo4j for relationship storage and querying
- Data Processing: Pandas, NumPy, Apache Spark (for large-scale processing)
- Machine Learning: scikit-learn, TensorFlow/PyTorch
- Visualization: Plotly, NetworkX, D3.js
- API Framework: FastAPI
- Testing: pytest, unittest
# Python 3.8 or higher
python --version
# Neo4j (optional, for graph storage)
# Install from: https://neo4j.com/download/
# Bitcoin/Ethereum node or API access# Clone the repository
git clone https://github.com/rohteemie/Open-Source-Blockchain-Forensics.git
cd Open-Source-Blockchain-Forensics
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment variables
cp .env.example .env
# Edit .env with your blockchain node URLs and API keys
# Initialize database
python scripts/init_db.py
# Run tests
pytest tests/from blockchain_forensics import BitcoinAnalyzer, AddressClusterer
# Initialize analyzer
analyzer = BitcoinAnalyzer(api_key="your_api_key")
# Fetch transactions for an address
transactions = analyzer.get_transactions("1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa")
# Perform clustering
clusterer = AddressClusterer()
clusters = clusterer.cluster_addresses(transactions)
# Print results
for cluster_id, addresses in clusters.items():
print(f"Cluster {cluster_id}: {len(addresses)} addresses")
print(f"Confidence: {clusterer.get_confidence(cluster_id)}")# Analyze a Bitcoin address
python -m blockchain_forensics analyze-btc --address 1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa
# Limit pages to avoid long fetches
python -m blockchain_forensics analyze-btc --address <addr> --max-pages 2
# Note: --max-pages only applies to Blockstream; it is ignored for bitcoin-rpc.
# Analyze using Bitcoin Core RPC
python -m blockchain_forensics analyze-btc --address <addr> --provider bitcoin-rpc --rpc-url http://127.0.0.1:8332
# Generate a CSV report
python -m blockchain_forensics analyze-btc --address <addr> --report csv
# Trace transaction flow (planned)
# python -m blockchain_forensics trace --txid <transaction_id> --depth 3
# Generate report (planned)
# python -m blockchain_forensics report --cluster-id <cluster_id> --output report.pdf# Start the API server
python -m blockchain_forensics.api
# API will be available at http://localhost:8000
# Documentation at http://localhost:8000/docs- Project setup and architecture design
- Bitcoin data collection module
- Basic CIOH clustering implementation
- Graph database integration
- Unit tests and documentation
- Ethereum support
- Advanced clustering algorithms
- Change address detection
- Performance optimization for large datasets
- CLI interface development
- Machine learning models for entity resolution
- Cross-chain analysis capabilities
- Behavioral pattern detection
- Integration with public datasets (WalletExplorer, etc.)
- Benchmark against existing tools
- Ground truth evaluation
- Privacy analysis and ethical considerations
- Performance optimization
- Web dashboard development
- Comprehensive documentation
- Case studies and examples
- Clustering Accuracy: Precision, Recall, F1-Score
- Scalability: Transactions processed per second
- Coverage: Percentage of addresses successfully clustered
- Confidence Scores: Distribution and reliability
- False Positive Rate: Incorrectly merged clusters
- False Negative Rate: Missed clustering opportunities
This tool is designed for:
- β Legal investigations with proper authorization
- β Compliance and risk management
- β Privacy research and education
Important: This tool should NOT be used for:
- β Unauthorized surveillance
- β Harassment or stalking
- β Illegal activities
- β Violations of privacy rights
Users are responsible for complying with applicable laws and regulations in their jurisdiction.
- Meiklejohn, S., et al. (2013). "A Fistful of Bitcoins: Characterizing Payments Among Men with No Names"
- Reid, F., & Harrigan, M. (2013). "An Analysis of Anonymity in the Bitcoin System"
- Androulaki, E., et al. (2013). "Evaluating User Privacy in Bitcoin"
- MΓΆser, M., et al. (2013). "An Inquiry into Money Laundering Tools in the Bitcoin Ecosystem"
- BlockSci: Academic blockchain analysis platform
- Chainalysis: Commercial blockchain forensics
- Elliptic: Enterprise-grade blockchain analytics
- Crystal Blockchain: Compliance and investigation tool
- WalletExplorer: Bitcoin address tags and clusters
- Bitcoin-OTC: Trust network and verified addresses
- Blockchain.com API: Public transaction data
- Etherscan: Ethereum transaction and contract data
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please read CONTRIBUTING.md for details on our code of conduct and development process.
This project is licensed under the MIT License - see the LICENSE file for details.
Rohteemie
- GitHub: @rohteemie
- Project: Computer Science/Blockchain Technology/Digital Forensics
- Open-source blockchain community
- Contributors to related research and tools
- Neo4j and graph database community
For questions, suggestions, or collaboration opportunities:
- Open an issue on GitHub
- Email: rotimijournal@outlook.com
- LinkedIn: https://www.linkedin.com/in/rotimijournal
If you use this tool in your research, please cite:
@misc{blockchain_forensics_2025,
title={Open-Source Blockchain Forensics: A Scalable Tool for Transaction Clustering and De-anonymization},
author={Rohteemie},
year={2025},
howpublished={\url{https://github.com/rohteemie/Open-Source-Blockchain-Forensics}}
}Status: π§ This project is under active development. Contributions and feedback are welcome!
Last Updated: May 2026
- Requirements analysis: docs/requirements.md
- MVP definition: docs/mvp.md
- High-level design (HLD): docs/hld.md
- Architecture overview: docs/architecture.md
- HLD diagram (PNG): docs/diagrams/hld-architecture.png
- System design diagram (PNG): docs/diagrams/system-design.png
- Phase 1 implementation: docs/phase1-implementation.md
- Phase 1 usage: docs/phase1-usage.md
This project ships a GitHub Pages landing page in the docs/ folder. To enable it:
- Go to Settings β Pages.
- Set Source to
Deploy from a branch. - Select the
mainbranch and/docsfolder, then save.