ReviewGuard is an AI-powered smart contract and crypto risk analysis platform designed to automatically detect rug pulls, scam tokens, and malicious Solidity smart contracts using Machine Learning, Deep Learning, and Behavioral Pattern Analysis.
Helping users, researchers, and security teams assess blockchain contract trustworthiness before investment or deployment, reducing financial risk in decentralized ecosystems.
Features • Architecture • Installation • Usage • Performance
|
Identifies suspicious patterns such as:
|
|
|
Deep inspection of:
|
|
graph LR
A[📝 Input Layer] --> B[🔧 Preprocessing]
B --> C[🧠 AI Analysis Engine]
C --> D[⚖️ Risk Assessment]
D --> E[📊 Output Layer]
style A fill:#e1f5ff
style C fill:#fff3cd
style E fill:#d4edda
| Layer | Function |
|---|---|
| Input Layer | Solidity smart contract code (manual input or file upload) |
| Preprocessing | Code cleaning, feature extraction (functions, permissions, patterns) |
| AI Analysis | Machine Learning classifiers + Deep Learning models |
| Risk Assessment | Weighted scoring mechanism with behavioral pattern matching |
| Output Layer | Risk percentage + Verdict (🟢 Safe / 🟡 Medium Risk / 🔴 High Risk) |
┌─────────────────────────────────────────────────────────────┐
│ 1. Feature Extraction │
│ ├─ Structural features (functions, modifiers) │
│ ├─ Semantic patterns (ownership, permissions) │
│ └─ Behavioral signals (liquidity locks, minting) │
├─────────────────────────────────────────────────────────────┤
│ 2. Model Training │
│ ├─ Known rug pull contracts │
│ ├─ Vulnerable but non-scam contracts │
│ └─ Legitimate verified contracts │
├─────────────────────────────────────────────────────────────┤
│ 3. Hybrid Detection │
│ ├─ Rule-based pattern matching │
│ └─ AI prediction fusion │
├─────────────────────────────────────────────────────────────┤
│ 4. Evaluation │
│ └─ Accuracy, Precision, Recall metrics │
└─────────────────────────────────────────────────────────────┘
| Dataset Type | Source | Purpose |
|---|---|---|
| 🔴 Rug Pull Contracts | Real-world scam cases | Malicious pattern training |
| ✅ Verified Contracts | Ethereum blockchain explorers | Legitimate baseline |
| Open research repositories | Edge case detection | |
| 🏷️ Labeled Data | Manual annotation | Multi-class classification |
Datasets sourced from verified blockchain explorers, security research databases, and manually curated contract repositories.
| Test Case | Accuracy | Status |
|---|---|---|
| Test 1 | 100% | ✅ |
| Test 2 | 100% | ✅ |
| Test 3 | 100% | ✅ |
| Test 4 | 100% | ✅ |
| Test 5 | 100% | ✅ |
Overall: Strong detection of high-risk contracts with ongoing improvements for edge-case scenarios.
- Python 3.8 or higher
- pip package manager
- Git
# 1. Clone the repository
git clone https://github.com/your-username/ReviewGuard.git
# 2. Navigate to project directory
cd ReviewGuard
# 3. Install dependencies
pip install -r requirements.txt
# 4. Run the application
python app.pyOpen your browser and navigate to:
http://localhost:5000
- Upload Contract: Paste Solidity code or upload
.solfile - Analyze: Click "Analyze Contract" button
- Review Results: View risk score, verdict, and detailed analysis
┌─────────────────────────────────────┐
│ Risk Score: 87% │
│ Verdict: 🔴 HIGH RISK │
│ │
│ Detected Issues: │
│ • Unrestricted mint function │
│ • Hidden ownership transfer │
│ • No liquidity lock mechanism │
└─────────────────────────────────────┘
|
Render / Railway / Hugging Face Spaces ✅ No local machine required |
# Deploy to Render
render.yaml configuration
# Deploy to Railway
railway up
# Deploy to HF Spaces
git push hf main |
| User Type | Application |
|---|---|
| 🪙 Crypto Investors | Pre-investment token safety verification |
| 👨💻 Developers | Smart contract auditing before deployment |
| 🔒 Security Researchers | Vulnerability pattern analysis |
| 🎓 Academic Projects | Final year / capstone demonstrations |
| 🏢 Enterprise Teams | Internal blockchain security audits |
🔄 Roadmap
├── 📡 Live blockchain monitoring
├── 💼 Wallet-based transaction analysis
├── 🌐 Multi-chain support (BSC, Polygon, Solana)
├── 📖 Explainable AI reports with visualizations
├── 🔌 RESTful API for external integrations
└── 🤝 Community-driven dataset expansion
This project is licensed under the MIT License - see the LICENSE file for details.
If you find ReviewGuard helpful, please consider:
⭐ Starring this repository
Helps improve visibility and motivates further development!
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your 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
Made with ❤️ and ☕ for a safer blockchain ecosystem