ENSIP-21

  • Name: ENSIP-21 (Batch Gateway Offchain Lookup Protocol)
  • URL: https://docs.ens.domains/ensip/21
  • Category: ENS offchain-resolution batching standard / CCIP-Read gateway middleware / batched offchain lookup transport primitive
  • Summary: ENSIP-21 is best understood as the batching and orchestration layer above ERC-3668-style offchain reads, not merely as an ENS implementation detail. Its core move is to standardize how multiple OffchainLookup reverts can be transformed into a single batch-gateway request that executes them in parallel and returns aligned success/failure arrays. The reusable mechanism insight is that ENSIP-21 makes gateway aggregation, privacy defaults, and retry/failure handling explicit control surfaces inside ENS resolution rather than leaving them buried in one resolver implementation. That matters most because Universal Resolver already uses this layer, so the standard sits directly in the path between modern ENS clients and any offchain-backed resolution stack.
  • What it does:
    • Defines the IBatchGateway.query(Request[] requests) interface for performing multiple OffchainLookup requests in parallel
    • Preserves the original sender, urls, and callData for each lookup instead of flattening them into one custom resolver-specific blob
    • Standardizes per-request failure handling through aligned bool[] failures and bytes[] responses arrays
    • Defines x-batch-gateway:true as a special pseudo-URL so clients can substitute a local batch-gateway implementation instead of trusting an external service
    • Standardizes how transport errors should be encoded (HttpError) versus generic request failures (Error(string))
    • Serves as the batching layer used by Universal Resolver when ENS resolution needs many CCIP-Read lookups or CCIP-Read-aware multicalls
  • Key claims:
    • ENSIP-21 cleared the bar because it isolates a real lower layer in ENS and CCIP-Read infrastructure: batch orchestration is a distinct control surface from both contract-thrown OffchainLookup errors and application-specific proof verification.
    • The specification’s own framing is unusually revealing: it is effectively Promise.allSettled() for OffchainLookup. That makes the design goal obvious — parallelize and normalize many offchain reads without pretending they are one homogeneous resolver call.
    • The x-batch-gateway:true path is the most important operational detail. It explicitly allows local gateway substitution, which the spec and Universal Resolver docs frame as better for privacy and latency than relying on an external shared batch gateway.
    • The standard is careful not to overclaim trust. ENSIP-21 says compliant batch gateways are equivalent and should not be trusted; each underlying OffchainLookup protocol still has to verify its own returned data.
    • Universal Resolver is the strongest evidence that ENSIP-21 is not a niche side note. ENSIP-23 explicitly incorporates ENSIP-21 and warns that using an external batch gateway when local support is absent leaks information and adds latency.
    • ENSIP-21 is best compared against ERC-3668 rather than against generic multicall. ERC-3668 defines serial offchain-read signaling and callback verification; ENSIP-21 adds the batching layer that modern ENS resolution needs once many offchain reads can occur in one path.
    • The standard’s response model matters analytically because it separates transport failure from valid-but-erroring protocol responses. A request can succeed at the batch-gateway layer even when the underlying resolver or callback data encodes an error.
  • Whitepaper: No standalone ENSIP-21 whitepaper surfaced in this pass. The clearest primary materials were the official ENSIP-21 and ENSIP-23 docs, the ERC-3668 specification, nearby ENSIP-10 context, and the ENS repos collected in ../whitepapers/ensip-21-primary-sources-2026-05-13.md.
  • Sources:

Internal linkages

  • ENS-specific batching and gateway-orchestration layer above the generic offchain-read transport in erc-3668

  • Naming-stack siblings where wildcard resolver discovery and multichain primary-name verification can trigger the offchain lookups this spec aggregates: ensip-10 and ensip-19

  • Last reviewed: 2026-05-13 UTC