Skip to content

Replacing OpenZeppelin Defender in 2026: what is left, what replaced it, and a monitor-and-pause setup we tested

OpenZeppelin Defender is retired. What replaced each of its nine modules, and a self-hosted Monitor, Relayer and guard-service setup that pauses a token end to end.

Replacing OpenZeppelin Defender in 2026: what is left, what replaced it, and a monitor-and-pause setup we tested

Replacing OpenZeppelin Defender in 2026: what is left, what replaced it, and a monitor-and-pause setup we tested

Defender is already gone

There is no Defender left to configure. OpenZeppelin announced the sunset on 30 June 2025, closed new sign-ups the same day, and retired the hosted service on 1 July 2026 (Defender sunset FAQ). A year of warning before the lights went out is more than most vendors manage.

What survived is open source: Monitor (the old Sentinels), Relayer, and Role Manager, all AGPL-3.0, plus a paid Managed Service that runs Monitor and Relayer for you at a price OpenZeppelin does not publish.

For the job most teams relied on Defender for, watching a contract and pausing it when something looks wrong, the practical answer is to self-host Monitor and Relayer with a small guard service between them. We built that stack and ran it against a local chain. This article maps every Defender module to its replacement and walks through the stack, its configuration, and the problems we hit.

Nine modules, nine answers

Defender was never one product. It was nine modules: Monitor, Actions, Relayers, Deploy, Transaction Proposals, Access Control, Code Inspector, Address Book, and the audit add-on. Each one now needs its own answer, and that is the most useful thing to know before you shop.

| Defender module | Free or self-hosted | Paid | |---|---|---| | Monitor (ex-Sentinels) | OpenZeppelin Monitor, Lido onchain-mon, Forta | Tenderly Monitor, KeeperHub, Hypernative, Chainalysis Hexagate, BlockSec Phalcon | | Actions (ex-Autotasks) | Relayer plugins, or your own cron job with a KMS signer | Tenderly Web3 Actions, KeeperHub, Mimic | | Relayers | OpenZeppelin Relayer | thirdweb Transactions, Turnkey, Fireblocks | | Deploy | Hardhat or Foundry with the OpenZeppelin Upgrades plugins | none | | Transaction proposals | Safe with its transaction-hash check | Den | | Access control | OpenZeppelin Role Manager, Zodiac Roles Modifier | none | | Code inspection | Slither and Aderyn in CI | Audit firms | | Address book | A versioned JSON file in the repo | Safe's address book |

The open-source column covers most of it. The catch is that you now own what Defender owned for you: RPC keys, uptime, on-call, and the alert that tells you the alerting stopped.

The customer setup: watch, alert, pause

The setup we build for a customer project has three parts: OpenZeppelin Monitor, OpenZeppelin Relayer, and a small guard service. It assumes a token on an EVM chain, an ops group on call, a Safe that holds the admin roles, and one hot key whose only on-chain permission is to pause. In the setup we deliver, that hot key signs nothing else: no minting, no upgrades, no unpausing.

To prove the loop rather than describe it, we rebuilt the same stack on a local Anvil chain with a stand-in ERC-20 of about 60 lines and one pauser address. The files below are the customer configuration; for the test run we pointed them at the local chain and replaced the addresses.

A Defender setup answered three questions. The replacement has to answer the same three:

  1. Is anything odd happening on our contracts? Monitor watches the contract for the events that matter.
  2. Does the right person find out? The alert carries the transaction hash and goes to a place people read, not a dashboard nobody opens.
  3. Can we stop the damage without waking three people up? The guard service turns the alert into a signed pause() sent through the Relayer.

End to end, it runs like this:

  1. Monitor polls the network on a cron schedule, pulls each new confirmed block, and matches logs and transactions against the rule's expressions.
  2. A match fires the rule's triggers. The guard service receives a webhook with the event, the value and the transaction hash.
  3. The guard checks the event type and the value against its own threshold, then calls the Relayer API with an idempotency key for the action.
  4. Relayer picks a nonce, prices the transaction, signs with the scoped key from its keystore, submits, and tracks the status.
  5. Relayer posts status updates to its own webhook, so the ops channel sees pending, sent, confirmed without anyone refreshing a page.

