AnySec
Managed SOC for a DeFi Protocol: Why Your Alert Has to Beat the Next Block
← InsightsManaged SOC · 9 min read

Managed SOC for a DeFi Protocol: Why Your Alert Has to Beat the Next Block

A non-custodial DeFi protocol has almost no traditional SOC surface — no employee endpoints, no customer login flow. What's actually monitorable, and why detection has to outrun block time, not minutes.

By AnySec EngineeringAnySec engineering

The short answer

A non-custodial DeFi protocol has almost none of what a traditional SOC watches — no employee laptops, no customer login flow, no internal network to instrument. What's actually monitorable is narrow: admin and deployer-key activity, the front-end and RPC infrastructure the protocol's UI depends on, and the public on-chain event stream itself. The harder constraint isn't coverage, it's timing — a confirmed on-chain transaction is final the instant it's included in a block, so detection has to be positioned to catch an attack before or during that block, not simply respond "fast" by the standards of a SaaS SOC.

Who this is for

This is for a protocol engineering lead, Head of Security, or DAO security contact at a Web3 or DeFi platform — a lending protocol, DEX, or other non-custodial smart-contract system — trying to work out what continuous monitoring even means when there's no traditional infrastructure to point a SIEM at. It assumes you've already thought through what happens after an alert fires — see incident response for a DeFi protocol: there's no wallet to freeze for that, which explicitly notes that triggering a guardian pause mid-incident "isn't a SOC analyst's job" — this post is about the detection layer that decides whether there's any warning at all before that incident starts. It's not the playbook for a centralized exchange's SOC, which has an entirely different, much wider surface — custody pipeline, withdrawal flow, employee access, trading UI — see building a SOC for a crypto exchange from scratch for that.

What a DeFi protocol's SOC surface actually looks like, compared to a centralized target

DimensionCasino / centralized exchange SOCNon-custodial DeFi protocol SOC
Primary monitorable surfaceEmployee endpoints, customer accounts, internal network, trading UI, withdrawal pipelineAdmin/deployer-key and multisig activity, front-end/RPC infrastructure, public on-chain event stream
Detection toolingConventional SIEM plus custody/trading-specific rulesPurpose-built on-chain monitoring (e.g. Forta detection bots, OpenZeppelin Monitor) layered over infrastructure monitoring
Time from suspicious signal to irreversible lossMinutes to hours — a login can be locked, a withdrawal frozen mid-flightEffectively zero once a transaction is confirmed — the exploit is final the moment it's in a block
What "fast" meansFaster than an attacker can complete a multi-step drainFast enough to catch activity in the mempool or flag it within the same block window it lands in
What an alert typically producesA chance to contain an active incidentEither an early catch, or a fast, accurate confirmation that an exploit already happened

The practical consequence: for a casino or exchange, a SOC's value is mostly in the response window it buys you. For a DeFi protocol, a meaningful share of that value comes from something else entirely — a SOC that reliably confirms what just happened within minutes, so the guardian, negotiation, and disclosure decisions covered in incident response start from accurate information instead of a scramble to understand the blockchain explorer.

What continuous on-chain monitoring is actually built from

Two categories of tooling cover most of the technical surface:

  • On-chain event and transaction monitoring. The Forta Network runs community-built detection bots against every new block — Forta's own documentation describes it as monitoring "on-chain activity in real-time, detecting threats, security-related events and other noteworthy activity," with scan nodes that "listen for new blocks and transactions, run assigned detection bots against that data, and publish any alerts." OpenZeppelin Monitor (the current product name — OpenZeppelin's own docs note that "Defender is now in maintenance mode" and clients should migrate to it) watches on-chain contract transactions and "notifies when one matches the parameters, filters, or events" a team configures.
  • Admin/deployer-key and infrastructure monitoring. Watching for any transaction touching an upgrade function, a deployer key, or a multisig signer set, plus uptime and integrity monitoring on the RPC endpoints and front-end the protocol's UI depends on — a different failure mode than a contract exploit, covered separately in private Anycast for Web3 infrastructure and DDoS stress testing for Web3 infrastructure.

Neither tool category is a drop-in SIEM replacement. Detection logic has to be written and tuned against a protocol's specific contracts, and someone has to actually staff the response when a bot fires — the tooling produces alerts, not outcomes.

What the Curve Finance case shows about the timing problem

On July 30, 2023, several Curve Finance liquidity pools were exploited through a re-entrancy vulnerability present in specific versions of the Vyper compiler (0.2.15, 0.2.16, and 0.3.0), which let attackers manipulate how the affected contracts calculated balances. Losses totaled roughly $70 million across multiple pools — including about $18 million from Curve's own CRV/ETH pool and about $12 million from JPEG'd's pETH-ETH pool, per Chainalysis's technical analysis.

Part of the CRV/ETH pool's losses were recovered within hours — not by the protocol team, but by an independent MEV bot operator identified on-chain as c0ffeebabe.eth, who exploited the same vulnerability ahead of other attackers and then voluntarily returned approximately $5.3 million from the CRV/ETH pool and approximately $1.6 million from a separate Metronome pool. That recovery happened because someone was already watching the mempool closely enough to front-run the exploit path in near-real time — not because a SOC alert gave the protocol team time to intervene. The lesson isn't that a bot will save you; it's that the actors capable of acting inside a block window were external and opportunistic, and a protocol without its own equivalent monitoring has no chance of ever being the one who reacts first.

