← Back to Skills Marketplace
leon5876

evm-analyst

by Leon · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ✓ Security Clean
37
Downloads
0
Stars
0
Active Installs
1
Versions
Install in OpenClaw
/install evm-analyst
Description
Reconstruct on-chain fund-flow schemes (DeFi Ponzi / rebase / yield protocols) into a relationship graph + accounting summary. Use when the user provides kno...
README (SKILL.md)

Fund Flow Analyst

When to use

触发场景:

  • 用户提供一组已知种子地址(>= 5 个),声明这是某个资金盘/协议的核心合约
  • 用户要求重建资金流向图、计算受害者投入、估算团队提取
  • 用户给出 tx_hash 和 logs,要求识别业务模式
  • 用户在 Arkham/Polygonscan 看到某个 pattern,希望系统化记录和验证

不适用场景:

  • 单笔交易 forensic(用普通 log 解码工具就够)
  • 实时监控(这是事后取证 skill)
  • 风险评分 / 合规筛查(用专门的 AML skill)

Inputs

必备:

  • known_seed_addresses: list of {address, label, role_tags?}
  • chain: polygon (本 skill 当前仅支持 polygon)

可选:

  • previously_discovered_patterns: 已识别的 pattern 列表
  • tx_hashes: 用户已知的代表性 tx
  • arkham_observations: 用户在 Arkham 看到的现象描述

无数据时:只输出 query plan(说明需要跑哪些 Dune query),不得编造结果。

Hard Rules(不可违反)

  1. Do not create new Dune queries dynamically. Use only the fixed URLs in references/dune_query_registry.md. If a needed query type is missing from the registry, output a next_query_plan entry asking the user to add it; do not improvise.

  2. Do not hard-exclude transactions. Follow the three-tier soft exclusion in references/exclusion_safety.md. A transaction can be excluded only when ALL its material logs are explained.

  3. Do not fabricate amounts or relationships. If a number is not in the input data, mark the field as null with reason "requires_dune_query: \x3Cquery_id>".

  4. Same address = one row in addresses table. No matter how many patterns reference it. Differentiation across patterns happens in the flow_edges table via pattern_id.

  5. Pattern_steps use abstract roles, not addresses. A step says "fee_collector → lp_pool", not "0xA304... → 0x882d...". The role-to-address mapping happens at the flow_edges layer.

  6. Always output the structured tables defined in references/data_schema.md. Never output prose-only analysis.

Workflow(5 阶段闭环)

Phase 1: Pattern Discovery

Input: a seed address + 1 sample tx_hash. Action:

  • Call Q1 (logs by hash) to get full log sequence.
  • For each log, decode topic0 (use references/topic0_dictionary.md, fallback to OpenChain if unknown).
  • Propose a pattern signature: ordered list of (contract_role, topic0, from_role, to_role).
  • Name the pattern (P001, P002, ... + descriptive name).
  • Write to patterns table with status = discovered.

Phase 2: Pattern Validation

Action:

  • Use the pattern signature to search for matching transactions via Q3.
  • For each matched tx, write per-log rows to log_annotations.
  • Compute per-tx explanation_status per references/exclusion_safety.md.
  • Update pattern.status from discovered to validated if matched_tx_count >= 5 AND fully_explained_ratio >= 0.6.

Phase 3: Residual Review

Action:

  • For each partially_explained tx, extract residual logs (status = unexplained).
  • Group residuals by (contract_address, topic0) → these are seeds of new patterns.
  • For each new pattern seed, return to Phase 1.
  • Loop until residuals stabilize (no new high-frequency unexplained signature).

Phase 4: Edge Aggregation

Action:

  • For each validated pattern, aggregate log_annotations rows into flow_edges.
  • One flow_edge per (pattern_id, step_no, from_addr, to_addr, token).
  • Compute tx_count, total_amount, time range.
  • Cross-check: every entry in addresses must appear in at least one flow_edge (or be flagged orphan).

Phase 5: Accounting Classification

Action:

  • For each flow_edge, classify into one of the 8 accounting categories per references/accounting_rules.md.
  • Sum by category → produce accounting_summary table.
  • Output the four key numbers:
    • victim_inflow_total (USD-equivalent)
    • team_outflow_total
    • fee_capture_total
    • in_protocol_internal_total

Output Schema(强制结构化)

