Skip to content
Back to skills

Crypto Scam Detector

ASecurity

Real-time cryptocurrency scam detection with database-first architecture. Protects users from phishing, honeypots, rug pulls, and ponzi schemes. No external API calls during checks!

  • 21 stars
  • 0 votes
  • 0 copies
  • 10 views
  • Added September 7, 2026
blockchainpythonrustgobashsqlgitapidatabasesecurityperformance

Works with

  • api

Security analysis

A100/100

Pro scans all 20 files and shows the line behind each finding

Scanned September 7, 2026

npx -y skills add modbender/skill-library-mcp --skill crypto-scam-detector --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Crypto Scam Detector?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Crypto Scam Detector
[![Security: A โ€” Skills Directory](https://www.skillsdirectory.com/api/skills/modbender-crypto-scam-detector/badge)](https://www.skillsdirectory.com/skills/modbender-crypto-scam-detector)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: crypto-scam-detector
displayName: Crypto Scam Detector
version: 2.0.0
author: Trust Claw Team
description: Real-time cryptocurrency scam detection with database-first architecture. Protects users from phishing, honeypots, rug pulls, and ponzi schemes. No external API calls during checks!
category: security
tags: [crypto, scam-detection, ethereum, blockchain, security, fraud-prevention, web3, defi, database, etherscan]
license: MIT
repository: https://github.com/trustclaw/crypto-scam-detector
homepage: https://github.com/trustclaw/crypto-scam-detector
icon: ๐Ÿ”
command: python3 crypto_check_db.py
---

# ๐Ÿ” Crypto Scam Detector v2.0

**Database-first cryptocurrency scam detection for OpenClaw**

Analyzes crypto addresses for phishing, honeypots, rug pulls, and ponzi schemes using a local database with background sync from Etherscan. **Zero external API calls during user checks** = instant results!

## โœจ What's New in v2.0

### ๐Ÿš€ Major Architecture Upgrade

- โœ… **Database-first design** - All checks query local SQLite database
- โœ… **Instant results** - No API latency during checks (<5ms)
- โœ… **No rate limits** - User queries never hit Etherscan API
- โœ… **Background sync worker** - Separate process pulls from Etherscan
- โœ… **Transaction message analysis** - Decodes and analyzes hex data
- โœ… **Auto-queue system** - Unknown addresses automatically queued for sync
- โœ… **Deep scanning** - Detects suspicious keywords in transaction data

### ๐Ÿ” Enhanced Detection

Now catches scams the old version missed:
- โœ… "Lazarus Vanguard" hacking group references
- โœ… "Orbit Bridge Hacker" mentions
- โœ… Private key phishing attempts
- โœ… Exploit recruitment messages
- โœ… And much more...

## ๐Ÿ“ฆ What's Included

```
crypto-scam-detector/
โ”œโ”€โ”€ SKILL.md                    # This file
โ”œโ”€โ”€ DATABASE_ARCHITECTURE.md    # Technical documentation
โ”œโ”€โ”€ database.py                 # SQLite database layer
โ”œโ”€โ”€ crypto_check_db.py          # Database-only checker (instant)
โ”œโ”€โ”€ sync_worker.py              # Background Etherscan sync worker
โ”œโ”€โ”€ secure_key_manager.py       # Encrypted API key storage
โ”œโ”€โ”€ install.sh                  # Auto-installer
โ”œโ”€โ”€ setup.sh                    # API key setup wizard
โ”œโ”€โ”€ check_address.sh            # Convenience script (sync if needed)
โ”œโ”€โ”€ requirements.txt            # Python dependencies
โ””โ”€โ”€ venv/                       # Virtual environment (created on install)
```

## ๐Ÿš€ Quick Start

### 1. Install

```bash
cd ~/.openclaw/workspace/skills/crypto-scam-detector
bash install.sh
```

### 2. Configure Etherscan API Key (Optional but Recommended)

**Option A: Interactive Setup** (Encrypted storage)
```bash
./setup.sh
# Follow the wizard to encrypt your API key
```

**Option B: Environment Variable**
```bash
export ETHERSCAN_API_KEY="your_key_here"
```

Get free API key: https://etherscan.io/myapikey

### 3. Check an Address

```bash
# Check address (instant, database-only)
python3 crypto_check_db.py 0x1234567890abcdef1234567890abcdef12345678
```

### 4. Run Background Sync Worker

**Manual mode:**
```bash
python3 sync_worker.py
# Runs continuously, processes queue
```

**Batch mode:**
```bash
python3 sync_worker.py --max-jobs 20
# Process 20 addresses then exit
```

**Cron schedule (recommended):**
```bash
# Add to crontab
*/10 * * * * cd ~/.openclaw/workspace/skills/crypto-scam-detector && source venv/bin/activate && ETHERSCAN_API_KEY="key" python3 sync_worker.py --max-jobs 30
```

## ๐Ÿ’ก How It Works

### Architecture Flow

```
User checks address
       โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ crypto_check_db  โ”‚ โ† Queries local database ONLY
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   (No external API calls)
         โ”‚
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Local SQLite DB      โ”‚
โ”‚ ~/.config/crypto-    โ”‚
โ”‚  scam-detector/      โ”‚
โ”‚                      โ”‚
โ”‚ โ€ข Addresses          โ”‚
โ”‚ โ€ข Transactions       โ”‚
โ”‚ โ€ข Risk scores        โ”‚
โ”‚ โ€ข Scam indicators    โ”‚
โ”‚ โ€ข Sync queue         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ฒโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
         โ”‚ Background sync
         โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ sync_worker.py       โ”‚ โ† Pulls from Etherscan
โ”‚                      โ”‚   (Uses your API key)
โ”‚ โ€ข Reads queue        โ”‚
โ”‚ โ€ข Calls Etherscan    โ”‚
โ”‚ โ€ข Decodes TX data    โ”‚
โ”‚ โ€ข Analyzes messages  โ”‚
โ”‚ โ€ข Stores in DB       โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

### User Flow

1. **Check address:** `python3 crypto_check_db.py 0x...`
2. **If in database:** Instant results with full analysis
3. **If NOT in database:** 
   - Returns "unknown" status
   - **Automatically adds to sync queue**
   - Shows: "โณ Check again in a few minutes"
4. **Background worker syncs it** (next cron run or manual trigger)
5. **Check again:** Full analysis now available

## ๐Ÿ” Detection Capabilities

### Scam Types Detected

| Type | Detection Method |
|------|------------------|
| **Phishing** | Keyword analysis: "private key", "seed phrase", "verify wallet" |
| **Honeypot** | Contract code analysis (unverified contracts) |
| **Rug Pull** | Transaction pattern analysis |
| **Exploit Groups** | Keywords: "Lazarus", "hack", "exploit", "breach" |
| **Social Engineering** | Keywords: "urgent", "claim reward", "airdrop winner" |

### Risk Scoring

**Algorithm factors:**
- Suspicious transaction count (+25 per TX, max +50)
- Account age (new addresses: +10)
- Balance patterns (large balance + suspicious TX: +20)
- Contract verification (unverified: +30)

**Risk Levels:**
- **0-19**: โœ… Low Risk
- **20-49**: โ„น๏ธ Medium Risk
- **50-79**: โš ๏ธ High Risk
- **80-100**: ๐Ÿšจ Critical Risk

## ๐Ÿ“‹ Commands Reference

### Check Address
```bash
# Human-readable output
python3 crypto_check_db.py 0x...

# JSON output
python3 crypto_check_db.py 0x... --json
```

### Sync Worker
```bash
# Add address to queue
python3 sync_worker.py --add-address 0x...

# Run worker (continuous)
python3 sync_worker.py

# Process N addresses then stop
python3 sync_worker.py --max-jobs 20

# Custom delay between addresses
python3 sync_worker.py --delay 2.0

# Show database stats
python3 sync_worker.py --stats
```

### Convenience Script
```bash
# Check and auto-sync if needed
./check_address.sh 0x...
# Automatically syncs if not in DB, then shows results
```

## ๐ŸŽฏ Example Output

### Critical Risk Address
```
๐Ÿšจ Analysis for 0x098b716b8aaf21512996dc57eb0615e2383e2f96

Risk Score: 100/100 - CRITICAL RISK
Last Updated: 2026-02-20 07:14:32

๐Ÿšจ KNOWN SCAM DETECTED!

โš™๏ธ Smart Contract
โš ๏ธ NOT VERIFIED on Etherscan
   Transactions: 38
   Balance: 101.802430 ETH

๐Ÿšจ 5 Scam Indicator(s) Detected:
   โ€ข Suspicious keyword detected: 'lazarus' (confidence: 80%)
   โ€ข Suspicious keyword detected: 'hack' (confidence: 80%)
   โ€ข Suspicious keyword detected: 'exploit' (confidence: 80%)
   โ€ข Suspicious keyword detected: 'private key' (confidence: 80%)

โš ๏ธ 5 Suspicious Transaction(s):
   โ€ข 0x74f7fbfe5a0bd3...
     Reason: Suspicious keyword detected: 'lazarus'
     Message: "Greetings Lazarus Vanguard..."

๐Ÿ“‹ Recommendations:
  ๐Ÿšซ DO NOT send funds to this address
  โš ๏ธ This address has been flagged as high risk
  ๐Ÿ“ž Report the source that gave you this address
```

### Unknown Address (Not Yet Synced)
```
โณ Analysis for 0xnew_address_not_in_db

Risk Score: 0/100 - UNKNOWN
Last Updated: N/A

โณ Address not yet in database
   Address not in database. Added to sync queue.

๐Ÿ“‹ Recommendations:
  โณ This address will be analyzed soon
  ๐Ÿ” Check again in a few minutes
  โš ๏ธ Exercise caution until analysis completes
```

## โš™๏ธ Configuration

### Database Location
Default: `~/.config/crypto-scam-detector/crypto_data.db`

### Etherscan API Rate Limits
- **Free tier:** 5 calls/second, 100,000 calls/day
- **Each address:** 4 API calls (balance, TX count, TX list, code)
- **Default delay:** 1.5 seconds between addresses (safe for free tier)

### Recommended Cron Schedule
```bash
# Every 10 minutes, process 30 addresses
*/10 * * * * cd ~/.openclaw/workspace/skills/crypto-scam-detector && source venv/bin/activate && ETHERSCAN_API_KEY="key" python3 sync_worker.py --max-jobs 30 --delay 2.0

# Handles ~4,320 addresses per day
```

## ๐Ÿ›ก๏ธ Security

- โœ… **Encrypted API key storage** - AES-256 with PBKDF2
- โœ… **No third-party sharing** - API key only sent to Etherscan
- โœ… **Local processing** - All analysis happens on your machine
- โœ… **No telemetry** - Zero data collection
- โœ… **Open source** - Fully auditable code

## ๐Ÿ“Š Database Schema

### Tables
- **addresses** - Address info, risk scores, balances, metadata
- **transactions** - Suspicious transactions with decoded messages
- **scam_indicators** - Individual red flags per address
- **sync_queue** - Addresses waiting to be synced

See `DATABASE_ARCHITECTURE.md` for full technical details.

## ๐Ÿ”„ Sync Frequency

**Default behavior:**
- First check โ†’ address queued for sync
- Worker processes queue (manual or cron)
- Subsequent checks โ†’ instant from database

**Recommended:** Run worker via cron every 5-10 minutes

## ๐Ÿ’ป OpenClaw Integration

### Via Chat
```
"Check if 0x1234... is a scam"
"Is this address safe: 0xabc..."
"Verify 0xdef... before I send ETH"
```

### Automatic Detection
When you check an address, OpenClaw:
1. Runs `crypto_check_db.py`
2. If not in DB โ†’ queues for sync
3. Returns current status
4. Suggests checking again after sync

## ๐Ÿ› Troubleshooting

### "Address not in database"
**Solution:** Wait for background worker to sync it, or manually trigger:
```bash
python3 sync_worker.py --add-address 0x...
python3 sync_worker.py --max-jobs 1
```

### "Etherscan API key not configured"
**Solution:** Set API key via environment or setup wizard:
```bash
./setup.sh  # or
export ETHERSCAN_API_KEY="your_key"
```

### Rate limit errors
**Solution:** Increase delay between addresses:
```bash
python3 sync_worker.py --delay 3.0
```

## ๐Ÿ“ˆ Performance

- โœ… **Check latency:** <5ms (database query)
- โœ… **Sync time:** ~2 seconds per address (4 API calls)
- โœ… **Database size:** ~1KB per address
- โœ… **Capacity:** Handles millions of addresses

## ๐Ÿ†š Comparison: v1 vs v2

| Feature | v1.1.3 (Old) | v2.0.0 (New) |
|---------|--------------|--------------|
| **Check speed** | 2-5 seconds (API calls) | <5ms (database) |
| **Rate limits** | Yes (every check) | No (checks only query DB) |
| **TX message analysis** | โŒ Not analyzed | โœ… Fully analyzed |
| **False negatives** | High (missed scams) | Low (deep analysis) |
| **Architecture** | Direct API calls | Database + background worker |
| **API key usage** | Every check | Only background worker |

## ๐Ÿ“œ License

MIT License - Free and open source

## ๐Ÿค Support

- **GitHub:** https://github.com/trustclaw/crypto-scam-detector
- **Issues:** Report bugs or request features
- **ClawHub:** https://clawhub.com/crypto-scam-detector
- **Hackathon:** NeoClaw Hackathon 2026

## ๐Ÿ† Credits

**Developed by Trust Claw Team** for NeoClaw Hackathon 2026

**Built with:**
- SQLite - Local database
- Etherscan API - Blockchain data
- ChainAbuse API - Community scam reports
- Python asyncio - Async operations

---

**๐Ÿ” Stay safe in crypto! Always verify addresses before sending funds.**

Files in this skill

  • CHANGELOG.md4.4 KB
  • DATABASE_ARCHITECTURE.md7.9 KB
  • EXPORT_PACKAGE.md7.1 KB
  • MULTICHAIN_SUPPORT.md6.3 KB
  • README.md6.2 KB
  • READY_TO_PUBLISH.md5.5 KB
  • REALTIME_SYNC_UPDATE.md6.3 KB
  • SECURITY.md3.4 KB
  • SKILL.md11.7 KB
  • SUBMISSION.md6.3 KB
  • V2.2.0_RELEASE_NOTES.md5.2 KB
  • blockchain_detector.py5.4 KB
  • check_address.sh1 KB
  • clawhub-manifest.json4.3 KB
  • crypto_check_db.py12.7 KB
  • database.py15.5 KB
  • install.sh1.4 KB
  • package.json2 KB
  • requirements.txt237 B
  • scam_database.py5.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in blockchain โ†’

Comments

Loading commentsโ€ฆ

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.