How to Trace Stolen Crypto: On-Chain Investigation Guide
So your crypto wallet just got drained. The transaction is confirmed on-chain, the funds are gone, and the exchange says "we can't help." What now? This guide walks through the exact on-chain investigation techniques us
So your crypto wallet just got drained. The transaction is confirmed on-chain, the funds are gone, and the exchange says "we can't help." What now?
This guide walks through the exact on-chain investigation techniques used by professional blockchain investigators β the same methods that helped South Korean prosecutors secure their first DEX rug pull indictment, and the same tools used to trace North Korean APT groups.
Step 1: Secure the Scene
Before investigating, preserve evidence:
# Record the attack transaction hash immediately
# Take screenshots of wallet balances before they change
# Export transaction history from your wallet
# Do NOT interact with the attacker's contract further
Why this matters: Blockchains are immutable, but your local evidence (wallet state, timestamps) isn't. Capture everything before it changes.
Step 2: Identify the Attack Transaction
Every exploit starts with a transaction. Find it on a block explorer:
| Chain | Explorer |
|---|---|
| Ethereum | Etherscan.io |
| BSC | BscScan.com |
| Solana | Solscan.io |
| Arbitrum | Arbiscan.io |
| Base | Basescan.org |
Look for:
- Token transfers you didn't authorize β Approvals you didn't make
- Large outflows to unknown addresses β Your funds moving out
- Contract interactions you don't recognize β Unknown function calls
Step 3: Trace the Funds β Following the Money
This is where on-chain forensics begins. The attacker has your funds, and they need to cash out. That's their weak point.
Direct Tracing
Your Wallet β Attacker Wallet A β Wallet B β Wallet C β CEX Deposit
Track each hop using block explorer "Internal Transactions" and "Token Transfers" tabs.
Clustering: Finding Connected Wallets
Attackers rarely use one wallet. They spread funds across multiple addresses to obscure the trail. Look for:
- Same timing patterns β Multiple wallets transacting within seconds
- Funding from same source β Multiple wallets funded by the same parent
- Dust transactions β Tiny test transfers before moving larger amounts
The CEX Bottleneck
Attacker wallets β Mixer/Tornado Cash β ... β CEX deposit address β KYC identity
When attackers convert crypto to fiat, they must use regulated exchanges. This is where pseudonymity breaks down. Law enforcement can subpoena the CEX for KYC data.
Step 4: Analyze the Smart Contract
If the exploit involved a smart contract interaction, analyze the contract:
Red Flags in Contract Code
- Hidden swap logic in transferFrom() β The ATM Token exploit hid a 20% auto-swap
- Unlimited mint functions β TesseraDAO attacker minted 2.5M USDT from nothing
- Admin key backdoors β Multiple projects had "owner-only" functions that drained funds
- Proxy upgradeability β Contract logic can be swapped after deployment
Tools for Contract Analysis
- Etherscan "Read Contract" β Check state variables and access controls
- Slither β Automated vulnerability scanner
- Foundry β Advanced testing and fuzzing framework
- OpenZeppelin β Compare against secure standard implementations
Step 5: Build the Timeline
Map every event chronologically:
| Time | Event | Significance |
|---|---|---|
| T-7d | Attacker deploys contract | Pre-planned attack |
| T-1d | Attacker funds wallet | Preparation phase |
| T-0 | Exploit transaction | Attack execution |
| T+1h | Funds split across wallets | Obfuscation |
| T+6h | CEX deposits begin | Cash-out attempt |
Timeline analysis reveals intent β a critical element for law enforcement.
Step 6: Check for Pattern Matches
Most attackers aren't first-timers. Cross-reference:
- Same contract deployer address β Attackers reuse wallets
- Same exploit pattern β The ATM Token attacker also hit DxSale and TesseraDAO
- Same CEX deposit addresses β Links to identity
- Same code patterns β Copy-pasted exploit contracts
Public Resources
- CertiK Alert (@CertiKAlert) β Real-time exploit notifications
- Blockaid β On-chain threat detection
- PeckShield β Attack analysis
- ChainSentinel API β Automated security checks
Step 7: Report and Recover
Filing a Report
- Local law enforcement β File a cybercrime report with transaction hashes and timeline
- FBI IC3 (if US-related) β Internet Crime Complaint Center
- Exchange notifications β Alert CEXs where attacker may cash out
- Blockchain analytics firms β Chainalysis, Elliptic, TRM Labs
What Actually Works
- CEX freezes β If funds land on a regulated exchange, they can be frozen before withdrawal
- Tether blacklists β USDT can be frozen at the contract level
- Law enforcement subpoenas β CEX KYC data leads to real identities
- Civil litigation β South Korea's CATFI case proves DEX rug pulls are prosecutable
Real-World Cases
The CATFI Precedent (South Korea, 2026)
5 suspects indicted for a $600K Solana DEX rug pull. Key breakthrough: attacker's pseudonymous wallets were traced to Korean CEX accounts with mandatory KYC.
Drift Protocol $285M (Solana, 2026)
North Korean APT drained Solana's largest perps exchange. Tether froze $14.5M. The on-chain trail revealed state-sponsored attack patterns.
ATM Token $243.5K (BSC, 2026)
Hidden swap logic in transferFrom() allowed systematic value extraction. Same attacker also exploited DxSale ($7.3M) and TesseraDAO ($2.5M).
Essential Tools for On-Chain Investigation
| Tool | Purpose | Cost |
|---|---|---|
| Etherscan/BscScan | Transaction tracing | Free |
| TokenSniffer | Token safety checks | Free |
| Revoke.cash | Approval management | Free |
| Arkham Intelligence | Wallet labeling | Free tier |
| ChainSentinel | Automated security API | Free tier |
| Nansen | Whale tracking | Paid |
| Chainalysis | Professional forensics | Enterprise |
Key Principles
- The blockchain never forgets β Every transaction is permanent and verifiable
- Pseudonymous β anonymous β Cash-out requires KYC, breaking anonymity
- Speed matters β Reporting quickly increases chances of fund recovery
- Pattern recognition β Attackers repeat methods; previous incidents provide clues
- On-chain evidence is admissible β Courts increasingly accept blockchain data
The tools and techniques are accessible to everyone. You don't need to be a professional investigator to trace stolen funds β you just need to know where to look.
For automated security checks on any crypto address or token, try ChainSentinel API β real-time risk analysis with x402 pay-per-call pricing.
More investigation reports at On-Chain Investigations
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.