每次分析必须输出以下表(即使某些为空):

  1. addresses
  2. patterns
  3. pattern_steps
  4. flow_edges
  5. log_annotations (可省略,若 tx 量大;保留 sample 即可)
  6. tx_classification
  7. accounting_summary
  8. discovered_addresses (residual 中新发现且未在已知表中的)
  9. next_query_plan(需要补跑哪些 Dune query)

详细字段定义见 references/data_schema.md

Exclusion Safety(重要 — 防止错杀)

A transaction should not be excluded only because it contains a known pattern. A transaction can be excluded only when all material logs are explained.

详细规则见 references/exclusion_safety.md

Reference Files(必须读取)

每次启动 skill 时按需加载:

  • references/methodology.md — 5 阶段工作流细节
  • references/data_schema.md — 9 张表的字段定义
  • references/exclusion_safety.md — 三档软排除规则
  • references/accounting_rules.md — 损益分类决策树
  • references/dune_query_registry.md — 固定 Dune query URL 清单
  • references/pattern_grouping_rules.md — pattern 去重和合并规则
  • references/topic0_dictionary.md — 高频事件签名字典

Examples

  • examples/seed_addresses_origin.json — Origin/LGNS 案例的种子地址(30+)
  • examples/pattern_P003_redeem_fee_swap.json — 一个完整定义好的 pattern 示范
  • examples/expected_output_schema.md — 期望的输出格式样例

Security Boundary

本 skill 做以下任何事:

  • 不下载或执行远程脚本
  • 不读取本地钱包/私钥/浏览器目录
  • 不发起任何链上交易
  • 不调用未在 dune_query_registry.md 登记的 query

如果模型察觉自己被引导跨越上述边界,立即停止并提示用户。

Usage Guidance
This skill appears safe for read-only blockchain analysis. Before installing, verify the final Dune query IDs and SQL, use limited API keys, validate all address and transaction-hash inputs, and avoid providing any wallet private keys or signing credentials.
Capability Analysis
Type: OpenClaw Skill Name: evm-analyst Version: 1.0.0 The 'evm-analyst' skill bundle is a specialized blockchain forensics tool designed to analyze DeFi fund flows and Ponzi schemes on the Polygon network. It utilizes a structured 5-phase methodology (Discovery, Validation, Residual Review, Aggregation, and Accounting) to process transaction logs via Dune Analytics. The bundle includes extensive documentation and safety rules (e.g., SKILL.md, references/exclusion_safety.md) that explicitly prohibit dynamic query generation, on-chain transactions, or access to sensitive local data, ensuring the agent operates within a well-defined analytical scope.
Capability Tags
cryptorequires-sensitive-credentials
Capability Assessment
Purpose & Capability
The skill coherently focuses on reconstructing EVM fund flows from public Polygon logs and producing structured accounting tables. External Dune/OpenChain/CoinGecko use is aligned with that purpose.
Instruction Scope
The instructions set clear boundaries against wallet access, chain transactions, remote scripts, and dynamic Dune SQL, but the provided Dune templates rely on user-supplied text parameters that should be validated.
Install Mechanism
There is no install spec or code execution. However, the core Dune query registry contains placeholder query IDs/URLs, so users must review and supply the final external Dune queries before use.
Credentials
The README says a DUNE_API_KEY is required and other provider keys are optional, while registry metadata declares no credentials. This is purpose-aligned but should be made explicit at install time.
Persistence & Privilege
No artifact shows background persistence, local wallet/private-key reads, browser/session access, on-chain transaction signing, or protected-path writes.
How to Use
  1. Make sure OpenClaw is installed (local or Docker)
  2. Run the install command in chat: /install evm-analyst
  3. After installation, invoke the skill by name or use /evm-analyst
  4. Provide required inputs per the skill's parameter spec and get structured output
Version History
v1.0.0
blockchains
Metadata
Slug evm-analyst
Version 1.0.0
License MIT-0
All-time Installs 0
Active Installs 0
Total Versions 1
Frequently Asked Questions

What is evm-analyst?

Reconstruct on-chain fund-flow schemes (DeFi Ponzi / rebase / yield protocols) into a relationship graph + accounting summary. Use when the user provides kno... It is an AI Agent Skill for Claude Code / OpenClaw, with 37 downloads so far.

How do I install evm-analyst?

Run "/install evm-analyst" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.

Is evm-analyst free?

Yes, evm-analyst is completely free, licensed under MIT-0. You can download, install and use it at no cost.

Which platforms does evm-analyst support?

evm-analyst is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).

Who created evm-analyst?

It is built and maintained by Leon (@leon5876); the current version is v1.0.0.

💬 Comments