Introduction
The Commit–Reveal Pairwise Comparison Protocol (CRPC) enables decentralized, trustless verification of the kinds of work that cannot be secured by math alone.
It is an unlock for decentralizing AI, web3 games, and autonomous decision-making systems that rely on fuzzy or non-deterministic outcomes.
In short, it:
- Provides trustless verification of computation and inference.
- Is lightweight and does not require Zero Knowledge Proofs (ZKP).
- Can handle random outcomes in games or fuzzy AI tasks.
- Can handle workloads where the “right answer” is not known ahead of time.
- Allows smart contracts to make informed decisions about off-chain work.
- Scales linearly with network size and can naturally shard workloads.
The CRPC protocol allows multiple, independent nodes to create and publish pairwise comparisons of their assigned work in a decentralized fashion.
CRPC is composed of existing primitives from cryptography and computer science, namely, a hash-based commit–reveal scheme (performed over two rounds), and pairwise comparisons—a method of quantitatively measuring the difference in two or more results.
The protocol naturally allows the design of consensus mechanisms with nascent yet desirable features in decentralization, such as sharding large workloads and securing arbitrary or non-deterministic outcomes that current strategies, like Zero-Knowledge Proofs (ZKPs) cannot.
About pairwise comparisons
Pairwise comparisons are a fundamental operation in fields of computer science, like Artificial Intelligence (AI), that determine the quantitative relationships between two elements in a dataset. The result of a pairwise comparison, performed via a mathematical function such as determining cosine similarity between two nodes, represents a numeric measurement of differences. These pairwise comparisons should not be confused with their qualitative cousins in psychology, being instead objective, quantifiable, and precise.
They form the foundation of algorithms critical to neural networks, especially in the attention mechanisms of the transformer architectures that power today’s Large Language Models (LLMs). Scaling the ability to calculate pairwise comparisons, such as with modern Graphics Processing Units (GPUs) and Neural Processing Units (NPUs), has already unlocked a new generation of AI.
Utility of the CRPC protocol
We believe that these same pairwise comparisons can find additional use as a primitive, in conjunction with cryptographic techniques, for building new kinds of decentralized consensus mechanisms, offering a complementary but different path than Zero-Knowledge Proofs (ZKPs).
We envision novel, useful blockchain or blockchain-like architectures that provide features previously only available to centralized systems or those requiring high-levels of trust, such as oracle networks.
Particularly, CRPC allows for natural sharding architectures with capacities that scale linearly according to the number of participants while also allowing for designs like sub-services dedicated to specific workloads.
Key differentiators
Mitigation of oracle trust issues
- Issue: Decentralized systems, such as the Ethereum blockchain, rely on oracles (intermediary, external entities) to act as a bridge between off-chain data and on-chain computation. These are often single points of failure, or, when used within decentralized oracle networks, require higher levels of trust than desired (delegation schemes, etc.). Further, solutions such as zkTLS are expensive and don’t guarantee the underlying correctness of the data—just that fetching the data from an external resource was handled appropriately.
- Resolution: CRPC eliminates blind trust of oracles. Multiple witnesses utilize the protocol to verify they have acceptable results, while also being able to identify possible discrepancies and warn the requesting party. This allows Layer 1 (L1) and Layer 2 (L2) networks to directly interface with information providers and still achieve trustless consensus.
Handling intractable formal proofs
- Issue: Formal proofs like Zero Knowledge Proofs (ZKP) are among the most trustless methods for acquiring data on-chain with the strongest guarantees, but are expensive and not feasible for very large or complex tasks (such as large neural networks for generating images or text). They also can’t handle situations where randomness plays a useful role, such as in Large Language Models (LLMs) or games requiring a roll of the dice.
- Resolution: CRPC has the same maximal flexibility as any centralized system or oracle network, because the nodes are simply comparing replicated work in a secure, fraud-proof environment. This allows two nodes, running the same AI model, to create similar enough but slightly different work, and still agree (or, conversely, disprove) that their results were acceptable. This opens the door for blockchains to receive all the benefits of oracle-style integrations while also achieving a trustless architecture.
Scalability in distributed networks
- Issue: Traditional consensus mechanisms in decentralized systems, like Proof of Work (PoW) and Proof of Stake (PoS) achieve high levels of trustlessness at the expense of reducing the total amount of useful work the network can perform. This is because either all the nodes are using their hashpower to generate proofs and validate transactions, or a small subset—even one—are being used as a randomly “nominated” validator.
- Resolution: CRPC allows designing consensus mechanisms that can “shard” workloads across subsets of network nodes. At a minimum, two nodes are required for each job, and this means that the total throughput of the network scales linearly with network growth despite the replication of work amongst the smaller subsets.
Real-time dispute identification
- Issue: Current high-throughput, low-cost networks rely on optimistic rollups, naysayer proofs, and other fraud-reporting mechanisms that limit the immediate utility of work being performed. Yes, the malicious submission might eventually be caught, but what about decisions made using the faulty data?
- Resolution: CRPC partially solves this issue for some, but not all, cases where it is possible to identify a dispute based on the results of conflicting nodes. Further consensus mechanism design, such as the proposal for Byzantine Risk Tolerance (BRT) based on CRPC, can resolve the remaining cases.