EVMLOG: Identifying Correlation Patterns in On-Chain Logs from Known EVM Addresses

Preface

On-chain investigations often start from “a known address”: to find out which contracts, events, and counterparty addresses it frequently appears with across massive event logs, manually writing SQL and repeatedly changing aggregation dimensions is time-consuming and can easily miss asymmetric co-occurrence relationships on the topic1/topic2 sides. Below we introduce a community Skill on SkillHub: EVMLOG (coordinate @user_d4087b8b/evmlog). It turns “address padding → bidirectional log retrieval → pattern strength classification → transaction hash drill-down” into a step-by-step procedure an Agent can follow, and specifies querying the logs table via the Dune API.

What Is This

The full name of EVMLOG in the Skill documentation is “EVM Log Correlation Pattern Recognition (starting from a known address)”. It is maintained by SkillHub community publisher user_d4087b8b, with version 1.0.0, category it-ops-security, and source labeled as community. The Skill itself is an operational guide plus example code based on the generic SKILL.md format, without bundling a standalone CLI. After reading it, an Agent calls Dune step by step to compute and classify the co-occurrence patterns of a target address on the indexed topic1 and topic2 positions.

Official access points:

  • API URL: https://api.skillhub.cn/user_d4087b8b/evmlog
  • SkillHub page: https://www.skillhub.cn/skills/user_d4087b8b/evmlog

The page tags indicate requires_api_key=true, corresponding to the Dune API Key in the documentation.

Core Features

The capabilities below are taken from the workflow definition in the Skill documentation and can be reproduced via Step 0–8.

  1. Address normalization: left-pad a 20-byte address to the 32-byte topic matching form (A*) for equality filtering on topic1 / topic2.
  2. Bidirectional log retrieval: on a specified logs_table (e.g., polygon.logs), query topic1 = A* and topic2 = A* separately, and aggregate frequencies by contract_address, topic0, and the counterparty topic.
  3. Pattern aggregation and strength classification: merge results from both sides, and distinguish strong patterns from weak patterns using parameters such as dominance_threshold, gap_threshold, and min_sample_size.
  4. Weak-pattern expansion (optional): for sparse patterns, increase the LIMIT and join with transactions to analyze from / to distributions.
  5. Hash drill-down and sequences: for strong patterns, extract representative tx_hash values and output the contract:topic0 event sequence within the same transaction in log order.
  6. Counterparty labeling and new-address discovery: label high-frequency counterparty addresses with known_labels, and list new addresses not in the known set.
  7. Structured output: the main workflow run_skill returns a CSV string containing a strong-pattern table, a high-frequency counterparty table, and a newly discovered addresses table.

The documentation states the applicable chains as Polygon, ETH, BSC, TRON, and other EVM-compatible environments, provided the target address may appear in an event’s topic1 or topic2 (e.g., ERC20 Transfer, Approval, NFT Transfer, DeFi custom events, etc.).

Installation and Activation

The installation method shown on the SkillHub page is: let the Agent follow https://skillhub.cn/install/skillhub.md to install coordinate @user_d4087b8b/evmlog. The general procedure in the documentation is as follows.

1. Confirm SkillHub CLI is installed locally

command -v skillhub && skillhub --version

If not installed, run the full installation (recommended in the documentation):

curl -fsSL https://skillhub-1388575217.cos.ap-guangzhou.myqcloud.com/install/install.sh | bash

2. Install into the current Agent’s skills directory

When installing, you must use --dir to point to the skills path actually read by the Agent; otherwise it may land in ./skills/ by default and might not be recognized:

skillhub install @user_d4087b8b/evmlog --dir <skills directory>

Common paths (excerpted from the SkillHub installation documentation):

  • Cursor: ~/.cursor/skills/
  • Claude Code: ~/.claude/skills/
  • Codex: ~/.codex/skills/ or .agents/skills/ under the project

After installation, restart or refresh the Agent according to your client’s requirements so it loads the new Skill.

3. Prepare a Dune API Key

The Skill example code calls Dune’s query / execute / results endpoints under https://api.dune.com/api/v1/ via the request header X-Dune-API-Key. Configure the Key in your runtime environment or scripts (the documentation placeholder is YOUR_DUNE_API_KEY); do not commit it to version control.

As of writing, the statistics shown on the SkillHub page are: rating 100000, downloads 826, installs 0 (per the page, subject to change over time).

Typical Usage

After enabling the Skill, tell the Agent the target address, the on-chain log table name, and the time window, and explicitly request execution following Step 0–8 in the Skill. The documentation provides the following Python main-entry example (a configured Dune API Key and dependencies such as requests are required):

KNOWN_LABELS = {
    "0xabcdef...": "Binance Hot Wallet",
    "0x123456...": "USDT Treasury",
}

csv_output = run_skill(
    address="0xYourTargetAddress",
    logs_table="polygon.logs",
    block_time_start="2024-01-01",
    top_n_initial=10,
    top_n_expand=50,
    dominance_threshold=0.40,
    gap_threshold=0.15,
    min_sample_size=20,
    max_hash_examples=20,
    known_labels=KNOWN_LABELS,
)

with open("output.csv", "w", encoding="utf-8") as f:
    f.write(csv_output)

Required input parameters (documentation table):

Parameter Description Example
address Target address A 0xabc...
logs_table Dune log table name polygon.logs
chain Chain identifier polygon

The core SQL shape for bidirectional retrieval is: after filtering by block_time, group by topic1 = '{A_padded}' or topic2 = '{A_padded}', count by contract_address, topic0, and the counterparty topic, sort by hit_count, and apply a LIMIT to take the top N rows. The Agent should use snippets embedded in the Skill such as pad_address, run_dune_query, and fetch_log_patterns, rather than arbitrarily rewriting the aggregation dimensions.

Applicable Scenarios and Notes

Who it’s for: analysts or security engineers doing on-chain risk control, compliance investigations, and address profiling; users who are already comfortable querying logs with Dune and want to lock in the “expand a graph from a single address” workflow so a Coding Agent can run it repeatedly with the same thresholds.

Limitations and pitfalls:

  • Depends on the Dune API and the corresponding chain’s logs (and transactions in the expanded steps) table names; for TRON, BSC, etc., change logs_table, but the logic remains the same.
  • The documentation states that ABI decoding from topic0 to event names has been removed from the main workflow; if event names are needed, query 4bytes.directory or similar sources separately.
  • expand_weak_patterns is commented out by default in the main-entry example; enable it manually when interactions are sparse.
  • Query performance: the example execution uses performance: "medium"; the documentation suggests it is usable for results under one million rows. For larger ranges, shorten block_time_start or switch to a higher performance tier.
  • Each Dune query creates/executes a query, so pay attention to API quotas and private query policy (the example sets is_private: True).

Conclusion

EVMLOG decomposes correlation pattern recognition for “a known EVM address + log table” into a verifiable multi-step workflow and outputs an archiveable CSV, making it suitable as an operation manual for an Agent in it-ops-security scenarios. Installation and coordinates are per SkillHub: https://www.skillhub.cn/skills/user_d4087b8b/evmlog , API URL: https://api.skillhub.cn/user_d4087b8b/evmlog .

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye