Skip to content
TXray

TXray

X-ray vision for on-chain transactions

Created on 1st February 2026

•

TXray

TXray

X-ray vision for on-chain transactions

The problem TXray solves

EVM Transactions Are Opaque

Anyone who has tried to understand a DEX swap, arbitrage, or bridge transaction knows the pain: raw tx data, ABI-encoded calldata, token transfer logs, and nested internal calls are hard to read. Block explorers expose hex, addresses, and logs, but not what actually happened in plain language.

Who Feels This Pain?

PersonaPainWithout TXrayWith TXray
Regular users"Did this swap give me a fair rate?"Copy tx hash → Etherscan → guess from logsPaste hash → get a plain-language explanation
Researchers"How did this MEV bot extract value?"Manually trace flows across 10+ contractsPlain-language breakdown of the arbitrage path
Developers"Why did my contract call fail or behave unexpectedly?"Debug traces by handStep-by-step call trace with enriched addresses
Auditors"Is this tx suspicious?"Reconstruct behavior from raw dataStructured analysis with fact-checking against on-chain data
Traders"What exactly did this aggregator route do?"Jump between explorers and docsSingle narrative: entry → hops → outcome

What TXray Does Differently

  1. Natural-language explanations — Converts transaction data into a story: what was swapped, which contracts were used, and what the user gained or lost.
  2. Call trace explanation — Walks through each internal call (CALL/DELEGATECALL/STATICCALL) with labels, selectors, and context instead of raw hex.
  3. Fact-checked output — Verifies the explanation against on-chain data (token flows, internal txs, ground truth) to reduce hallucinations.
  4. Conversational UX — Supports follow-up questions ("What was the profit?" or "Which pool was used?") instead of manual log parsing.
  5. Protocol-native — Uses ERC-8004 for on-chain agent identity and reputation, x402 for pay-per-use, and A2A for agent-to-agent integration.

How It Makes Existing Tasks Easier / Safer

  • Safer: Understand exactly what a tx did before signing, or verify what happened after execution.
  • Faster: One paste instead of clicking through multiple explorers and docs.
  • Accessible: No Solidity or RPC expertise required to understand complex DeFi transactions.
  • Trustworthy: ERC-8004 reputation and fact verification provide confidence in the analysis.
  • Composable: A2A support lets other agents call TXray for tx analysis in larger workflows.

Example

Paste this EigenPhi MEV tx: 0x2a615005a63785284f11a4c5cb803d1935d34e358c10a3b4d76398d2e7bb2f9d

Without TXray: ~150 internal calls, 18+ token transfers, multiple DEXes (Compound, Uniswap V3, Curve).

With TXray: a plain-language summary such as "Withdrew 1.29M USDC from Compound → swapped via Uniswap V3 WETH/USDC and USDC/USDT → routed to Curve 3pool and tricrypto for final arbitrage. Net profit in USDT."

Challenges we ran into

1. LLM Struggling with Complex Call Traces (Main Challenge)

Problem: For transactions with many nested contract calls (e.g. 50–150 internal calls), the LLM often failed to follow the execution flow. It would infer generic behavior (e.g. “swap step”, “token transfer”) instead of using the actual call structure, and sometimes made up flows that did not match the trace.

Why it happens:

  • The call trace is a recursive tree (CALL → subcalls → sub-subcalls) while the model sees a flattened list
  • It has no stable mapping from selectors to function names, so it guesses from common patterns
  • Cross-call state and side effects (e.g. WETH unwrap → ETH transfer) are easy to miss
  • Long sequences cause the model to drop or compress parts of the trace

What we tried:

  • Address enrichment — Fetch labels/ABI for addresses in the trace so the model sees “Uniswap V3 Router” instead of 0x68b346...
  • Structured prompts — Split trace data into clear sections: token flows, internal calls, Etherscan internal txs, Tenderly trace
  • Call trace explanation node — A separate LLM pass that explains each call step-by-step, then feeds that into the main draft as reference
  • Fact verification node — Compare the draft with token flows and call trace to catch hallucinations

Outcome: The multi-node pipeline (call trace enrich → explain → draft → verify) improved consistency, but complex multi-hop MEV txs still require careful prompting and verification. The model remains better at summarizing high-level flows than at correctly inferring every internal step from raw traces.


2. LangGraph State Dropping Critical Data

Problem: Call trace explanation and Tenderly trace were produced correctly, but the draft node often received empty or incomplete data. The LLM sometimes reported "No call trace available" despite successful trace fetching.

Root cause: LangGraph's StateAnnotation only declared a subset of fields. Any field not listed was dropped when state passed between nodes.

Solution: Extended StateAnnotation to include every field used in the pipeline (tenderlyCallTrace, callTraceExplanation, etherscanInternalTxs, addressLabels, etc.), so state is preserved across nodes.


3. Fact Verification False Positives

Problem: The verification step flagged correct statements as errors. For example, when the user received 0.506 ETH from a WETH unwrap (via internal call), the verifier said "wrong: user received ETH" because the ground truth only used top-level tx.value (which was 0).

Root cause: Ground truth was built only from token flows and top-level ETH. Internal ETH flows (e.g. WETH withdraw) were ignored.

Solution: Updated buildGroundTruth to include internal ETH flows from Etherscan internal txs and Tenderly trace, and relaxed the verify prompt so it does not flag correct statements when the data supports them.


4. x402 Payment Header Parsing

Problem: The frontend sent payment data in the X-PAYMENT header but got "Invalid character" errors.

Root cause: The x402 middleware expects base64-encoded JSON in the header, not raw JSON.

Solution: Base64-encode the payment object before putting it in the header and ensure the structure matches the spec (x402Version, scheme, network, payload with signature and authorization).


5. Call Trace Display Showing undefined

Problem: CLI output showed undefined: undefined... → undefined... instead of addresses and function names.

Root cause: extractAllCallsForDisplay was called with tenderly.trace (array) instead of the root call tenderly.trace[0].

Solution: Pass tenderly.trace[0] when flattening the trace for display.


6. Old Transactions Failing on Public RPCs

Problem: Some historical transactions (e.g. from 2022) failed with TransactionReceiptNotFoundError.

Root cause: Many free RPCs prune old state and are not archive nodes.

Solution: Documented this limitation and recommended paid archive RPC or Etherscan proxy fallback for historical queries.


7. Agent Not Remembering Conversation Context

Problem: In multi-turn chat, the agent sometimes returned empty replies or ignored previous messages.

Root cause: Weak system prompt around chat history, empty messages passed to the LLM, and streaming sometimes failing to capture the final response.

Solution: Strengthened the system prompt, filtered out empty messages, and added a fallback to capture finalResponse from on_chain_end when streaming missed it.

Tracks Applied (4)

Overall Awards

Digital Economy — Open Digital Economy

Txray is using x402 as payment method

AI x Blockchain — AI & Web3 Convergence

Why TXray Fits AI × Blockchain AI side: Uses LLMs to turn raw EVM data into plain-language explanations, a LangGraph pi...Read More

Future Light (Student Prize)

Our team members are student

Discussion

Builders also viewed

See more projects on Devfolio