ByAUJay
Smart Contract Alert Solutions: Catching Exploits Before It’s Too Late
Real-time, actionable alerts are now mission-critical for any team shipping onchain. This guide cuts through noise to show decision-makers exactly which alerting stacks work in 2025, how to wire them up, and what to monitor so you actually stop losses — not just get paged about them.
Why this matters now
- Losses are still large and fast. Chainalysis estimated $2.2B stolen in 2024, with key-theft and centralized platform compromises leading the tally. (reuters.com)
- Multiple million-dollar exploits still complete inside minutes; your window to act is 1–3 blocks on Ethereum (12s slots today), and sometimes only the mempool. (ethereum.org)
- The alert tooling landscape changed: OpenZeppelin is sunsetting the hosted Defender platform and doubling down on open-source Monitor and Relayer you can self-host (signups closed June 30, 2025; shutdown July 1, 2026). (blog.openzeppelin.com)
Below we map out concrete choices that work today and how to deploy them with precise monitors that catch real attack patterns seen in 2024–2025.
The 2025 alert stack at a glance
Choose at least one from each row; many teams mix two per row for redundancy.
- Network-level detection:
- Forta Network bots (community and custom), including Attack Detector feeds and starter kits for DeFi/bridges/stablecoins. (docs.forta.network)
- Commercial proactive platforms: Hypernative (ML, graph heuristics, policy actions), BlockSec Phalcon (mempool detection, auto-blocking, chain programs). (hypernativeio.com)
- Developer-centric monitors and serverless actions:
- Tenderly Alerts + Web3 Actions (CRON/tx/event triggers with 30s runtime, key-value storage, alert → action wiring). (docs.tenderly.co)
- Data firehoses for custom rules and invariants:
- QuickNode Streams (exactly-once, reorg-safe delivery, traces, backfills to webhook/S3/Snowflake/DB).
- Alchemy Webhooks (address activity, mined/dropped tx, custom GraphQL filters at high scale). (quicknode.com)
- Self-hosted, auditable monitoring:
- OpenZeppelin Monitor (open source, multi-chain, Slack/Discord/Email/Webhooks), plus open-source Relayer for automated responses. (github.com)
- Risk/compliance oracles you can gate transactions on:
- Chainalysis Sanctions Oracle/API for onchain checks across EVMs (free tools). (go.chainalysis.com)
- Private orderflow to land emergency transactions safely:
- Flashbots Protect RPC and MEV-Share settings (privacy vs refund knobs; /fast multiplexing to builders). (docs.flashbots.net)
What changed since last year (and why it affects your playbook)
- Defender is being phased out → self-hosting is in: OpenZeppelin released open-source Monitor/Relayer in April 2025 and began a formal Defender sunset on June 30, 2025 (final shutdown July 1, 2026). Plan migrations accordingly. (blog.openzeppelin.com)
- Circuit breakers are moving from pattern to emerging standard: ERC‑7265 proposes a protocol-wide outflow limiter you can wire to runtime detectors. It remains a community proposal, but pilots and discussions continue. (ethereum-magicians.org)
- Faster, richer pipelines: QuickNode Streams added traces and backfill templates; this enables invariant detectors based on internal calls, not just logs. (blog.quicknode.com)
- Alert → action got easier: Tenderly lets you trigger Web3 Actions directly from alerts (UI/CLI). (docs.tenderly.co)
- MEV-aware operations: Flashbots refined Protect RPC semantics and signatures in late 2025; use it for emergency pausings without exposing calls to public mempools. (collective.flashbots.net)
Real exploits to learn from — and the monitors that would have caught them
- Unauthorized minting (Gala Games, May 20–22, 2024)
- What happened: A compromised minter role minted 5B GALA on Ethereum;
600M sold ($22–29M) before response; most funds later returned. (theblock.co) - Monitors that work:
- “Mint volume spike” on ERC‑20: alert on totalSupply delta or Transfer(mint) > Xσ above baseline in a single block.
- “Role/permission changes” on AccessControl/Ownable.
- “Admin mint function calls” frequency > N in 1 block.
- Automatic responses:
- ERC‑7265 outflow rate-limit on treasury/token contracts; Safe Delay module to add a 3–15 minute review window for admin actions; Proof-of-Reserve Secure Mint style checks if your asset is backed offchain. (ethereum-magicians.org)
- Lending market “new pool activation” edge (Radiant Capital, Jan 2024)
- What happened: A flash-loan exploit hit within seconds of a new USDC market activation exploiting a rounding window; ~$4.5M drained. (cointelegraph.com)
- Monitors that work:
- “New market activation” detector plus invariants on reserve indexes abnormal jumps within first blocks after listing.
- “Deposit/withdraw loops” frequency spike for a newly listed asset.
- Automatic responses:
- Pause-guardian pattern to halt only Mint/Borrow/Transfer/Liquidate while leaving Repay/Redeem open (Governor Bravo style). (medium.com)
- Bridge and cross-chain balance drift (recurring)
- What happens: mint/burn mismatches or delayed finality cause asset imbalance.
- Monitors that work:
- Forta “Bridge Balance Difference” and DeFi/Bridge kits; backtest with traces. (docs.forta.network)
- Automatic responses:
- Queue redemptions or cap withdrawals until parity restored (fits ERC‑7265 “queue” mode). (ethereum-magicians.org)
A reference architecture that actually stops loss
- Data sources
- Logs and traces via Streams/Webhooks (QuickNode/Alchemy) with exactly-once delivery and reorg handling. (quicknode.com)
- Threat intel from Forta Attack Detector and curated bots (funding → prep → exploit → laundering). (docs.forta.network)
- Detection engine
- Combine stateless rules (event signatures, selectors) with stateful invariants (supply, NAV, oracle deltas).
- Feature: “cold start” templates for DeFi/bridges/stablecoins to shorten setup. (docs.forta.network)
- Response layer
- Self-hosted Relayer to execute “pause,” “set caps,” “set guardians,” and Safe module ops. (docs.openzeppelin.com)
- Protect RPC to land emergency tx privately; use /fast to share across builders for inclusion speed. (docs.flashbots.net)
- Paging and runbooks
- Open-source Monitor to push to Slack/Discord/Email/Webhooks; add PagerDuty/Datadog via webhook relay if needed. (github.com)
Target SLOs that we implement at 7Block Labs:
- MTTD ≤ 1 block for critical signatures; ≤ 0s for mempool-aware detectors on L2s.
- MTTR ≤ 2 blocks for “pause/cap” actions via Relayer + Protect.
- False positives < 0.1% for pager-worthy alerts (tune with allowlists and combos like “role-change + mint spike”).
Implementation recipes (copy/paste to get moving)
- Forta → OpenZeppelin Monitor → Safe pause
- Subscribe to Forta Attack Detector and relevant base bots for your contracts; have Monitor poll Forta’s public API and route CRITICAL alerts to a webhook that triggers your Relayer. (docs.forta.network)
- Relayer action: call pause() on impacted modules or execute Safe Delay-queued “setPause(true)” with an override path for the Security Council. (docs.openzeppelin.com)
- Tenderly alert → Web3 Action → Risk-off policy
- Create an Alert on “Transfer” where amount > 5σ baseline OR recipient in screening denylist; set destination = Web3 Action.
- In the Action, call your Relayer API to (a) lower borrow caps; (b) block risky senders via your allowlist; runtime limit is 30 seconds. (docs.tenderly.co)
- Build your own invariant monitors with Streams
- Provision QuickNode Streams: “blocks+receipts+traces” to your webhook; filter with JS for:
- ERC‑20 totalSupply deltas per block,
- sudden oracle price deviations vs last N blocks,
- upgrade beacon/implementation address changes not signed by expected multisig.
- Use backfill templates to precompute baselines; exactly-once delivery and reorg-safe semantics simplify correctness. (quicknode.com)
- Sanctions/blocked-address controls onchain
- Gate sensitive functions with Chainalysis Oracle isSanctioned(address) for EVMs; combine with API offchain for non‑EVM or richer metadata. (go.chainalysis.com)
- Private inclusion for emergency tx
- Route emergency pauses/upgrades through Flashbots Protect; default privacy shares only tx hash + partial logs, or set max-privacy hints. For fastest landing, use /fast to multiplex to builders. (docs.flashbots.net)
What to monitor: a concrete, prioritized checklist
Start with these 20 detectors; most teams can deploy P0–P1 in a week.
P0 (life-or-death)
- Admin key rotations, AccessControl role grants/revocations, proxy implementation changes. (openzeppelin.com)
- ERC‑20/721 supply deltas (mint/burn), especially from privileged roles. (Gala case) (theblock.co)
- New market activation guardrails (Compound/Aave forks): index jumps, deposit/withdraw loops in first blocks. (Radiant case) (cointelegraph.com)
- Bridge side-to-side balance drift beyond tolerance; halted counterparties. (docs.forta.network)
- Oracle anomalies: sudden price divergence beyond source-of-truth median (hint: use traces to detect manipulation via internal calls). (blog.quicknode.com)
P1 (strong defense)
- Flashloan bursts and tornado-style fundings to/from protocol addresses (Forta kits). (docs.forta.network)
- Rapid governance actions near timelock execution (queue → execute under unusual quorum). (gauntlet.xyz)
- Sanctions/blocked entities interacting with the protocol (Chainalysis Oracle). (go.chainalysis.com)
- MEV-sensitive flows (large DEX swaps, LP removals) that front-run liquidation cascades.
P2 (hygiene and ops)
- Event parity coverage: every privileged method emits a specific event so monitors aren’t blind. (OpenZeppelin readiness guidance) (openzeppelin.com)
- L2 sequencer health; halt/latency changes triggering “oracle sentinel” behavior. (gauntlet.xyz)
Response automation patterns that won’t brick your protocol
- Circuit breakers with governance guardrails
- Implement ERC‑7265 semantics as a module: queue outflows above rates, or revert them; tie “release” to a multi-sig or Security Council review. (ethereum-magicians.org)
- Pause-guardian scoped actions
- Use Governor Bravo pattern: pause Mint/Borrow/Transfer/Liquidate, but leave Redeem/Repay open so users can safely unwind. (gauntlet.xyz)
- Safe delay and roles
- Insert the Zodiac Delay Module (3–15 min buffer). During a crisis, you can “mark invalid” queued txs before execution. (github.com)
- Security councils for L2s and rollups
- Follow Arbitrum: 9-of-12 for emergency actions, documented transparency reports, DAO-adjustable powers. Use this as a model for rollup governance. (docs.arbitrum.foundation)
- Proof of Reserve “Secure Mint”
- Gate minting/redemptions on reserve feeds; this prevents “infinite mint” classes of incidents for wrapped or offchain-backed assets. (blog.chain.link)
Tool-by-tool: strengths and when to choose them
- Forta Network
- Best for: broad community coverage plus bespoke bots for your protocol; Defense-in-depth when combined with your internal invariants.
- Why now: curated starter kits (DeFi/bridge/stablecoin) and an Attack Detector that correlates the kill-chain stages across underlying alerts. (docs.forta.network)
- Tenderly Alerts + Web3 Actions
- Best for: fast “alert → action” without running your own infra; per-contract, per-event playbooks; great developer UX. (docs.tenderly.co)
- QuickNode Streams
- Best for: teams who want exactly-once, reorg-aware pipelines and deep traces for ML/invariants; push to storage or your microservices. (quicknode.com)
- Alchemy Webhooks
- Best for: high-scale address monitoring (100k+ addresses/webhook) and simple triggers; multi-chain support including Solana. (alchemy.com)
- OpenZeppelin Monitor/Relayer (open source)
- Best for: regulated or enterprise teams that need self-hosted control, custom notification channels, and auditable response paths. (github.com)
- Hypernative / BlockSec Phalcon
- Best for: predictive detections, mempool-level screening, and automated policy blocks; often used by chains and larger DeFi protocols. (hypernativeio.com)
- Flashbots Protect
- Best for: landing critical governance/security transactions without exposing calldata to the public mempool; tune privacy vs refund hints. (docs.flashbots.net)
Measuring success: alert quality and operational readiness
- Precision over volume
- Platforms like BlockSec and Hypernative publicly claim extremely low FP rates; hold your stack to <0.1% for pager-grade alerts by combining signals (e.g., “role-change + mint spike + source-of-funds anomaly”). (blocksec.com)
- SLOs we recommend
- Critical: MTTD ≤ 1 block, MTTR ≤ 2 blocks for pause/cap; Ops review within 10 minutes; RCA within 24 hours with replayed traces.
- Game days and backtests
- Re-run historical incidents (Gala/Radiant) against your pipeline using Streams backfills; this is the fastest way to harden rules before mainnet. (docs.arbitrum.io)
7Block Labs’ 14‑day rollout plan
- Day 1–2: Threat model + coverage map per contract; enumerate privileged functions and events (fill any event gaps first). (openzeppelin.com)
- Day 3–5: Stand up OpenZeppelin Monitor/Relayer; connect Slack/Email/Webhooks; wire Protect RPC for emergency lanes. (github.com)
- Day 5–7: Add Forta subscriptions, Tenderly Alerts → Actions for top-10 events; deploy two “kill switches” (pause-guardian and outflow rate-limit). (docs.forta.network)
- Day 8–10: Stand up Streams to webhook + traces; implement three invariants (supply delta, oracle drift, bridge imbalance). (quicknode.com)
- Day 11–12: Tabletop + live-fire: replay Gala and Radiant sequences against staging; confirm SLOs. (theblock.co)
- Day 13–14: Governance hardening: Safe Delay module, Security Council escalation (if L2/rollup), runbook sign-off. (github.com)
Bottom line
- Real-time detection without fast response is noise. Design your alerting around actions: pause, cap, queue, deny — and land them privately and quickly. (docs.flashbots.net)
- The open-source shift means you can own your monitoring and avoid single-vendor risk while still integrating Forta/Tenderly/Streams where they shine. (github.com)
- Invest in invariants mapped to known exploit classes (unauthorized mint, market activation edge, bridge imbalance). The teams that caught incidents early in 2024–2025 had those in place.
If you want a working system in two weeks, 7Block Labs can bring the tooling, playbooks, and incident drills to your stack — and leave you with a self-hosted, auditable pipeline tuned to your protocol’s exact risks.
Sources and further reading
- Ethereum 12s slots and confirm/finality concepts. (ethereum.org)
- OpenZeppelin open-source Monitor/Relayer and Defender sunset. (github.com)
- Forta Attack Detector and curated starter kits. (docs.forta.network)
- QuickNode Streams (exactly-once, traces) and backfill templates. (quicknode.com)
- Tenderly Alerts + Web3 Actions (limits/runtime/triggers). (docs.tenderly.co)
- Chainalysis Sanctions Oracle/API. (go.chainalysis.com)
- Flashbots Protect and MEV-Share privacy/refund settings. (docs.flashbots.net)
- ERC‑7265 Circuit Breaker proposal and discussions. (ethereum-magicians.org)
- Case studies: Gala unauthorized mint; Radiant new-market exploit. (theblock.co)
Meta description (1–2 sentences)
A 2025 field guide for decision-makers on smart contract alerting: which tools actually catch exploits, how to wire them into automated responses, and the concrete monitors that stop unauthorized mints, lending-market edge cases, and bridge imbalances before funds are lost. Includes up-to-date changes (Defender sunset), ERC‑7265 patterns, and reference implementations you can deploy in days. (blog.openzeppelin.com)
Like what you're reading? Let's build together.
Get a free 30‑minute consultation with our engineering team.

