|MIRAGE

The Anti-Adversarial Copy-Trading
Intelligence Layer for BNB Chain.

|THE PROBLEM

Hundreds of thousands of retail traders copy “smart money wallets” on Four.meme every day. They lose — because most of those wallets are not smart money. They are adversarial bots built to farm copy-traders via bundle coordination, sniper positioning, wash trading, and social manipulation.

Existing tools (GMGN, Axiom, BullX) rank wallets by PnL — the exact metric adversarial bots are engineered to optimize. No tool on BNB Chain reasons about whether a “smart money” wallet is itself adversarial.

|THE SOLUTION

Mirage does not display wallets — it reasons about them. For every Four.meme wallet and token, three specialized LLM agents (Coin, Wallet, Timing) evaluate structured on-chain features, produce a Trust Verdict (Copy / Avoid / Uncertain), and return a natural-language reasoning trace the user can read, audit, and disagree with.

Every other tool tells you who's winning. Mirage tells you who's cheating.

|PRODUCT

Mirage dashboard — home page with wallet scan results

Dashboard: paste any address, get an instant verdict with full reasoning

Wallet scan results showing UNCERTAIN verdict with trust score 33/100

Wallet verdict: trust score, counter-argument, and three agent analyses

Agent reasoning traces from Coin, Wallet, and Timing agents

Agent reasoning: each agent scores independently with cited evidence

Subscribe to exit alerts via Telegram

Exit watchdog: subscribe to receive Telegram alerts when a wallet starts distributing

|KEY DIFFERENTIATORS

BNB-Native: The only serious copy-trade intelligence product built for BNB Chain, not ported from Solana.
Reasoning is the product: Every verdict ships with a human-readable chain of thought a trader can audit and override.
Research-inspired: Inspired by ACM WWW 2026 research (Luo et al., arXiv 2601.08641) which proved multi-agent CoT detects adversarial wallets on Solana. Mirage adapts this for BNB Chain with extensions: evidence citations, counter-arguments, continuous scoring, and a feedback loop.
Evidence-cited: Every reasoning claim is bound to a specific block, tx hash, or wallet address. Hallucinations are rejected by a post-processing validator.
Counter-argument included: Every verdict explains what would need to be true to invalidate it — a trust-building feature no competitor offers.
Feedback loop: Outcome resolver checks verdicts against on-chain reality after 24h. Adversarial labeler seeds the detection pipeline from confirmed rugs.

|ARCHITECTURE

Data Ingestion: Moralis Web3 API (BSC mainnet, free tier). Fetches native txs, ERC-20 transfers, token metadata, contract type detection.
Feature Store: MongoDB with 30-day TTL cache on extracted features. Hot 10-min verdict cache for instant re-queries.
Orchestration: LangGraph (Python) — three parallel agent nodes + aggregator node. State machine compiles to async DAG.
LLM Inference: DeepSeek (configurable via env). OpenAI-compatible endpoint. ~$0.001/trace.
Verdict Store: MongoDB collections: verdicts, outcomes, adversarial labels, subscriptions. Ground-truth training loop.
Telegram Bot: grammY framework. Unified /analyze command auto-routes wallet vs token. Inline expand for reasoning.
Web Dashboard: Next.js 16 + Tailwind + pixel theme. Single-page app with auto-detect, results display, and subscribe.
Background Workers: Outcome resolver (every 30min), exit watchdog (every 60s) — both resilient to dependency outages.

|VERDICT FLOW

1. User pastes 0x address
2. Auto-detect: wallet vs ERC-20 token contract (Moralis)
3. Fetch on-chain data (txs, transfers, metadata)
4. Extract 7 structured features (bundle coeff, timing entropy, ...)
5. Build evidence pool (block numbers, tx hashes, wallets)
6. Three AI agents reason in parallel
7. Aggregator produces verdict + counter-argument
8. Verdict persisted to MongoDB (ground truth loop)
9. Response: COPY / AVOID / UNCERTAIN + Trust Score 0-100
10. For tokens: analyze top 8 early buyers in parallel

|API REFERENCE

Base URL: http://localhost:8000 Interactive Swagger UI ↗

POST/analyzeAuto-Analyze

Smart router. Auto-detects whether the address is a wallet or ERC-20 token and runs the appropriate pipeline. This is what the dashboard and Telegram bot call.

Request

{ "address": "0x...", "window_minutes": 8 }

Response

{ "kind": "wallet"|"token", "verdict": {...} }
POST/analyze_walletWallet Trust Verdict

Three AI agents (Coin, Wallet, Timing) reason about a BNB wallet. Returns verdict, trust score, counter-argument, reasoning traces with evidence citations, and extracted features.

Request

{ "wallet_address": "0x...", "token_address": "0x..." (optional) }

Response

{ wallet_address, verdict, trust_score, counter_argument, reasoning_trace[], features, verdict_id }
POST/analyze_tokenToken Verdict + Ranked Buyers

Fetches early buyers of a Four.meme token, analyzes each in parallel, and produces a token-level verdict with bundle contamination score, graduation probability, and ranked buyer table.

Request

{ "token_address": "0x...", "window_minutes": 8 }

Response

{ token_address, verdict, trust_score, bundle_contamination_pct, graduation_probability, ranked_buyers[], metadata, total_early_buyers }
POST/subscribeExit Alert Subscription

Subscribe a Telegram chat ID to receive exit-signal watchdog alerts when a wallet starts distributing tokens. The watchdog polls every 60 seconds and detects net outflows, multi-token sells, and transfers to fresh wallets.

{ "chat_id": 123456789, "wallet_address": "0x..." }
POST/unsubscribeRemove Subscription

Remove an existing exit-alert subscription.

GET/verdictsVerdict History

