This project indexes real-time POL token transactions on the Polygon blockchain and provides actionable insights into Binance inflows and outflows, enabling traders, analysts, and developers to monitor liquidity movements effectively.
- Real-time POL token transfer tracking on Polygon blockchain
- Binance address monitoring with cumulative net-flow calculations
- Beautiful dark galaxy-themed UI with starfield animations and neon accents
- High-performance Rust backend with SQLite database
- WebSocket real-time updates for live data streaming
- RESTful API for querying indexed data
- Scalable architecture designed for multi-exchange support
- Rust 1.70+ and Cargo
- SQLite development libraries
- Node.js 18+ (for frontend dependencies)
- Clone the Repo:
git clone https://github.com/GeneralSparsh/polygon-indexer.git
cd polygon-indexer- Extract the project:
unzip polygon-indexer.zip
cd polygon-indexer- Install Rust dependencies:
cargo build --release- Set up environment variables:
cp .env.example .env
# Edit .env with your Polygon RPC settings- Run database migrations:
cargo run --bin setup_db- Build the frontend:
cd ui
npm install
npm run build
cd ..- Start the indexer:
cargo run --release- Access the web interface:
Open: http://localhost:3000
0xF977814e90dA44bFA03b6295A0616a897441aceC0xe7804c37c13166fF0b37F5aE0BB07A3aEbb6e2450x505e71695E9bc45943c58adEC1650577BcA68fD90x290275e3db66394C52272398959845170E4DCb880xD5C08681719445A5Fdce2Bda98b341A49050d8210x082489A616aB4D46d1947eE3F912e080815b08DA
GET /api/netflow- Get current cumulative net flowGET /api/transfers- List recent POL transfersGET /api/stats- Get indexer statisticsGET /api/health- Health check
ws://localhost:3000/ws- Real-time updates stream
Key environment variables in .env:
POLYGON_RPC_URL=https://polygon-rpc.com/
POLYGON_WS_URL=wss://rpc-mainnet.matic.network
DATABASE_URL=data/indexer.db
HOST=127.0.0.1
PORT=3000
POL_CONTRACT=0x0000000000000000000000000000000000001010
RUST_LOG=infoThe architecture is designed for easy expansion to support multiple exchanges and blockchains while maintaining high performance and reliability.
cargo testcargo run --bin reset_db # Reset database
cargo run --bin setup_db # Setup databasecd ui
npm run dev # Start development server
npm run build # Build for productionMIT License - see LICENSE file for details.
Built using Rust and modern web technologies