The Problem
Settlement-critical systems need to know the moment a stablecoin transfer is truly final, not just 'seen' on a low-confirmation block. The usual options are both bad: build reorg-safe finality tracking from scratch — tedious, easy to get subtly wrong — or hand that guarantee to a hosted indexer and inherit someone else's uptime and roadmap for infrastructure you're supposed to own.
What Surety Does
Surety watches configured ERC-20 transfers, tracks real finality off the chain's own finalized RPC tag instead of a guessed confirmation depth, and fires a signed webhook the instant a transfer reaches that state. It runs next to your own systems, pointed at your own RPC endpoint — nothing here is hosted or SaaS.
How It Works
- Polls new blocks and decodes ERC-20 Transfer events for configured tokens.
- Tracks finality via the chain's finalized RPC tag — a protocol-level guarantee, not a guessed confirmation depth.
- Detects reorgs and recovers atomically by walking back to the last block both chains agree on.
- Fires a signed HMAC-SHA256 webhook, with retry on delivery failure, the moment a transfer is final.
- Persists all state to local SQLite for crash-safe restarts — no reprocessing, no skipped blocks.
- 22 tests simulate reorgs on a fake chain; 79–84% statement coverage on the core packages.
Why It Matters
Scoped to stablecoins on purpose: the amount transferred is the value, with no price oracle or volatility between 'seen' and 'final' — which is what makes 'this payment is safe to act on' a guarantee worth making. It never generates or holds private keys; it registers addresses you already control and watches them. No custody, no key management, no liability for someone else's funds.