Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ReviewGuard

Intelligent AI System for Detecting Rug Pulls, Scam Tokens & Malicious Smart Contracts

Python Flask License Status

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.

FeaturesArchitectureInstallationUsagePerformance


🧠 Key Features

🔍 Automated Rug Pull Detection

Identifies suspicious patterns such as:

  • Liquidity removal mechanisms
  • Hidden ownership controls
  • Mint function abuse
  • Blacklist logic vulnerabilities

🤖 AI-Based Risk Scoring

  • Trained ML/DL models
  • Real-time risk percentage calculation
  • Multi-factor analysis engine
  • Confidence score reporting

📊 Behavioral Analysis

Deep inspection of:

  • Contract functions & modifiers
  • Ownership logic patterns
  • Token supply controls
  • Transaction behavior

🌐 Web-Based Interface

  • User-friendly upload system
  • Paste smart contract code directly
  • Instant analysis results
  • Detailed risk breakdown

🏗️ System Architecture

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
Loading
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)

🧪 Methodology

┌─────────────────────────────────────────────────────────────┐
│  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 Composition

Dataset Type Source Purpose
🔴 Rug Pull Contracts Real-world scam cases Malicious pattern training
Verified Contracts Ethereum blockchain explorers Legitimate baseline
⚠️ Vulnerable Contracts 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.


📈 Model Performance

Accuracy Across Test Cases

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.


🛠️ Tech Stack

Category Technologies
Backend Python Flask
Machine Learning Scikit-Learn TensorFlow PyTorch
Blockchain Ethereum Solidity
Frontend HTML5 CSS3 JavaScript
Deployment Render Railway

🚀 Installation

Prerequisites

  • Python 3.8 or higher
  • pip package manager
  • Git

Quick Start

# 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.py

Access the Application

Open your browser and navigate to:

http://localhost:5000

💻 Usage

Web Interface

  1. Upload Contract: Paste Solidity code or upload .sol file
  2. Analyze: Click "Analyze Contract" button
  3. Review Results: View risk score, verdict, and detailed analysis

Example Output

┌─────────────────────────────────────┐
│  Risk Score: 87%                    │
│  Verdict: 🔴 HIGH RISK              │
│                                     │
│  Detected Issues:                   │
│  • Unrestricted mint function       │
│  • Hidden ownership transfer        │
│  • No liquidity lock mechanism      │
└─────────────────────────────────────┘

🌍 Deployment

Cloud Deployment Options

Render / Railway / Hugging Face Spaces

✅ No local machine required
✅ 24/7 uptime
✅ Easy updates & redeployment
✅ Free tier available

# Deploy to Render
render.yaml configuration

# Deploy to Railway
railway up

# Deploy to HF Spaces
git push hf main

🎯 Use Cases

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

🔮 Future Enhancements

🔄 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

🧑‍💻 Author

SASWAT KHANDAI
2nd Year Student | AI & Blockchain Enthusiast

Email LinkedIn GitHub


📜 License

This project is licensed under the MIT License - see the LICENSE file for details.


⭐ Support This Project

If you find ReviewGuard helpful, please consider:

⭐ Starring this repository
Helps improve visibility and motivates further development!

GitHub stars GitHub forks


🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Made with ❤️ and ☕ for a safer blockchain ecosystem

```

About

Semantic risk detection system for smart contracts and tokens

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages