Blockchain Incident Replay
Replay an exploit from tx hashes: ordered timeline, fund-flow graph and who profited.
How it works
Reconstructs an on-chain incident from one or more transactions: decodes each one, tries a call trace for internal ETH movements, nets every ETH and token transfer per address, and highlights the likely attacker cluster, its profit and the biggest losers — as an ordered timeline and a value-flow graph. Works without live chain lookups on pasted receipts.
- Each transaction is decoded with the Transaction Decoder (function, status, fee, ERC-20 transfers with symbols/decimals); if that is unavailable the receipt is read directly and Transfer(address,address,uint256) logs with 3 topics are parsed.
- debug_traceTransaction with the callTracer is attempted for internal ETH transfers (calls with value at depth > 0, DELEGATECALL excluded). Public RPC nodes usually do not expose the debug namespace; then only the top-level transaction value is counted and the result says so (set RPC_URL_<CHAIN> to a tracing node for full coverage).
- Net flow per address and asset = received − sent across all transactions in the incident. Transactions are ordered by block number and transaction index.
- Attacker heuristic: the transaction senders, contracts they created within the incident, and called contracts that end with a net gain form the suspect cluster; the sender of the earliest transaction is the likely attacker. Victims = addresses outside the cluster with the largest net losses. This is a heuristic, not attribution.
- USD values (optional): DefiLlama historical prices at the first transaction's timestamp (coins.llama.fi/prices/historical), per token contract and native coin. Unpriced assets are listed.
Use this tool in an app
These free programs for your browser have this tool built in, next to everything else the task needs.
-
Chainscope Web3 investigation desk
Investigate transactions, bridges, contracts, DAOs and wallets in one case file.
Related tools
- Transaction Decoder – See what an EVM transaction actually did: call, events, token transfers, fee, finality.
- Smart Contract Upgrade Explorer – Is this smart contract upgradeable, who controls upgrades, and what changed?
- Stablecoin Flow Explorer – USDC/USDT supply per chain, recent mints, burns and whale transfers, cross-chain totals.
How to use the Blockchain Incident Replay
Reconstruct a DeFi exploit or suspicious on-chain event from its transactions, follow every value movement, and see who gained and who lost.
What it is for
When a protocol is exploited, the first hours are confusing: several transactions, a freshly deployed contract, dozens of token transfers. The Blockchain Incident Replay turns up to five transactions into something you can reason about: an ordered timeline, every value movement, the net flow per address and asset, a suspect cluster with its profit, and the biggest losers.
Live mode decodes each transaction and tries a call trace for internal ETH transfers. Pasted mode works without live chain lookups on receipts you supply, useful for post-mortems and training. USD values can be added from DefiLlama's historical prices at the time of the first transaction.
Keep the limits in mind. The attacker label is a heuristic, not attribution. Only native coins and ERC-20 Transfer events are counted, so NFTs, internal accounting and rebasing balances aren't. And public RPC nodes usually don't allow tracing, so internal ETH transfers can be missing.
Worked example
The built-in pasted example is a classic flash-loan pattern on Ethereum, in two transactions 12 seconds apart:
- Block 21,000,000: address
0xA77a…00A1deploys contract0xC0Ff…0C01(fee 0.01 ETH). - Block 21,000,001: the same address calls
attack(uint256)on that contract with 0.1 ETH (fee 0.04 ETH).
Inside the second transaction, six movements appear:
| # | Asset | From → To | Amount |
|---|---|---|---|
| 0 | ETH | attacker → contract | 0.1 |
| 1 | USDC | lender 0x1e4D… → contract | 1,000,000 |
| 2 | USDC | contract → pool 0x9001… | 1,000,000 |
| 3 | USDC | pool → contract | 1,250,000 |
| 4 | USDC | contract → lender | 1,000,000 |
| 5 | USDC | contract → attacker | 250,000 |
The summary reads: likely attacker 0xA77a…00A1 with suspect-cluster net gain 250,000 USDC; biggest loser 0x9001…0001. The lender nets to zero (the flash loan was repaid), so it doesn't show up as a victim. The pool lost exactly 250,000 USDC. The 0.1 ETH moved inside the cluster, so it doesn't count as profit. No USD values were shown because no prices were available for this run.
How to read the result
- transactions: in block and index order, with sender, target, created contract, function, status, value, fee and trace status.
- movements: every native and ERC-20 transfer, with its source (
tx-value,transfer-logor a trace). - netFlows: received minus sent per address and asset, with a role such as "transaction sender", "contract created in incident" or "counterparty".
- suspects: the likely attacker, the cluster (senders, contracts they created and called contracts with net gains) and the profit before gas.
- victims: addresses outside the cluster with the largest net losses.
- pricing and traceSupport: what was priced, and whether internal transfers could be traced.
Tips and common mistakes
- Include the setup transactions (contract deployment, approvals) as well as the exploit itself. The cluster heuristic relies on "contracts created within the incident".
- If
traceSupportsays tracing wasn't available, internal ETH movements may be missing. Run your own tracing node (the tool readsRPC_URL_<CHAIN>) for full coverage. - Net flows hide flash loans by design. A lender that's repaid in the same transaction nets to zero, which is usually what you want.
- The "biggest loser" is often a pool contract. Map it to the protocol's depositors yourself.
- Profit is before gas; fees are listed per transaction.
FAQ
Does "likely attacker" mean this address is the hacker?
No. It's the sender of the earliest transaction in the set you provided, plus related contracts, based on value flows. It's a starting point for investigation, not proof of identity or intent.
Why are some token amounts missing USD values?
DefiLlama may not have a historical price for that token at that time, or price lookup was turned off. Unpriced assets are listed so you can value them yourself.
Can I analyse an incident on a chain that isn't listed?
Use pasted mode. Export the receipts (with transactionHash, from, to, value, blockNumber, transactionIndex, status and logs) and optionally token symbols and decimals, and the replay runs offline.
Guide last updated:
For scripts and AI agents
- JSON API:
POST https://blockchainincidentreplay.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://blockchainincidentreplay.usefulweb.site/mcp· tool nameblockchain_incident_replay
Example request
curl -s -X POST https://blockchainincidentreplay.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{…see OpenAPI examples…}'