The Nexus Protocol
June 13th, 2022


Ethereum has been referred to as a "world computer", a global, decentralized, general-purpose, shared-state machine. However, Ethereum and all other general-purpose blockchains provide a very isolated and computationally limited execution environment. In particular, blockchains are unable to carry out expensive computational tasks (e.g. run a deep neural network), and interoperate with external systems (e.g. connect to the Internet, react to off-chain events and interact with other blockchains).

Nexus is a solution to both limitations and a challenge to the "blockchain as a world computer" paradigm. Nexus is a large-scale, general-purpose, Decentralized Cloud Computing Network. It enables blockchains to outsource computation and interoperate with external systems, like the Internet. It achieves this by introducing the first stateless, general-purpose, decentralized cloud computing platform powered by Multi-Party Computation (MPC) technology, allowing developers to program their own custom blockchain oracles.

By connecting blockchains to a programmable off-chain consensus engine, Nexus provides the missing piece of infrastructure needed to make blockchain applications interoperable with the outside world. From computational oracles, to machine learning oracles, to human identity oracles, to insurance oracles, to sports oracles, to gaming oracles, to cross-chain oracles, to zero-knowledge oracles, to reactive oracles, to market data oracles, to outbound oracles, to automation oracles, to randomness oracles, and more, developers can program and deploy arbitrary oracle applications on the Nexus Cloud and massively extend the computational and I/O capabilities of smart contracts.

A New World Computer Architecture

In classic computer science, the Von Neumann architecture of a computer is formed of three components: a database, a CPU, and an I/O device. Blockchains have conventionally been regarded as “world computers”, but they should be seen as what they truly are: decentralized world databases. That is, blockchains form only the permanent storage component of a true world computer, but lack the computational and I/O capabilities of the whole computer model.

In the Von Neumann architecture, Nexus completes this view by providing both the CPU and I/O components of a true world computer. More specifically, while blockchains are stateful, transaction-driven, decentralized world databases, Nexus is a stateless, event-driven, general-purpose, I/O-enabled, decentralized world CPU. The Nexus Cloud is thus a general-purpose distributed computer system that provides blockchains with pure off-chain computational power through a generic off-chain consensus engine.

In composition with blockchains, Nexus thus provides developers with a new decentralized computing paradigm. Cryptocurrencies can be seen as the first phase in the evolution of decentralized computing, introducing the idea of distributed databases — a form of special-purpose distributed computers. Smart contracts correspond to the second phase, providing Turing-complete programmability on top of these databases. Decentralized cloud networks like Nexus, in composition with smart contracts, correspond to the third phase in the evolution of decentralized computing. Decentralized cloud networks provide blockchains with off-chain computational power and general consensus capabilities on off-chain data through a stateless, Turing-complete, off-chain computational platform: a true decentralized "world computer" paradigm.

General-Purpose Decentralized Cloud Computing

Unlike stateful systems like blockchains, Nexus is a stateless distributed computer system with the primary objective of carrying out pure computational and I/O tasks. There is no notion of blocks, ledgers, immutability, or transactions. Deterministic computations are executed in parallel by all (or a subset of) nodes, providing a general-purpose Byzantine-Fault-Tolerant State-Machine-Replication (BFT-SMR) system that ensures computational correctness via Proof-of-Stake consensus.

Statelessness allows Nexus to overcome the computational limitations of blockchains by providing a platform for parallel, ephemeral, off-chain computation. Stateless event-driven programs on the Nexus Cloud enable smart contracts to outsource general forms of computation, interact arbitrarily with external systems, and react to on-chain and off-chain events.

Decentralized Executables

Nexus is a platform for Decentralized Executables (dEXs) — a new kind of stateless event-driven programs that run on the Nexus Cloud. The execution flow of a dEX is separated into three stages: event monitoring, distributed computation, and result injection.

  • Event monitoring: The network listens for state changes in external systems. Developers are free to specify which arbitrary events should trigger dEX execution (e.g. the event “user U called function F on smart contract S on blockchain B”, or “API endpoint A emitted event E a number of times N within a time period T”).
  • Distributed Computation: Once an instance of these events is emitted, the nodes load the dEX bytecode (stored as a string in a blockchain) to memory. The bytecode is then translated into stack operations on the Nexus Virtual Machine and executed in parallel by all nodes.
  • Result Injection: Lastly, once the computation is completed, the nodes aggregate a threshold signature on the output, which can then be injected into any other set of user-defined external cryptographic systems.

The Nexus Virtual Machine

The Nexus Virtual Machine (NVM) is the runtime environment for dEX execution on the Nexus Cloud, providing a Turing-complete I/O-enabled instruction set. dEX source code can be written in a high-level event-driven programming language and then compiled down to NVM bytecode. The NVM includes a stack, memory, persistent storage, an instruction pointer and gas balance. Similar to Ethereum, gas is the unit of account for computation within the NVM. However, unlike Ethereum, gas on the NVM is measured directly in Nex (NEX), the network’s native token.

Nex is thus a form of cross-chain gas token for off-chain computation on the NVM. Users pay in Nex proportionally to the amount of NVM computation they request. Nodes get rewarded in Nex proportionally to the amount of NVM computation they perform. Likewise, nodes stake a fixed amount of Nex as part of the network’s Proof-of-Stake security mechanism. Demand for NVM computation across chains increases the price of Nex relative to other tokens like Ether, incentivizing more nodes to join the network and increasing the cryptoeconomic security of the system.

