When hackers steal tokens from an account, what they generally do is divert the flow of tokens via multiple proxy accounts making it complicated for the cyber-forensics department to track final account from where these token may get withdrawn or collateralized. This image is a basic simple representation of what it might look like, however in real world it might be way more complex.

For a hackathon, we have decided to create a crypto tracking system. I've searched for API of etherscan but was unable to find how i can keep track of account from where token is transferred and to which account its transferred to. Can you please provide your insights from your experience for this project. I'd be very grateful for your insights in this project.

enter image description here

1 Answer 1


You can track the wallets in real time using the Streams API provided by moralis. Morlais streams can track any wallet, contract transactions, and contract events send you alerts in real-time and can send the transaction data to your backend webhook API.

Here is an example code on how to set up streams to monitor a wallet and get the alerts to your backend webhook API.

import Moralis from "moralis";
import { EvmChain } from "@moralisweb3/common-evm-utils";

  apiKey: "YOUR_API_KEY", // moralis API key

const stream = {
  chains: [EvmChain.ETHEREUM, EvmChain.POLYGON], // list of blockchains to monitor
  description: "monitor Bobs wallet", // your description
  tag: "bob", // give it a tag
  webhookUrl: "https://YOUR_WEBHOOK_URL", // webhook url to receive events,

const newStream = await Moralis.Streams.add(stream);
const { id } = newStream.toJSON(); // { id: 'YOUR_STREAM_ID', ...newStream }

// Now we attach bobs address to the stream
const address = "0x68b3f12d6e8d85a8d3dbbc15bba9dc5103b888a4";

await Moralis.Streams.addAddress({ address, id });

This is just a simple example you can optimize it based on your requirement to listen to various transaction data.✌️

ps: I work at Morlais

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.