Tokamak

MEV detection platform analyzing transactions for sandwich attacks, arbitrage & trading strategies

Tokamak

Created At

Unite Defi

Project Description

Description Tokamak is a sophisticated blockchain transaction analysis platform specifically designed to decode and analyze MEV (Maximal Extractable Value) activities across DeFi protocols. The platform provides deep insights into complex trading strategies, with particular expertise in detecting sandwich attacks, arbitrage opportunities, and advanced MEV bot behaviors. Key Features: šŸ” Advanced Transaction Analysis

Real-time detection of sandwich attacks with pattern-based algorithms Cross-block MEV detection spanning multiple blockchain blocks Sophisticated arbitrage strategy identification MEV bot behavioral profiling and pattern recognition

šŸ“Š Multi-Protocol Support

Supports 11 major blockchain networks (Ethereum, Arbitrum, Polygon, etc.) Integration with major DeFi protocols (Uniswap, Curve, Balancer, 1inch) Comprehensive token flow analysis across protocols

šŸŽÆ Sandwich Attack Detection

Enhanced pattern detection algorithms identifying front-run, victim, and back-run transactions Cross-block sandwich detection for sophisticated attacks Price impact analysis and victim slippage calculations Detailed MEV extraction profitability analysis

šŸ’¹ Portfolio Simulation

Historical portfolio value tracking and analysis Strategy simulation capabilities for "what-if" scenarios Performance comparison tools

How it's Made

Core Technologies Frontend Stack:

Next.js 14 with App Router for modern React development TypeScript for type safety and developer experience Tailwind CSS with custom glassmorphic components Recharts for advanced data visualization Radix UI for accessible component primitives Lucide React for consistent iconography

Backend & Analysis Engine:

Custom MEV Detection Engine with pattern-based algorithms OpenAI GPT-4 Integration for intelligent transaction narrative generation 1inch API Integration for comprehensive DeFi data access Axios for robust API communication

Blockchain Integration:

Multi-chain RPC Support across 11 networks Custom trace analysis using 1inch infrastructure ERC-20 event parsing for token flow analysis Gas efficiency analysis and MEV profitability calculations

Technical Architecture

  1. Transaction Analysis Pipeline: Input (TX Hash) → RPC Data Fetch → Trace Analysis → Pattern Detection → LLM Enhancement → UI Presentation
  2. MEV Detection Engine (lib/analysis/transaction-analyzer.ts):

Pattern-First Detection: Analyzes transaction sequences before financial data Cross-Block Analysis: Detects sophisticated attacks spanning multiple blocks Token Flow Analysis: Maps ERC-20 transfers to identify manipulation patterns MEV Bot Profiling: Behavioral analysis of known MEV operators

  1. Enhanced Sandwich Detection: The platform implements multiple detection strategies:

Single-block detection for traditional sandwich attacks Cross-block detection for advanced MEV strategies Pattern validation using token flow analysis Price impact calculation for victim loss quantification

  1. Data Enrichment:

Token metadata caching for efficient symbol/decimal resolution Protocol detection using known contract addresses Gas efficiency analysis with optimization suggestions Financial impact calculation with profit/loss breakdowns

background image mobile

Join the mailing list

Get the latest news and updates