Logo
New RPC users get 35% off their first monthView the offer
OnFinality Learn
Integration & Development11 min read

UniWhales and On-Chain Whale Monitoring: Architecture, Data Pipelines, and RPC Requirements

A technical guide to how UniWhales-style whale monitoring works under the hood, from RPC ingestion and event decoding to alerting, plus how to build and verify your own pipeline.

TL;DR

UniWhales is a DeFi analytics platform and token-gated DAO that monitors whale wallet movements across decentralized exchanges and surfaces them as dashboards and real-time alerts. The interesting engineering problem is not the membership model but the data pipeline: how raw chain data becomes decoded swap events, wallet attribution, and low-latency notifications. This article explains that pipeline as a mental model, gives a runnable implementation you can adapt, and shows how to verify results and diagnose the failure modes that make whale alerts wrong or late. It also covers where RPC quality and node infrastructure determine whether the pipeline is trustworthy.

What UniWhales Is and What This Guide Covers

UniWhales is best understood as two things layered together. The first is a DeFi analytics product: a web dashboard and alert system that tracks tokens, whale addresses, and their movements across decentralized exchanges, bridges, and lending markets. The second is a token-gated community and DAO, where a utility token (UWL) grants membership tiers such as Pro and Whale and access to the analytics surface. Public profiles describe it as a DeFi analysis community that monitors whale position movements on venues like Uniswap, SushiSwap, 1inch, and PancakeSwap, and as one of the longer-running token-gated communities in crypto.

This guide is not a membership walkthrough and not a price or funding summary. It focuses on the engineering layer that makes any whale-monitoring product useful: how on-chain data is ingested, decoded, attributed to wallets, and turned into alerts, and what infrastructure properties determine whether those alerts are correct and timely. If you are building a similar dashboard, a Telegram bot, or an internal research tool, the same pipeline applies.

The scope assumes you can run code against an EVM JSON-RPC endpoint and that you have a basic familiarity with logs, events, and ERC-20 transfers. Where the article needs a concrete endpoint, it uses placeholders such as RPC_URL rather than a specific provider URL.

  • Product layer: dashboards, alerts, membership tiers, community curation.
  • Data layer: RPC ingestion, event decoding, wallet attribution, storage, alerting.
  • Infrastructure layer: node reliability, latency, archive access, rate limits.

Prerequisites and Assumptions

Before building anything, be explicit about what you are monitoring and why. A whale tracker that watches every transfer on every chain produces noise; a tracker that watches a curated address set against specific event types produces signal. Decide your address universe, your event types (swaps, liquidity changes, bridge deposits, large ERC-20 transfers), and your latency target (seconds versus minutes).

You will need an EVM JSON-RPC endpoint that supports eth_getLogs over the block ranges you care about, plus eth_blockNumber and eth_getBlockByNumber for chain progress. If you need historical backfill beyond the recent window, you need archive-capable access. For a production alerting system you also want a websocket or subscription path, or a polling loop tuned to block time.

Finally, decide where the endpoint comes from. This article stays methodology-focused; for the concrete endpoint and provider choice, use the RPC Assistant guidance on multi-chain RPC endpoints and compare plans on the RPC pricing page.

Mental Model: From Blocks to Whale Alerts

Think of the pipeline as five stages. Ingestion pulls new blocks and logs. Decoding turns raw logs into typed events (a swap, a liquidity add, a bridge deposit). Attribution maps those events to labeled wallets. Enrichment adds context such as token metadata, USD value, and venue. Delivery pushes the result to a dashboard, a database, or a chat alert.

The critical insight is that most incorrect whale alerts come from stages two and three, not from the node. A swap event decoded with the wrong ABI produces nonsense amounts. A wallet labeled as a whale because of a single large transfer may actually be a bridge contract or an exchange hot wallet. Attribution is where analytics products earn their reputation, and it is where you should spend most of your engineering effort.

Latency is a separate axis. A pipeline can be perfectly correct and still useless if it delivers an alert ten minutes after the trade. Latency is dominated by polling interval, RPC response time, and your own processing queue, in that order.

  • Ingestion: block and log retrieval.
  • Decoding: ABI-driven event parsing.
  • Attribution: address labeling and entity resolution.
  • Enrichment: prices, token metadata, venue context.
  • Delivery: storage, dashboards, alerts.

Runnable Ingestion: Pulling Swap Logs with curl

The simplest way to see the raw material is to query logs for a known event topic over a block range. The snippet below fetches logs for a topic you supply, which you would normally set to the keccak256 hash of a Swap event signature for the DEX you are tracking. Replace RPC_URL, TOPIC0, and the block range with values appropriate to your chain and venue.

Keep block ranges modest on public endpoints; many providers cap the number of blocks or results per eth_getLogs call. If you receive a range error, split the query rather than assuming the endpoint is broken.

curl -s RPC_URL \
  -H 'Content-Type: application/json' \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "eth_getLogs",
    "params": [{
      "fromBlock": "0x1300000",
      "toBlock": "0x1300064",
      "topics": ["TOPIC0"]
    }]
  }'

Decoding and Attribution in Python

