Scans the Ethereum network for USDT ERC-20 token transfer transactions

Related tags

Cryptography ethscan
Overview

ethscan

This is a Rust command line program for scanning the Ethereum blockchain for USDT transfers within a time span and amount span.

prerequisites

It needs a fully synced local installation of the geth node for the web3 compatible Rust library. Or you can use a service like https://quiknode.pro for the RPC interface, but this can be very slow and expensive, because it has to make potentially millions of API requests, depending on the filter period.

how to compile and run the program

First install Rust, e.g. from https://rustup.rs.

You can build the program with cargo build --release. Example which lists all transactions of at least USDT 10 million on 20th November 2021:

./target/release/ethscan http://localhost:8545 2021-11-20 2021-11-21 1e7 1e42

search filter:

date from: 2021-11-20 00:00:00 UTC
date to: 2021-11-21 00:00:00 UTC
amount from: 10000000 USDT
amount to: 1000000000000000000000000000000000000000000 USDT

time (UTC),amount (USDT),from address,to address,transaction
2021-11-20 21:50:23,50000000.000000,0xed344fa1075499dac4e7eb0b868a1874dcdd36cf,0xb8ac6dec186496ad25ef7fdc7f341d93db928d30,0x32cc61b3fc064fd7e7ceab562755316645b72af158a7f4925cdc4f86210d17f5
2021-11-20 16:02:08,10000000.000000,0x6262998ced04146fa42253a5c0af90ca02dfd2a3,0x46340b20830761efd32832a74d7169b29feb9758,0x1ceb25243b19c0ee13bacf476e29ec8a95a317c49ea8581c1984115bb6544e46
2021-11-20 13:03:42,111000000.000000,0x7119cb953db332a3b60730d5d39e7b1ba5120e86,0x0548f59fee79f8832c299e01dca5c76f034f558e,0x95220146c7ec639d001171b4323bb0acafb59da223272b556c0fc8c940250252
2021-11-20 10:01:23,18010797.000000,0x2dc754a674bb130fca3b0e28e5faa1fe719e6756,0x28c6c06298d514db089934071355e5743bf21d60,0xd18cc0c4fad232ad36799bd36f5df05c9d5b9b3233e3aa4ffda215a45f421486
2021-11-20 09:13:42,10000000.000000,0xad6eaa735d9df3d7696fd03984379dae02ed8862,0xf2103b01cd7957f3a9d9726bbb74c0ccd3f355d3,0xf8fb2666804b859d919a3f5888a1a478697334188e6ffe0f9a4af1d8bfd9ed9a
2021-11-20 07:52:42,15800000.000000,0xcf04a13e8b3cbc7770c2347ba8d6f1a1b6605edc,0xda816e2122a8a39b0926bfa84edd3d42477e9efd,0x95dadd60f1ed11d373795da8d8fafc45acc2abce543195601ac3df2f885a2b6b
2021-11-20 07:44:50,13011811.600000,0x4862733b5fddfd35f35ea8ccf08f5045e57388b3,0x83ca25fc236d7dd31e6e5536f94283e3005dc93f,0x87be78f1c81185dcb00d4db1b2deca75d7c304b361aa2c9fc4b9b997d02490d0
2021-11-20 01:56:32,111000000.000000,0x4862733b5fddfd35f35ea8ccf08f5045e57388b3,0x7119cb953db332a3b60730d5d39e7b1ba5120e86,0x71c663b408ec4e52fe1bb9899e1f0f4b02023c875f34222aed1d87aabefaf0d7
2021-11-20 01:30:33,20000000.000000,0x6262998ced04146fa42253a5c0af90ca02dfd2a3,0x46340b20830761efd32832a74d7169b29feb9758,0x7ded214dd8d12948dbcd95d1cfa2a671ce73cefe581dcbedb64bd80fcb2065c3
2021-11-20 01:09:23,49999976.000000,0x21a31ee1afc51d94c2efccaa2092ad1028285549,0x4862733b5fddfd35f35ea8ccf08f5045e57388b3,0xb0818a17731109a91b7b8bf02d926b5423d626c7ed8ad697308e49efabc984e7
2021-11-20 00:35:36,59999976.000000,0xdfd5293d8e347dfe59e90efd55b2956a1343963d,0x4862733b5fddfd35f35ea8ccf08f5045e57388b3,0x1c0fa7d9233130fd311b24e4aad142fed9002845e8a92b55501410afd24b9479
2021-11-20 00:31:52,29305092.000000,0xdfd5293d8e347dfe59e90efd55b2956a1343963d,0x4862733b5fddfd35f35ea8ccf08f5045e57388b3,0xc574481cf7eab8f51386c1cb746f1bf6a00f1383d35cb9afd898018c1dba53ce
2021-11-20 00:22:18,19000000.000000,0x28c6c06298d514db089934071355e5743bf21d60,0x46340b20830761efd32832a74d7169b29feb9758,0x13201a4b51c534e86ee425ea37985b579aaac1390dffc8d2d68c526c6850e1b0

number of transactions: 13, amount sum: 517127652.60 USDT

The output can be redirected to a CSV file for using it with other programs, for example a spreadsheet program or gnuplot.

As you can see in the example, scientific number notation for the amount range is also supported. Another example would be 0 1e42 to get all transactions within the specified time period.

Scanning one day needs about 5 minutes, with a local connection on the same computer to a geth node.

geth setup

First install geth, as described here: https://geth.ethereum.org/docs/install-and-build/installing-geth and do a full sync of the blockchain. See the geth manual for details, but you can do it like this:

geth --syncmode "fast" --cache 1024

