Paradigm Protocol Introduction

Paradigm introduces a decentralized relay protocol and network that functions as a broadcast primitive for orders of "hybrid-decentralized" exchange logic – smart contract-based financial instrumentation that uses blockchain-based, on-chain settlement and arbitrary off-chain methods for order message relay.

Any type of smart contract-based financial instrument that implements this hybrid model can leverage the Paradigm Protocol to facilitate order broadcast and discovery.

The core protocol and relay network is supported by a dynamic set of independent validators and voting token holders. The network's validators, users, and voters are coordinated and incentivized toward the common goals of network security and value by a native token system and a variety of crypto-economic mechanisms.

Protocol Design

The core protocol is implemented as a decentralized, transactional, and event-driven message relay network called the OrderStream. The active OrderStream (OS) validator set is highly dynamic, and managed through a staking and token-based curation mechanism, where protocol token holders leverage their holdings to vote on new validator applications and curate the existing validator set. Non-validating token holders are incentivized to curate a high-quality validator set through direct and indirect rewards and penalties (discussed in more detail here).

OrderStream validators must also run full Ethereum nodes and respond to – and vote on – the state changes of core protocol smart contracts deployed on the Ethereum blockchain (described below).

Access control and sybil tolerance on the network is managed by a market-driven staking system (separate from validator curation) which uses a simple bandwidth model to proportionally allocate network throughput to Posters: individuals that add liquidity to the network via the broadcast of order and stream messages. The number of orders a poster may broadcast over a given time frame is based on the size of their stake relative to the total amount staked. The stake required for any given fraction of total network throughput is proportional to overall demand for network write access. Posters may deposit and withdraw stake at any time, and are granted write access to the network for the duration their tokens are locked in the poster staking contract.

Validators (and more specifically, client implementations of the network) do not store, update, or serve an order book in a conventional sense. The relay protocol's design – and network as a whole – favors an event-bus architecture over keeping orders themselves in state. As discussed above, applications built a layer above the OrderStream become responsible for deriving order books from the master order event stream, based on arbitrary rules or filters specific to that application. Information kept in-state by the network is specific to access control, consensus parameterization, and the validator set.

Role of Ethereum

The Ethereum network plays an important role in the Paradigm Protocol. The protocol (and the OrderStream network itself) rely on Ethereum for access control, incentive structure, and governance processes.

Throughput allocation on the OrderStream is computed over discrete time frames – called rebalance periods – at predictable intervals based on the height of the Ethereum blockchain, as well as an initial height and period length agreed upon by validators during the network's genesis.

When a rebalance period is triggered by the discovery of a specific Ethereum block, OS validators compute a "rate-limit" mapping for each poster based on the current state (balances) of the PosterStaking contract according to a simple bandwidth model. Validators submit their proposals for every rebalance period to each other, and vote to accept the first-reported, mutually-agreed-upon proposal. Strict ordering guarantees provided by the network's underlying networking and consensus mechanism (Tendermint Core) ensure that only one proposal will be accepted per period – and that all non-byzantine validators will accept the same one.

A one-way data "bridge" is implemented between Ethereum and the OrderStream network to facilitate secure and reliable state-transition of the OrderStream based on events emitted by the Paradigm Protocol smart contract system. This peg is implemented using a shared security model wherein OrderStream validators are also full Ethereum nodes. OS validators are responsible for being "witnesses" to Ethereum events, and report and vote on these events with the rest of the OS validator set.

This witness model is used to update the allocation of network throughput among posters, and to update the active validator set in-state based on the validator curation contracts.

Events from Ethereum may only modify the OrderStream's state if sufficient validators have reported that event, and a pre-determined "finality threshold" has passed (a block maturation – or finality threshold – is needed to establish "pseudo-finality" for Ethereum blocks, which assumes "true" finality at some point along a probabilistic finality curve. This will not be needed once Ethereum switches to a PoS mechanism with stricter finality assurances).

More details of this system can be found in the peg-zone specification, and it's implementation in ParadigmCore.

Drivers and Tooling

In addition to leading development of the first implementation of the OrderStream network, Paradigm Labs is also producing ParadigmConnect – a set of client-side libraries that simplify the processes of creating and signing orders, settling trades, and interacting with the OrderStream network. ParadigmConnect is initially available in JavaScript, with additional versions being produced for Golang and Python.

Paradigm Labs is also releasing the SubContractSDK – a tool kit and framework for developing custom smart contract-based settlement logic that conforms to a simple and extensible settlement interface. The SubContract interface, along with Paradigm's OrderGateway contract enable the side-by-side creation and execution of trades for arbitrary settlement logic.

Our team has published and early version of this SDK alongside some example SubContracts that wrap existing settlement systems such as the 0x, Dharma, and dYdX protocols to demonstrate the systems ability to accommodate a number of smart contract financial primitives side-by-side.

Additional Information

Paradigm Whitepaper

For a more detailed introduction to the protocol and contract system introduced above, as well as motivation and rationale for various design decisions, take a look at the Paradigm Protocol Whitepaper.

For the most up-to-date information regarding the various protocol components specification and implementation details, check out the Paradigm Foundation's GitHub.

License and Contribution

The core protocol (contract logic and primary client implementation) is being developed as open-source software under a GNU General Public License, with development and research projects currently being led by the Paradigm Labs team.

Collaboration and contribution from the community is not only highly encouraged, but essential to the success and stability of the network, and Paradigm's long-term vision of borderless, open, and efficient global markets.

Don't hesitate to get involved on our GitHub, Reddit, and public chat server.