hackquest logo

Mandal

Mandal is a Chrome extension that provides real-time AI-powered security analysis for smart contracts on the Mantle Network.

Videos

Description

Even experienced developers can miss hidden vulnerabilities in complex Solidity code. Mandal addresses this critical security gap by bringing institutional-grade smart contract analysis directly to the user's browser.

Our Solution:
Mandal integrates seamlessly with Mantle Explorer, automatically analyzing contracts when users visit them. Within seconds, it provides:

  1. AI-Powered Analysis: GPT-4 examines the complete Solidity source code, identifying vulnerabilities, suspicious patterns, and potential exploits.

  2. Risk Assessment: Clear visual indicators (Low/Medium/High/Critical) help users make instant decisions.

  3. Detailed Reports: Function-by-function breakdown with specific security recommendations.

  4. Community Protection: Users can submit and view reports about suspicious contracts, creating a crowdsourced security database

  5. Developer-Friendly: View contract source code, ABI, compiler settings, and deployment information

Key Security Checks:

  • Honeypot detection

  • Unlimited minting capabilities

  • Hidden fees and taxes

  • Blacklist functions

  • Owner privileges (pause, drain, upgrade)

  • External contract calls

  • Reentrancy vulnerabilities

  • Access control issues

Architecture:

  • Frontend: React-based Chrome extension with Tailwind CSS for responsive UI

  • Backend: Hono.js API server with PostgreSQL database

  • AI Engine: OpenAI GPT-4 for intelligent code analysis

  • Data Sources: Mantle Explorer API, IP2Location for domain verification

  • Caching: Smart caching with React Query to minimize API costs

Target Users:

  • Traders and investors exploring new tokens

  • DeFi users interacting with protocols

  • NFT collectors verifying marketplace contracts

  • Developers auditing third-party integrations

  • Security researchers tracking threats

Progress During Hackathon

Backend Infrastructure (100% Complete): - RESTful API with 3 main endpoints (contracts, dapps, reviews) - PostgreSQL database with Prisma ORM - 7 database models with proper relationships - Integration with Mantle Explorer API for contract data - OpenAI GPT-4 integration for AI analysis - Web scraping service for DApp metadata - IP2Location API integration for domain verification - CORS configuration for Chrome extension - Rate limiting and caching strategies AI Analysis Engine (100% Complete): - Comprehensive prompt engineering for security analysis - Source code truncation for large contracts - Configurable AI model selection

Tech Stack

React
OpenAI API
Chrome Extension
Hono
Postgresql
Team Leader
AAli Mousavi
Sector
InfraAISocialFi