Depending on your computer and internet connection, this might need a few days, 1 GiB RAM for the cache, and about 500 GiB on your harddisk for storing the blockchain. For best performance, use a SSD for the data directory location (default location depends on the operating system, or can be specified with a command line argument).

For using it from the Rust application, you need to run it with RPC service enabled:

geth --cache 1024 --http --http.port 8545 --http.addr localhost --http.api personal,eth,net --http.corsdomain '*'

This listens to incoming connections from localhost, so the Rust application needs to run on the same computer. You could also bind it to the address 0.0.0.0 to access it from any computer, but this might be a security problem.

TODO

It could be enhanced to allow other evaluations as well, for example Ether transactions, or other ETC-20 tokens or NFTs.

You might also like...
Swap token protocol for cryptocurrencies, supported in cosmos network, such as UST, LUNA, LUNI, etc.

Tokenswap This is a Smart Contract built in Rust to run inside Cosmos SDK module on all chains that enable it. To understand the framework better, ple

An experimental fork of a16z's Helios Ethereum client which can run its network traffic over the Nym mixnet

Helios (Nym mixnet fork) Helios is a fully trustless, efficient, and portable Ethereum light client written in Rust. This fork of Helios includes nasc

Quick poc of the rsync wire protocol in Rust. Supports delta transfer.

Rsync wire protocol in Rust This is a quick poc of the rsync wire protocol in Rust. It supports delta transfer. The code is really a mess right now, a

A Software Development Kit (SDK) for Zero-Knowledge Transactions

Aleo SDK The Aleo SDK is a developer framework to make it simple to create a new account, craft a transaction, and broadcast it to the network. Table

Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transactions of your non-custodial wallets on a provider of your choice, all while respecting your privacy

Bitcoin Push Notification Service (BPNS) Description Bitcoin Push Notification Service (BPNS) allows you to receive notifications of Bitcoin transacti

The Light Protocol program verifies zkSNARK proofs to enable anonymous transactions on Solana.

Light Protocol DISCLAIMER: THIS SOFTWARE IS NOT AUDITED. Do not use in production! Tests cd ./program && cargo test-bpf deposit_should_succeed cd ./pr

A tool to help with estimating NEAR gas spent by transactions on Aurora.

Aurora Gas Estimator A tool to help with estimating NEAR gas spent by transactions on Aurora. Building from source Prerequisites Rust GNU Make (3.81+)

Fiddi is a command line tool that does the boring and complex process of checking and processing/watching transactions on EVM compatible Blockchain.

Fiddi is a command line tool that does the boring and complex process of checking and processing/watching transactions on EVM compatible Blockchain.

A package that has a collection of unspent p2wsh bitcoin transactions.

P2WSH-UTXO A package that has a collection of unspent p2wsh transactions. Useful to see what are potential unspent multisig transactions. Library Crea

Owner
Frank Buss
Frank Buss
This is a solana lite rpc which optimizes sending transactions and confirming transactions strategies.

Solana Lite RPC This project aims to create a lite rpc server which is responsible only for sending and confirming the transactions. The lite-rpc serv

Blockworks Foundation 7 Dec 24, 2022
An all-in-one IBC protocol providing fungible token transfer, interchain account, and async query functionalities

ICS-999 An all-in-one IBC protocol providing fungible token transfer, interchain account (ICA), and query (ICQ) functionalities, implemented in CosmWa

larry 9 Apr 1, 2023
ARYA Network is a polkadot/substrate based chain for Non-fungible Token platform on which we can own sell and buy the NFT's on polkadot network.

ARYA Network ARYA Network is a polkadot/substrate based chain for Non-fungible Token platform on which we can own sell and buy the NFT's on polkadot n

Pankaj Chaudhary 6 Dec 20, 2022
Rust project for working with ETH - Ethereum transactions with Rust on Ganache and also deploy smart contracts :)

Just a test project to work with Ethereum but using Rust. I'm using plain Rust here, not Foundry. In future we will use Foundry. Hope you're already f

Akhil Sharma 2 Dec 20, 2022
stealth addresses library implementing ERC-5564 over secp256k1 in rust

eth-stealth-addresses rust library implementing ERC-5564 stealth addresses using canonical ECC over the secp256k1 curve. let's make privacy on evm cha

κασσάνδρα.eth 30 Oct 9, 2023
Implements ERC-5564 for the bn254 curve using arkworks-rs

erc-5564-bn254 Uses the arkworks-rs suite of libraries, and utilities from rln Usage Note: this scheme should be used with the fork of circom-rln. use

Aaryamann Challani 21 Sep 8, 2023
Yi Token by Crate Protocol: the primitive for auto-compounding single token staking pools.

yi Yi Token by Crate Protocol: the primitive for auto-compounding single token staking pools. About Yi is a Solana primitive for building single-sided

Crate Protocol 12 Apr 7, 2022
A value transfer bridge between the Monero blockchain and the Secret Network.

Secret-Monero-Bridge A value transfer bridge between the Monero blockchain and the Secret Network. Proof-of-Concept Video Demonstration: https://ipfs.

null 28 Dec 7, 2022
Nym provides strong network-level privacy against sophisticated end-to-end attackers, and anonymous transactions using blinded, re-randomizable, decentralized credentials.

The Nym Privacy Platform The platform is composed of multiple Rust crates. Top-level executable binary crates include: nym-mixnode - shuffles Sphinx p

Nym 653 Dec 26, 2022
Substreams development kit for Ethereum chains, contains Firehose Block model and helpers as well as utilities for Ethereum ABI encoding/decoding.

Substreams Ethereum Substreams development kit for Ethereum chains, contains Rust Firehose Block model and helpers as well as utilities for Ethereum A

StreamingFast 15 Oct 25, 2022