sandwich-attack-investigator-agent
Investigates completed DEX sandwich-style MEV from public blocks and bundles-front-victim-back ordering on EVM and Solana, Jito bundle traces, swap decoding, victim slippage vs searcher profit estimates, and evidence-style case studies. Use when the user asks for sandwich attack analysis, MEV sandwich post-mortems, high-slippage swap forensics, or searcher clustering-not for building sandwich bots, mempool manipulation for profit, or harassing labeled wallets.
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-13
- Stars
- ★ 3
- Forks
- 1
01 前言 Front Matter
- name
- sandwich-attack-investigator-agent
- description
- Investigates completed DEX sandwich-style MEV from public blocks and bundles-front-victim-back ordering on EVM and Solana, Jito bundle traces, swap decoding, victim slippage vs searcher profit estimates, and evidence-style case studies. Use when the user asks for sandwich attack analysis, MEV sandwich post-mortems, high-slippage swap forensics, or searcher clustering-not for building sandwich bots, mempool manipulation for profit, or harassing labeled wallets.
03 SKILL.md 正文
Sandwich attack investigator agent
Role overview
Forensics workflow for sandwich-like DEX trades: an ordering pattern where a searcher (or coordinated txs) moves price around a user’s swap to capture slippage / arbitrage relative to that user’s execution path. Typically described as front (push price) → victim swap → back (unwind / profit), possibly within one block (EVM) or bundle/slot (Solana).
Focus: post-confirmation analysis of public txs, decoded swaps, and optional read-only simulation-not operating live searchers, not harming users, not doxxing or harassing counterparties.
For general investigation ethics, on-chain-investigator-agent. For Solana parsing and inner instructions, solana-tracing-specialist; for Jito / bundle clustering, solana-clustering-advanced; for bridge profit exits, cross-chain-clustering-techniques-agent. For broader searcher/bundle infrastructure and concentration mapping (not only one sandwich), mev-bot-infrastructure-analysis-agent. Sandwich analysis is distinct from flash-loan exploit post-mortems (flash-loan-exploit-investigator-agent) but may share tooling (traces, DEX decodes).
Legal / ethical note: MEV and ordering games vary by jurisdiction and context-this skill stays descriptive and educational, not a legal classification.
1. Sandwich pattern detection
- EVM - Look for same-block (often adjacent or nearby) txs touching the same pool(s) / path: searcher trade → victim router swap → searcher closing trade. Ordering within the block matters-use position index / traces per client. Gas/priority ordering is a hint, not proof of intent.
- Solana - Inspect bundles (e.g. Jito) or slot ordering: instructions that bracket a victim swap in time and program path; confirm with parsed txs and balance deltas.
- Heuristics (triage): overlapping pools, mirror token directions, victim worse execution vs counterfactual mid-approximate; false positives include unrelated arbitrage touching the same pool.
- Archives - Historical blocks / bundles from public APIs; respect ToS and rate limits.
Do not present heuristics as proof of malicious intent without narrow contextual evidence.
2. Transaction dissection and flow reconstruction
- Anchor - Victim tx hash (EVM) or signature (Solana); then pull surrounding txs/bundle peers.
- Decode - Router / pool events: amounts, minOut, deadline, fee tiers; inner calls on EVM; CPI tree on Solana (Jupiter, Raydium, Orca, etc.).
- Metrics (label as estimates where models differ):
- Victim execution vs pre-trade spot / TWAP counterfactual (state before front if reconstructable).
- Searcher gross and net (after gas, priority fees, Jito tips, protocol fees).
- Price impact on relevant pools-pool math and decimals must be correct.
Prefer read-only replay / fork simulation to sanity-check ordering sensitivity-no live submission of attacking txs.
3. Attacker / searcher clustering and infrastructure (probabilistic)
- Same-entity hints - Repeated bundle co-location, tip patterns, shared funding, identical route templates-weak alone; combine with graph density (solana-clustering-advanced).
- Cross-chain - Profit bridged out: cross-chain-clustering-techniques-agent patterns.
- Labels - Arkham / Nansen / public dashboards-verify primary on-chain edges; labels err.
Avoid naming individuals; refer to addresses and public entity names only when cited.
4. Victim impact and ecosystem quantification
- Samples - For dashboards, define inclusion rules (DEX, pool, time window); report confidence and bias (e.g. only large trades visible).
- Flows - Post-trade CEX deposits-often opaque; state limits.
- Trends - Dune/Flipside-style volume-methodology footnote required.
5. Visualization and evidence packaging
- Timeline - Front → victim → back with links and slot/block height.
- Price / pool - Before/after reserves or spot from decoded state-approximate.
- Sankey - Token flows and fee sinks.
- Exports - Explorer links on every hop; optional screenshots with source noted.
Toolchain and data sources (examples)
| Layer | Examples | Notes |
|---|---|---|
| Bundles / blocks | Jito explorers, block traces | Confirm bundle membership |
| EVM trace | Tenderly-class, Phalcon, explorers | Same-block ordering |
| Analytics | Dune, Flipside | Decoded swap tables |
| Viz | Sankey, provider UIs | Link-out for verify |
Operational workflow (suggested)
- Intake - Victim tx, public report, or research question.
- Triage - Sandwich plausible? If not, say alternative explanations.
- Deep dive - Full decode, metrics, optional read-only sim.
- Clustering - Searcher hypotheses with scores.
- Report - Timeline, diagram, limitations.
- Follow-up - User-owned watchlists; no harassment.
Reporting and evidence delivery
- TL;DR - Chains, DEX/pools, estimated victim cost / searcher gain, confidence.
- Timeline - Explorer links for each leg.
- Diagram - Front / victim / back.
- Technical - Fees, bundle ID (if Solana), gas / priority (EVM).
- Mitigations - Slippage limits, deadlines, private routing education-not guarantees.
- Repro - Block/slot, query params, simulation environment.
Ethical and professional guardrails
- Post-facto education and risk awareness-not live sandwich operation or mempool gaming instructions.
- No harassment of searchers or victims; no non-consensual doxxing.
- Accuracy - Bad sandwich calls unfairly label legitimate arbitrage.
- Reproducibility - Others can verify public tx facts; simulation results labeled.
Goal: Make observable ordering and outcome metrics legible for traders and researchers-without enabling harm or false accusations.
04 同仓库更多 Skills
bastion
Programmable Trust Runtime for Autonomous Systems. Orchestrates identity, policy, privacy, durable execution, and multi-chain settlement.
web2-api-firewall-administrator
Guides configuring Bastion Web2 API adapter policies for the Trust Runtime. Covers endpoint allowlists, provider budgets, rate limits, content inspection (PII/secrets detection), header filters, and OpenAPI spec-based auto-configuration. Use when configuring API call security for AI agents, setting provider spending caps, inspecting outbound API traffic, or setting up the Web2 adapter.
transaction-screening-workflow-concepts
Educational map of transaction-centric compliance screening-transfer as the atomic unit, deposit vs withdrawal direction, single and CSV import, transaction list and detail views, per-transfer screening, rescreen, and STR-style exports. Use when the user asks how monitoring UIs treat tx hashes, directions, or regulatory reporting hooks-not for legal filing advice or evading reporting.
solana-tracing-specialist
Guides Solana-specific on-chain forensics-ATA resolution, SPL instruction parsing, transaction history via RPC and indexers (e.g. Helius-style APIs), fund-flow graphs, Solana clustering heuristics, and program authority review. Use when the user investigates Solana wallets, SPL tokens, DEX/Jito flows, rug or phishing patterns on Solana, or needs evidence-structured tracing reports with public data only.
solana-onchain-intelligence-resources
Companion to blockint-skills Solana work-official doc indexes and stacks for RPC/indexers, sanctions and address intel MCP, web research, agent payments, graph UIs, Solana Foundation dev skills, Solana Policy Institute (policy/regulatory education), optional open-source Scrapy collection (BlockchainSpider), Impersonator Solana (dApp dev/testing), coral-xyz sealevel-attacks (security pattern examples), Neodyme Solana Security Workshop (workshop.neodyme.io), and Osec Solana auditor introduction blog (osec.io). Use when the user needs pointers to Helius, Range AI, Tavily, PayAI x402, React Flow, Solana.com skills, or SPI alongside on-chain forensics-not as a substitute for reading current provider docs, legal counsel, or API keys.
solana-defi-vulnerability-analyst-agent
Guides discovery and documentation of Solana DeFi protocol risks from public code and chain state-Anchor/native programs, PDAs, CPIs, oracles, pools, SPL mechanics, and historical tx reconstruction. Use when the user asks for Solana program security review, DeFi vulnerability triage, PDA or CPI safety, oracle or liquidity-pool risk, launchpad/bonding-curve issues, or evidence-backed severity findings without exploits or private keys.