Once you have logs, decode them against the correct ABI and attribute the sender. The example below uses web3.py to read a transfer-style log and print the from/to/value fields. It is intentionally generic: swap events from different DEX forks have different field orders, so you must confirm the ABI for each venue rather than assuming one layout.

Attribution is shown as a simple label lookup. In practice you would maintain a curated address registry, refresh it from public label sources, and flag addresses that behave like contracts (for example, those that emit logs but never initiate transactions) so they are not mistaken for whales.

from web3 import Web3

w3 = Web3(Web3.HTTPProvider("RPC_URL"))

LABELS = {
    "0x0000000000000000000000000000000000000000": "burn",
    # add curated whale, exchange, and bridge labels here
}

def decode_transfer(log):
    topics = log["topics"]
    data = log["data"]
    from_addr = "0x" + topics[1].hex()[-40:]
    to_addr = "0x" + topics[2].hex()[-40:]
    value = int(data, 16) if isinstance(data, str) else int.from_bytes(data, "big")
    return from_addr, to_addr, value

def label(addr):
    return LABELS.get(addr.lower(), "unlabeled")

latest = w3.eth.block_number
logs = w3.eth.get_logs({
    "fromBlock": latest - 50,
    "toBlock": latest,
    "topics": ["TOPIC0"],
})

for log in logs:
    frm, to, value = decode_transfer(log)
    print(f"{label(frm)} -> {label(to)} value={value}")

Verification: Confirming Your Pipeline Is Correct

Before trusting any alert, verify the pipeline against ground truth. Pick a small set of transactions you can inspect manually on a block explorer, run them through your decoder, and compare the decoded amounts and addresses to what the explorer shows. If they differ, the ABI or the topic filter is wrong.

A useful verification table records, for each test transaction, the expected sender, recipient, and amount, and the values your pipeline produced. Do not fill in measured numbers from memory; run the pipeline and record actual output. The table below is a template you complete with your own runs.

Test txExpected fromExpected toExpected valuePipeline fromPipeline toPipeline valueMatch
tx A
tx B
tx C

A second verification checks latency. Timestamp the moment a block is available on your node and the moment your alert fires. The difference is your end-to-end delay. Track it over a day rather than a single sample, because RPC latency is bursty.

Troubleshooting Common Failure Modes

Most problems fall into a few recognizable categories. Missing events usually mean a topic filter or block range issue. Wrong amounts usually mean an ABI or decimal mismatch. Duplicate alerts usually mean your cursor is not persisted across restarts. Late alerts usually mean polling is too slow or your queue is backing up.

If eth_getLogs returns a range error, reduce the block span. If it returns empty results for a range you know contains activity, confirm the topic hash and that you are querying the correct chain. If results are inconsistent between runs, check whether you are hitting a load-balanced endpoint where different backends are at different heights; a dedicated node removes that variable, as described in the dedicated node overview.

  • Empty logs: wrong topic, wrong chain, or range too narrow.
  • Wrong values: ABI mismatch or token decimals not applied.
  • Duplicates: cursor not persisted; re-processing on restart.
  • Late alerts: polling interval too long or queue saturation.
  • Inconsistent heights: load-balanced backends out of sync.

Infrastructure Tradeoffs: Public, Shared, and Dedicated RPC

Public endpoints are fine for exploration but unsuitable for alerting. They rate-limit aggressively, may not support wide log queries, and offer no latency guarantees. Shared provider endpoints improve reliability and rate limits but still share capacity with other tenants. Dedicated nodes give you predictable throughput and consistent chain head, which matters when your product promise is real-time.

The tradeoff is cost and operational overhead. A whale-monitoring product that alerts on swaps across several chains needs consistent access on each chain, and the cost scales with the number of chains and the query volume. For a methodology on choosing between these tiers, see the blockchain node hosting guide. For chain-specific endpoint considerations, the networks directory lists what is available.

One practical rule: if your alert latency target is under a few seconds, budget for dedicated or high-tier access on the chains where you alert, and use shared access for backfill and research queries.

Limitations and What Whale Data Cannot Tell You

Whale monitoring observes transactions, not intent. A large transfer may be a sale, a collateral move, an internal treasury shuffle, or a bridge hop. Attribution labels are heuristics and can be stale. Address clustering can merge distinct entities or split one entity across many addresses.

Cross-chain activity compounds the problem. A position opened on one chain and hedged on another looks like two unrelated events unless you join them by entity. Any product that presents whale movements as a clean signal is compressing a lot of uncertainty into a simple alert.

Treat whale alerts as one input among several. Combine them with venue liquidity, funding rates, and your own risk limits rather than acting on a single notification.

Next Steps: Building and Operating Your Pipeline

Start with one chain and one venue. Get ingestion, decoding, and attribution correct on a small address set, verify against a block explorer, then expand. Persist your cursor so restarts do not duplicate alerts. Add latency tracking before you add more chains.

When you are ready to productionize, choose endpoints deliberately. The API service overview explains how managed access is structured, and the RPC Assistant can help you pick a concrete endpoint for your chain and workload. If you are comparing approaches for a multi-chain deployment, the multi-chain RPC guide covers the operational patterns.

Finally, document your label registry and review it periodically. The quality of a whale tracker is bounded by the quality of its attribution, and that is a maintenance commitment, not a one-time setup.

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started