Back to Learn

ZK Coprocessor

What Is a ZK Coprocessor?

A ZK coprocessor is off-chain infrastructure that runs computations over blockchain data and produces a zero-knowledge proof that the result is correct. That proof can be verified on-chain cheaply, allowing smart contracts to act on the result with the same trust guarantees as if the computation had been performed on-chain, but at a fraction of the cost.

Think of it as the relationship between a CPU and a GPU. The blockchain handles consensus and state transitions. The ZK coprocessor handles the heavy lifting: data-intensive queries, multi-block aggregations, cross-chain analytics, and custom application logic that would be prohibitively expensive or impossible to execute inside the EVM.

The "ZK" part is what makes it trustless. Instead of relying on a centralized server or a committee to attest that the result is correct, the coprocessor produces a cryptographic proof. The on-chain verifier checks the math. There is no reputation, no staking, and no trust assumption beyond the soundness of the proof system.

Herodotus builds a ZK coprocessor called the Herodotus Data Processor (HDP), a STARK-provable runtime for executing user-defined logic over multi-chain blockchain data within the Cairo ZKVM.


Why ZK Coprocessors Matter

Smart contracts are powerful but constrained. On-chain computation is metered by gas, limited to the current block's state, and restricted to a single chain's data. Any logic that needs to aggregate data across thousands of blocks, query historical state, or combine information from multiple chains is either too expensive or structurally impossible to run inside a smart contract.

Before ZK coprocessors, the standard workarounds were oracles (trusted signers relaying data), off-chain indexers (unverified query engines like subgraphs), or simply accepting that certain application logic could not be built on-chain.

ZK coprocessors change this by moving compute off-chain while keeping verification on-chain. The result is a new design space for smart contracts: data-rich, compute-heavy applications that remain fully trustless.

This unlocks use cases that were previously impractical, including on-chain loyalty programs driven by historical user behavior, dynamic risk parameters based on multi-block analytics, provably fair gaming outcomes, and compliance checks that operate over large data windows.


How the Herodotus Data Processor Works

Most ZK coprocessors face a two-part problem: (1) how to access blockchain data trustlessly, and (2) how to compute over that data provably. Many projects solve these independently, often relying on different trust models for each step.

Herodotus solves both within a single, vertically integrated stack.

Trustless Data Access via Storage Proofs

The data layer is powered by Herodotus Storage Proofs, which use Merkle inclusion proofs, proofs of computation, and zero-knowledge proofs to cryptographically verify that specific on-chain data exists and is authentic. Storage Proofs cover account balances, storage slot values, block header fields, and transaction receipts across Ethereum, Starknet, and other supported chains.

A Historical Block Hash Accumulator extends the verifiable data window to every Ethereum block since genesis, removing the EVM's 256-block limitation.

This means HDP does not rely on an external indexer or a separately trusted data pipeline. The data is proven at the source.

Provable Compute via Cairo ZKVM

Once the data is accessed and proven, HDP executes user-defined programs over it within the Cairo ZKVM. Cairo is a general-purpose language purpose-built for STARK-provable computation. Developers write custom logic (aggregations, filters, conditional checks, time-weighted calculations) that runs over the proven data set.

The output of this computation is itself provable. The entire pipeline, from data access through computation to result delivery, is covered by a single end-to-end STARK proof.

Managed Proving via Atlantic

Proof generation is handled by Atlantic, the Herodotus managed STARK prover service. Atlantic provides access to StarkWare's production-proven SHARP (Shared Prover) system, handling trace generation, proof aggregation, and on-chain verification. Developers do not need to run their own proving infrastructure.

The result: a smart contract on any supported chain can consume a verified computation result, knowing that both the input data and the computation logic have been cryptographically proven.


Storage Proofs vs. ZK Coprocessor: What Is the Difference?

Storage Proofs and ZK coprocessors are related but distinct.

Storage Proofs answer the question: "Did this data exist on-chain at this block?" They are a data access primitive. You request a proof for a specific account, slot, or header property, and you get a verified yes-or-no answer with the value attached.

A ZK coprocessor answers the question: "What is the result of running this program over this data?" It is a compute primitive. You define custom logic, the coprocessor executes it over proven data, and you get a verified result.

In the Herodotus stack, Storage Proofs are the data layer and HDP is the compute layer. They share the same trust model and proof pipeline. Many applications need only Storage Proofs (for example, verifying a single balance or slot value across chains). Applications that need aggregation, transformation, or multi-step logic over proven data use HDP.


What You Can Build

Time-weighted average prices (TWAP). Compute rolling or fixed-window TWAPs over DEX price data across hundreds or thousands of blocks, with the result delivered as a verified on-chain value.

Historical balance proofs. Demonstrate that an address held at least a certain amount of tokens over a defined period. Useful for credit primitives, collateral verification, and tiered access systems.

Compliance screening. Embed provable checks for exposure limits, holding periods, or transaction pattern rules directly into a contract's execution path, using verified historical data as input.

Dynamic DeFi parameters. Feed vault strategies, liquidation engines, or risk models with verifiable metrics such as protocol revenue history, LP position changes, or cross-chain exposure.

On-chain loyalty and rewards. Compute user engagement scores, trading volume tiers, or participation streaks from historical on-chain activity and deliver the result as a provable claim.


Architecture at a Glance

The Herodotus ZK coprocessor stack has three layers:

  1. Data access (Storage Proofs). Trustless, cryptographic verification of on-chain data across chains and across time. Covers account state, storage slots, block headers, and receipts.

  2. Compute (HDP + Cairo ZKVM). User-defined programs that run over proven data. Supports aggregations, filters, conditional logic, and cross-chain queries. Stateless by design: each computation is independent.

  3. Proving (Atlantic + SHARP). Managed STARK proof generation and on-chain verification. Developers interact with an API. No prover infrastructure to operate.

All three layers share a single trust model grounded in STARK proofs. There is no point in the pipeline where the developer or the end user needs to trust an intermediary.


FAQ

How is a ZK coprocessor different from a ZK rollup?

A ZK rollup is a scaling solution that maintains its own persistent state and periodically settles to a base chain. A ZK coprocessor is stateless. It executes a computation, returns a proven result, and does not retain state between requests. ZK coprocessors extend the capabilities of existing smart contracts on L1 or L2 without requiring developers to migrate their applications.

What programming language do I use with HDP?

HDP programs are written in Cairo, a general-purpose language designed for STARK-provable computation. Cairo is the same language used across the Starknet ecosystem. The Herodotus documentation includes examples and templates for common computation patterns.

Do I need to run my own prover?

No. Proof generation is handled by Atlantic, the Herodotus managed prover service, which provides access to StarkWare's SHARP. You interact with an API and receive verified results on-chain.

Which chains does HDP support?

HDP can access data from any chain supported by Herodotus Storage Proofs, including Ethereum Mainnet, Starknet, Optimism, Base, and ApeChain. Verified results can be delivered to any supported destination chain. See the documentation for the current deployment matrix.

How does HDP compare to other ZK coprocessors?

Herodotus is the only ZK coprocessor that integrates trustless data access (Storage Proofs) and provable compute (Cairo ZKVM) within a single end-to-end STARK proof pipeline. Competitors typically rely on separate trust models for data access and computation. The Herodotus approach means there is no gap in the proof chain between data retrieval and result delivery.


Start Building with HDP

The Herodotus Data Processor is available through the Herodotus Cloud console. Explore the HDP documentation for architecture guides, API references, and example programs.

Explore HDP documentation | Go to console | Contact us

    We use cookies

    We use cookies to ensure you get the best experience on our website. For more information on how we use cookies, please see our cookie policy.