Retrieve verdict history from MongoDB. Filter by kind (wallet/token) and limit. Shows verdict_id, address, score, resolved status, and final outcome.

GET/accuracyAccuracy Report

Verdict-vs-outcome hit rate. Shows total verdicts, resolved count, correct count, and accuracy percentage — the feedback loop that makes the system improve over time.

GET/healthzHealth Check

Component status: cache, chain data (Moralis), store (MongoDB), Telegram push, and labeled adversarial set size.

POST/admin/run_labeler+/admin/run_resolver

Manual triggers for the adversarial labeling pipeline and outcome resolver. In production these run on cron; exposed as endpoints for hackathon demos.

|REASONING AGENTS

Each agent receives the same structured features and evidence pool but reasons from a different adversarial lens. All claims must cite a block number, tx hash, or wallet address from the evidence pool — hallucinations are stripped by a post-processor.

Coin Agent

Token safety, creator history, tokenomics signals

Contract ownership and liquidity lock status
Creator wallet trading history
Token supply distribution concentration
Cross-references with known rug patterns

Wallet Agent

Funding sources, cluster behavior, co-buyer overlap

Bundle coefficient — same-block buy coordination
Funding ancestor graph distance to known adversarial wallets
Co-buyer Jaccard similarity across token launches
Cross-token alpha variance (farm bot vs genuine trader)

Timing Agent

Block-timing entropy, transaction cadence

Shannon entropy of inter-tx intervals
Bot-like regularity detection (low entropy)
Coordinated same-block activity patterns
Transaction frequency vs natural trading patterns

Aggregator

Synthesizes all three agent scores into final verdict

Produces COPY / AVOID / UNCERTAIN verdict
Composite trust score 0-100
Counter-argument: what would invalidate this verdict

|FEATURE PIPELINE

Structured signals extracted from on-chain data before LLM reasoning. These are what the agents reason about — not raw transactions.

FeatureDescription
bundle_coefficientFraction of txs sharing a block with another tx (0-1). High = coordinated bundle bot.
timing_entropyShannon entropy of inter-tx intervals. Low = automated cadence.
max_co_buyer_jaccardMax Jaccard overlap between buyer sets. High = coordinated cluster.
graph_distance_to_adversarialHops to a known-adversarial wallet via funding chain. 0 = is adversarial, 999 = no connection.
cross_token_alpha_variancePnL variance across tokens. Low = farm bot with engineered returns.
funding_ancestor_depthLength of funding chain back to a CEX or null source.
distinct_tokens_tradedNumber of unique tokens the wallet has interacted with.

|TOKEN ANALYSIS

When Mirage detects a token contract, it runs a deeper pipeline:

1.Fetch all ERC-20 transfers for the token via Moralis
2.Identify early buyers in the first N minutes (configurable window, default 8min)
3.Analyze top 8 buyer wallets in parallel using the wallet pipeline
4.Calculate bundle contamination % — what fraction of early buys were coordinated
5.Compute graduation probability — likelihood of healthy token distribution
6.Rank buyers by trust score — surfaces which early buyers are real vs adversarial
7.Fetch token metadata (name, symbol, decimals, logo) for display

|FEEDBACK LOOP

Mirage doesn't just predict — it verifies. The system continuously improves by checking its own verdicts against reality.

Outcome Resolver: Runs every 30 minutes. Checks unresolved verdicts older than 24h against on-chain state. Outcomes: rugged, dumped, graduated, held, unknown.
Adversarial Labeler: Finds resolved rugs and labels the creator + first 50 buyers as adversarial. Repeat offenders (3+ rugs) get promoted to 0.95 confidence.
Adversarial Set: Hot-loaded into FeatureExtractor on engine startup. The graph_distance_to_adversarial feature measures hops to known bad actors — shorter distance = higher risk.
Accuracy Endpoint: GET /accuracy?days=30 shows verdict-vs-outcome hit rate. Use this for model evaluation and to demonstrate defensibility.

|EXIT WATCHDOG

Subscribe to any wallet via the dashboard or Telegram bot. The watchdog runs every 60 seconds and alerts you when it detects distribution behavior:

Net outflow of any single ERC-20 exceeding threshold
3+ distinct tokens sold in the recent window
Transfers to freshly-created wallets (funding depth = 0)

Alerts are pushed via the Telegram Bot API directly. The bot process does not need to be running — the engine sends alerts independently.

|TELEGRAM BOT

@Mirage4memeBot ↗

/startWelcome message with usage instructions
/analyze <address>Auto-detect wallet vs token and return formatted verdict card
/chatidReturns your Telegram chat ID for subscribing via the web dashboard
Paste any 0x addressAuto-triggers analysis without needing a command

Inline buttons: expand full reasoning, view counter-argument, subscribe to exit alerts, share screenshot.

|ENVIRONMENT VARIABLES

# LLM Provider
DEEPSEEK_API_KEY    # DeepSeek API key
LLM_MODEL          # deepseek-chat (default)
LLM_BASE_URL       # https://api.deepseek.com/v1

# On-Chain Data
MORALIS_API_KEY     # BSC chain data (free tier)

# Datastore
MONGODB_URI        # Verdict store + feature cache
MONGODB_DB         # Database name (default: mirage)

# Alerts
TELEGRAM_BOT_TOKEN  # Exit-watchdog push alerts

|TECH STACK

LayerChoice
Data ingestionMoralis Web3 API (BSC)
Feature storeMongoDB Atlas + 30-day TTL cache
OrchestrationLangGraph (Python)
LLM inferenceDeepSeek via OpenAI-compatible API
Telegram botgrammY (TypeScript)
WebNext.js 16 + Tailwind CSS 4
APIFastAPI + uvicorn