What Managed SOC coverage delivers for a DeFi protocol

Managed SOC for a non-custodial protocol is scoped around the three surfaces above rather than a generic SIEM rollout: detection content tuned to your specific contracts and admin/multisig configuration on a platform like Forta or OpenZeppelin Monitor, infrastructure monitoring on the RPC and front-end layer, and a triage process built for the reality that most alerts here are confirmation, not prevention — getting an accurate, fast read on what happened so the decisions covered in incident response for a DeFi protocol start from facts instead of guesswork.

Limitations

This isn't a claim that on-chain monitoring can reliably catch an exploit before it's confirmed — the Curve case shows the fastest actor in that window was an opportunistic third party, not the protocol's own team, and that pattern is closer to normal than exceptional. Monitoring tooling also doesn't replace a smart-contract audit or a tested pause mechanism; without a pause function someone is authorized and able to trigger, even a same-block alert has nothing to act on. And it isn't a claim about any specific detection bot's accuracy or false-positive rate for your contracts specifically — that depends entirely on how well the detection logic is tuned to what your protocol actually does.

What to do next

If your protocol has no monitoring on admin/deployer-key activity, your RPC and front-end infrastructure, or the on-chain event stream itself, that's a detection gap worth closing before an incident forces the question — request a coverage review. If the detection layer is already in place and the open question is what happens when it fires, incident response for a DeFi protocol covers that next step.

Frequently asked questions

What can a SOC actually monitor for a non-custodial DeFi protocol, if there's no traditional infrastructure? Three surfaces exist even when there's no employee fleet or customer login flow to watch: admin/deployer-key and multisig activity (anything touching upgrade or privileged functions), the front-end and RPC infrastructure the protocol's UI depends on, and the public on-chain event stream itself — contract calls, unusual transaction patterns, and liquidity or price movements that don't match normal usage. None of these look like a conventional SIEM feed, which is why generic SOC tooling doesn't map cleanly onto a protocol without adaptation.

Why does the response window matter so much more here than for a casino or centralized exchange? A casino or exchange SOC has minutes to hours before an alert turns into irreversible loss — a suspicious login can be locked, a withdrawal can be frozen mid-flight. A confirmed on-chain transaction is final the moment it's included in a block. If a detection bot's alert fires after the exploiting transaction is already confirmed, the alert is a forensic record, not a chance to act — which is why detection here has to be positioned to catch the attack in the mempool or in the same block window, not simply "fast" by SaaS-SOC standards.

What tools does this kind of monitoring actually rely on? Community and vendor tooling exists specifically for this: the Forta Network runs community-built detection bots against every new block in real time and emits alerts when a bot's conditions match, and OpenZeppelin Monitor (the successor to Defender's Monitor module) watches on-chain contract transactions against configured parameters, filters, and events and notifies on a match. Neither is a drop-in SIEM replacement — they're purpose-built for the on-chain surface, and someone still has to write the detection logic, tune it against your specific contracts, and staff the response when an alert fires.

Does a SOC replace the need for a smart contract audit or an emergency-pause mechanism? No — a SOC watches for and alerts on suspicious activity; it doesn't remove a vulnerability from your contract code, and it can't trigger a pause function that was never built. Detection tells you something is happening and, in the best case, tells you fast enough for a rehearsed guardian to act on a pre-built pause. Without that pause mechanism already in place, the fastest alert in the world still arrives after an atomic exploit transaction has already settled.

How is this different from the incident response coverage for a DeFi exploit? This is the layer that runs before an incident and is meant to either catch an attack early enough to matter or, more realistically, produce the fast, accurate confirmation that an exploit has happened — our incident response coverage for a DeFi protocol explicitly starts from the assumption that detection has already told you something is wrong and covers what happens next: scoping the loss, checking pause/guardian options, and opening a recovery channel. A SOC is the detection layer; incident response is what happens once that layer has fired.

Sources and review

The Forta Network's function and mechanism ("monitors on-chain activity in real-time," scan nodes "listen for new blocks and transactions, run assigned detection bots against that data, and publish any alerts") are quoted directly from Forta's own documentation. OpenZeppelin Monitor's function and its status as the current successor product ("Defender is now in maintenance mode... we recommend migrating to OpenZeppelin Monitor") are quoted directly from OpenZeppelin's own documentation. The Curve Finance incident facts (July 30, 2023; Vyper compiler versions 0.2.15/0.2.16/0.3.0 re-entrancy vulnerability; ~$70M total losses; ~$18M from the CRV/ETH pool and ~$12M from JPEG'd's pETH-ETH pool; the c0ffeebabe.eth MEV bot's recovery of ~$5.3M from the CRV/ETH pool and ~$1.6M from a Metronome pool) are quoted directly from Chainalysis's technical analysis. No AnySec-original numbers, case results, or SLA claims are cited. Author: AnySec Engineering. Published 2026-09-20; last reviewed 2026-09-20.


Related reading

Rather not learn this in production.

Talk to the engineers behind these write-ups — no sales script, a straight read on where you stand.

Get a fixed quote