Everything the pauser key cannot do, such as unpausing, minting or upgrading, stays with a multisig. Zodiac's Roles Modifier can enforce that kind of scope on-chain rather than in a dashboard.

How we built it

We ran the whole loop while writing this: a local Anvil chain, the test token, the openzeppelin/openzeppelin-monitor:latest and openzeppelin/openzeppelin-relayer:latest Docker images, and the guard service in Node. The files below are that configuration, pointed at a local chain for the test with addresses and URLs replaced by placeholders.

Tailor your workshop with CypherX

1. Network definition

Monitor reads each network from its own JSON file. confirmation_blocks is the important field: it decides how many blocks the alert waits before firing.

{
  "network_type": "EVM",
  "slug": "client_mainnet",
  "name": "Client Mainnet",
  "rpc_urls": [
    { "type_": "rpc", "url": { "type": "plain", "value": "https://your-rpc" }, "weight": 100 }
  ],
  "chain_id": 8453,
  "block_time_ms": 2000,
  "confirmation_blocks": 3,
  "cron_schedule": "*/10 * * * * *",
  "max_past_blocks": 100,
  "store_blocks": false,
  "recovery_config": { "enabled": true, "cron_schedule": "0 */5 * * * *", "max_blocks_per_run": 10, "max_block_age": 1000, "max_retries": 3, "retry_delay_ms": 1000 }
}

2. The monitor rule

Rules are JSON: an address and the events you care about, then expressions over their arguments. This one fires on transfers above 100 tokens and on every Paused event, and it only looks at successful transactions.

{
  "name": "Large transfer or pause on the asset token",
  "paused": false,
  "networks": ["client_mainnet"],
  "addresses": [
    {
      "address": "0xYourToken",
      "contract_spec": [
        { "anonymous": false, "type": "event", "name": "Transfer",
          "inputs": [
            { "indexed": true, "internalType": "address", "name": "from", "type": "address" },
            { "indexed": true, "internalType": "address", "name": "to", "type": "address" },
            { "indexed": false, "internalType": "uint256", "name": "value", "type": "uint256" }
          ] },
        { "anonymous": false, "type": "event", "name": "Paused",
          "inputs": [{ "indexed": true, "internalType": "address", "name": "account", "type": "address" }] }
      ]
    }
  ],
  "match_conditions": {
    "functions": [],
    "events": [
      { "signature": "Transfer(address,address,uint256)", "expression": "value > 100000000000000000000" },
      { "signature": "Paused(address)", "expression": null }
    ],
    "transactions": [{ "status": "Success", "expression": null }]
  },
  "trigger_conditions": [],
  "triggers": ["guard_webhook"]
}

triggers is a list, so the same match can also go to the ops channel through a second trigger. The same pattern of signature plus expression covers RoleGranted, a proxy's Upgraded event, or any other event on the contract.

3. The webhook trigger

The trigger's message template can reference the monitor and the matched event. That is how the guard receives the value and the transaction hash.

{
  "guard_webhook": {
    "name": "Guard service",
    "trigger_type": "webhook",
    "config": {
      "url": { "type": "plain", "value": "https://guard.internal/alert" },
      "method": "POST",
      "secret": { "type": "environment", "value": "GUARD_WEBHOOK_SECRET" },
      "headers": { "Content-Type": "application/json" },
      "message": {
        "title": "${monitor.name} fired",
        "body": "event=${events.0.signature} value=${events.0.args.value} tx=${transaction.hash}"
      }
    }
  }
}

4. The relayer

The Relayer holds the signing key and the per-network policy. You give it a signer and point it at the same network definitions.

{
  "relayers": [
    {
      "id": "asset-pauser",
      "name": "Asset Pauser",
      "network": "client_mainnet",
      "paused": false,
      "notification_id": "ops-webhook",
      "signer_id": "pauser",
      "network_type": "evm",
      "policies": { "min_balance": 0 }
    }
  ],
  "signers": [
    {
      "id": "pauser",
      "type": "local",
      "config": {
        "path": "config/keys/pauser.json",
        "passphrase": { "type": "env", "value": "KEYSTORE_PASSPHRASE" }
      }
    }
  ],
  "notifications": [
    { "id": "ops-webhook", "type": "webhook", "url": "https://ops.internal/relayer", "signing_key": { "type": "env", "value": "WEBHOOK_SIGNING_KEY" } }
  ],
  "networks": "./config/networks",
  "plugins": []
}

We used a local keystore. In production the key should not sit in a file on the box; the Relayer repository lists the managed signers it supports.

The signing key matters more than the tool. The relayer address only ever gets the pauser role. If any on-chain allowlist still names Defender's old relayer address, it needs the new one.

5. The guard service

The piece nobody sells you is the decision between "alert" and "act". Ours is a small service with one job: take the monitor webhook, check it again, and call the relayer. On the customer project it also gates the second path: above the hard limit it opens a Safe proposal instead of pausing on its own.

const RELAYER_ID = 'asset-pauser';
const PAUSE_SELECTOR = '0x8456cb59'; // pause()
const THRESHOLD = 100n * 10n ** 18n; // 100 tokens, same as the monitor rule

// body: the message body rendered by the guard_webhook template
const value = BigInt((body.match(/value=(\d+)/) || [])[1] || '0');
if (!body.includes('event=Transfer') || value <= THRESHOLD) return;

await fetch(`${RELAYER_URL}/relayers/${RELAYER_ID}/transactions`, {
  method: 'POST',
  headers: {
    'content-type': 'application/json',
    authorization: `Bearer ${process.env.RELAYER_API_KEY}`,
    'idempotency-key': `pause:${TOKEN}`,
  },
  body: JSON.stringify({ to: TOKEN, value: 0, data: PAUSE_SELECTOR, gas_limit: 200000, speed: 'fast' }),
});

That snippet makes two deliberate choices. First, the guard re-checks the threshold instead of trusting the monitor's expression, so a template change cannot widen the action. Second, the idempotency key names the action, not the triggering transaction, so a burst of matching transfers or a retried webhook sends one pause rather than several.

6. What happened when we ran it

On the local chain, a 10-token transfer produced no alert. A 250-token transfer produced the monitor alert and a pause() transaction signed by the relayer from its own address. The transaction confirmed, and paused() then read true on the token. The relayer's webhook reported pending → sent → submitted → mined → confirmed for the same transaction.

That is the Defender Actions loop running on infrastructure you own. The recurring cost is the RPC plan and the box it runs on.

7. How it plays out in an incident

On a customer deployment, the same loop reads like this:

  1. A transfer above the limit lands at 02:14. Monitor fires once the configured confirmations pass.
  2. The ops channel gets the alert with the transaction hash and the amount; the guard calls the relayer.
  3. The relayer signs pause() with the pauser key and the token stops moving. The channel gets sent, then confirmed.
  4. The treasury on call reviews the transaction in the block explorer. If it was genuine traffic, unpausing is one Safe transaction, because the hot key cannot unpause.
  5. If the movement was above the auto-response limit, nobody's key moved: the guard opened a Safe proposal, and two signers decide.

The point of the split is that the automated path can only ever stop things. Anything that starts them again goes through people.

Running it day to day

The tooling is the easy half. Two thresholds do most of the work. Below a hard limit, the guard pauses on its own. Above it, the decision goes to the multisig, so a false positive costs a signature instead of halting a market.

Then drill it. Once a month, pause on a fork, watch the alert arrive, watch the transaction confirm, unpause. A drill you have run is worth more than a config you have only read.

The failure that bites is the quiet one. A stalled monitor sends nothing at all, so watch the checkpoint and not only the contract: page someone when the last processed block falls more than N blocks behind the chain head, or when the process stops writing a metric.

Two housekeeping notes. Give the monitor's alerts and the relayer's status updates separate webhook URLs, because one guard parsing two payload shapes is a bug waiting for a busy night. And pin the images. latest is convenient on day one and a surprise on day ninety.

Gotchas we hit

Each of these cost us time:

  • confirmation_blocks adds that many blocks of latency. With 3, the alert waits three blocks after the transaction.
  • functions and trigger_conditions must be present in a monitor rule, even as empty arrays. Omitting them fails config validation with missing field errors.
  • On an idle local chain, Monitor logs Duplicate block detected every poll. It is noisy, not fatal.
  • Monitor logs warnings for plain-HTTP and unauthenticated webhooks. That is a fair reminder that the guard endpoint should use HTTPS and a shared secret.
  • Relayer rejects a transaction that carries no speed, gas_price or EIP-1559 fields: Transaction must specify either gasPrice, speed, or EIP1559 parameters.
  • API_KEY must be at least 32 characters. Shorter values panic at startup with a security error rather than a config hint.
  • A keystore produced by ethers v6 writes Crypto with a capital C, and the relayer's keystore parser expects crypto. Lowercase the key before mounting the file.
  • Idempotency belongs to the action, not the trigger. Keyed on the transaction hash, a burst of matching transfers sent several pause transactions in a row. Keyed on the action, it sent one.
  • Message templates print placeholders literally when the event has no such argument. A Paused(address) alert printed ${events.0.args.value} until we gave it its own template.
  • The two configs spell secrets differently. Monitor wants {"type": "environment"}; the Relayer wants {"type": "env"}. Copy one into the other and Monitor fails with data did not match any variant of untagged enum TriggerTypeConfig, which does not point at the secret.
  • AGPL-3.0 covers Monitor, Relayer and Role Manager. Running them internally is fine; distributing a modified version means publishing the modification.

Which option fits

A small team with one hot wallet and no DevOps budget should run Monitor and Relayer in Docker on one box, with the guard service in front of the Relayer. There is no licence cost. The RPC keys and the on-call rota are yours.

If nobody wants to own that box, KeeperHub publishes its prices and starts free, with paid tiers from $49 a month. Tenderly is the better fit if you already debug transactions there, but its free plan is browser-only and API access needs a custom-quoted plan (Tenderly API FAQ).

Where real money is at risk, self-hosting buys you less than it looks: Monitor matches the rules you wrote, and nothing else. Put Hypernative, Hexagate with GateSigner or Phalcon next to your execution layer, and expect a negotiation rather than a price list.

Where to start

Nobody sells you Defender back. What you can buy is the same loop, split into parts you control: Monitor watches, the guard decides, the Relayer signs with a key that can only pause. We ran that loop on a local chain and it did the one thing that matters at 3am, which is stop the token before anyone reads a dashboard.

The bill is an RPC plan and a small server. The real cost is attention: nobody else is watching your monitor, so build the heartbeat alert first, then drill the pause path until it is boring. Boring is the goal here.

Sources

  • https://www.openzeppelin.com/news/defender-sunset-faq
  • https://github.com/OpenZeppelin/openzeppelin-monitor
  • https://github.com/OpenZeppelin/openzeppelin-relayer
  • https://github.com/OpenZeppelin/role-manager
  • https://github.com/gnosisguild/zodiac
  • https://github.com/lidofinance/onchain-mon
  • https://forta.org
  • https://keeperhub.com/pricing
  • https://docs.tenderly.co/troubleshooting/api
  • https://www.hypernative.io/product/onchain-monitoring-automated-response
  • https://www.chainalysis.com/product/gatesigner/
  • https://blocksec.com/phalcon/security