Currently, the NVM is being developed on top of WebAssembly (WASM). This will allow developers to program dEXs in any programming language compatible with WASM, including TypeScript and Rust.

Programmable Interoperability

Abstractly, a dEX extablishes a set of multidirectional connections between any set of user-defined external systems {S_1, …, S_n}, which can be of two types, blockchains or API endpoints. By continuously monitoring all systems, the Nexus Cloud is able to react to events and perform arbitrary read-write operations on them.

Nodes in the network run a set of blockchain light clients natively. Given appropriate finality rules for each of these, nodes are able to fetch data from blockchains while being assured that, by assumption, there exists network-wide consensus on the value of such data.

In contrast, non-blockchain systems like API endpoints need to be idempotent to allow the network to reach consensus. This means that endpoints should return the same data for each API call made by each node during the same instance of dEX execution. To ensure API endpoints satisfy this requirement, the nodes execute a consensus protocol that determines the result of calling the API. If a supermajority cannot agree on the value, then the client endpoint is marked faulty. Users are free to specify how to handle consensus errors within dEX logic. For instance, this can include slashing some stake of the data provider on some blockchain, or to execute any secondary data fetching fallback mechanism.


Nexus is a Proof-of-Stake (PoS) network where each node locks in a fixed stake of Nex in a predetermined registry contract in an external blockchain, like Ethereum. As all other PoS-based systems, Nexus is based on (t, n) cryptoeconomic security. This means that it is assumed that at all times at most t of the total n nodes are malicious, where t < n /3 (which is optimal for asynchronous distributed systems). Whenever a node deviates from the protocol, it gets slashed.

At the first layer in the technology stack, the nodes instantiate a consensus protocol that provides the abstraction of a broadcast channel. Currently this consensus protocol is Tendermint, but will be later swapped in favor of HotStuff. This is needed so that nodes are able to communicate by broadcasting messages on the network. At the second layer, the nodes run a Distributed Key Generation (DKG) protocol whenever the size of the network changes by a given threshold. This allows the network to be dynamically sized, open and decentralized. At the third layer, the nodes run Threshold Signature Scheme (TSS) protocols (in particular ECDSA, EdDSA, Schnorr and BLS) that allow the network to authenticate itself across multiple blockchains. Both DKG and TSS protocols are special-purpose Multi-Party Computation (MPC) protocols. Lastly, at the fourth layer the nodes run the NVM and continuously monitor blockchains and off-chain systems for events.


In order to support multiple parallel job requests from multiple smart contracts on multiple chains, the Nexus Protocol achieves scalability by sharding. That is, the network (of size N) is partitioned into multiple smaller networks, or subnetworks, of size n < N, that run distinct dEXs in parallel. When a user deploys a dEX, they are able to specify a custom size n for the subnetwork that will execute it.

This allows developers to program computational networks with customizable cryptoeconomic security. For example, if the user needs to run a smart contract automation oracle with low security requirements, then they can request a small network, say n = 3. In contrast, if the user needs to run a cross-chain oracle serving a high security cross-chain bridge, then they can request a large network, say n ~= 1000. In addition to the amount of computation they request, users are also charged proportionally to the size of the subnetwork they request. The benefit of larger networks is higher cryptoeconomic security, as an attacker needs to gain control of at least n / 3 nodes to corrupt the subnetwork security. In the future, Nexus might support adaptive subnetwork sizing, allowing oracle applications to adaptively increase or decrease their own security (and NVM gas consumption).

Cloud Computing Marketplace

Notably, Nexus also provides an appropriate platform for a decentralized cloud computing marketplace. Uploading an executable to a centralized cloud provider like AWS is analogous to uploading a Rust or TypeScript dEX in a subnetwork of size n = 1 (or n = 2, 3 for redundancy). Besides being able to specify the network size n developers are also able to specify which nodes (by ID) they want their dEX to be executed on. This allows node operators to profit from their own off-protocol reputation and computational node capabilities, enabling the creation of a cloud computing market with use cases that go beyond blockchain applications. This is possible due to network inhomogeneity (the ability of dEXs to be executed only on a certain set of user-defined nodes). In the future, Nexus might also allow cryptoeconomic inhomogeneity, allowing node operators to stake a variable (instead of fixed) amount.


Example: Cross-Chain Oracle

Nexus provides a platform from which a custom cross-chain oracle can be trivially built. This allows cross-chain bridging applications to outsource their off-chain consensus logic and to program custom oracle properties like off-chain message serialization and deserialization. Thus, with Nexus, blockchain interoperability can be seen as being comprised of 3 independent layers. The cross-chain consensus layer (provided by Nexus), the cross-chain bridging and execution layer (provided by relayers and bridging smart contract endpoints), and the cross-chain application layer (comprised of all protocols which call the endpoints).

Example: Weather Oracle (Data Oracle)

The following is an example of a dEX designed to fetch weather data and inject it on-chain. While the example script fetches data from a single endpoint, in practice the oracle application would become decentralized by fetching data from multiple providers.

Example: Machine Learning Oracle (Computational Oracle)

Heavy computational tasks can be carried out off-chain like in a native server-side application, as long as the computation is deterministic.

Example: Smart Contract Automation Oracle

Contracts can react to state-changes in foreign contracts, even across disparate chains.

Example: Off-Chain Reactive Oracle

Automation tasks can also be triggered by API endpoints.

Arweave TX
Ethereum Address
Content Digest