On-chain monitoring without burning RPC budget
Every custodial platform faces the same question: how do you know when a deposit lands? The naïve answer — poll every wallet's balance every minute — is fine until you have 10,000 wallets, at which point you're burning ~14,000 RPC calls per hour just to detect deposits.
We do this differently:
1. Webhook subscriptions where the chain supports them
Tatum and most RPC providers offer per-address subscriptions that push events to your endpoint when something happens. We subscribe to every customer wallet at creation time. Cost: O(1) per wallet, paid once. Notification: instant.
2. Block-level watching where they don't
For chains where address-level subscriptions aren't reliable (older Bitcoin endpoints, some Solana setups), we tail blocks instead. Every confirmed block, we scan transactions for our known address set. Cost: O(blocks per day) per chain, regardless of how many wallets we have. ~144 blocks/day on Bitcoin, ~7,200 on Ethereum.
3. Reconciliation pass once an hour
Even with (1) and (2), webhooks get dropped. A reconciliation worker compares on-chain balances against our recorded state and emits a delta event for any mismatch. Cost: O(active wallets) per hour, but only against an aggregator endpoint, not per-wallet.
Net effect: we have block-level latency on detecting deposits, with a worst-case fallback that's eventually-consistent within an hour. The RPC bill scales sub-linearly with our wallet count.