Introducing Unchained: A decentralized network for data processing and validation

Pouya Eghbali
7 min readJan 10, 2024

It’s been only about a month since we started our work on Unchained, and our test network has reached 250 validators. Despite this success, we haven’t had the time to talk about Unchained and what it is all about! This article briefly describes the core principles of Unchained and why it was created.

In short, Unchained is a decentralized network, just like Ethereum or any other blockchain; it’s peer-to-peer, has validated and verified data, can host smart contracts and plugins, has an RPC system similar to Ethereum, and is secured by cryptographic signatures. The only difference is that it really isn’t a “block”-chain! It doesn’t have blocks and, naturally, doesn’t have chains of blocks. That is where the name “Unchained” comes from.

This feature makes Unchained efficient and enables high throughput and scalability on the network. This might bring many questions to the curious mind, so let us explore the details in this article!

Purpose: Why Unchained?

Unchained shares many of its root principles with blockchains like Ethereum, but it is made for an entirely different purpose. Unchained is made to be scalable. Its primary use case is to validate data and run complex analysis tasks and computations. For example, it can be used to generate an image using AI or train an AI model, analyze weather patterns, process large-scale genomic data, or perform real-time analytics for IoT devices.

Unchained doesn’t have blocks. It doesn’t keep a global state, either. This affects how nodes reach consensus in Unchained. In Ethereum, consensus is collaborative. That means all Ethereum nodes must agree on the validity of transactions and the state of the blockchain. Unchained is built to allow each node to verify data points and computations independently. This makes Unchained highly scalable and efficient, making it suitable for tasks that require extensive data processing and validation.

Let’s go through the core principles of Unchained so I can explain how this is possible!

Datasets and Deterministic Functions

Unchained is built on the principle of data sets and deterministic functions. A deterministic function is a function that, given a specific input, always produces the same output. This means the function’s behavior is entirely determined by its input values.

Unchained data sets are built from such functions, where each unique metric m maps to a data point d through a deterministic function F. That means each data point directly results from calling a deterministic function with a specific input. In mathematical terms, this can be expressed as:

An example could be the price of an asset fetched from UniSwap. Assuming you have access to an Ethereum archive node, you can get the historical price of an asset for each block on Ethereum. In this scenario, you always get the same historical price given the same block number.

In other words, you have a deterministic function that accepts a block number as input and gives you an asset’s price as its output, and this output always stays the same if you give it the same block number. Translating this to Unchained, each block number is our metric m, and the asset price is our data point d, mapped through UniSwap price calculation function F.

Independent Data Validation

Now that we know how each metric is uniquely mapped to a data point in each dataset, we can explore how and why Unchained doesn’t have blocks. Let’s continue with our UniSwap asset price example. In this example, for each Ethereum block 0 to n, nodes can independently fetch the asset price and rebuild the entire data set.

Once a node fetches, produces, or verifies a data point, in this case, the price of an asset on UniSwap, it creates a cryptographic proof attesting to the validity of this data point for the provided metric, in this example, the block number. After preparing the proof, nodes propagate the information to other nodes on the network. Consumers querying the data set can then verify how many attestations a data point has, effectively externalizing the consensus in the system.

Additionally, if a new validator joins the network, it can attest to and verify the validity of any historical data point, increasing the protocol’s security with each contribution. The flexibility and scalability of this method are the main reasons we opted to adapt it in Unchained.

To protect the system against Sybil attacks, Unchained incorporates a Liquid Proof of Stake, where each node’s attestation has a multiplier proportional to the number of KNS tokens they have staked. If a node misbehaves, it is slashed and punished by the other peers.

A Sybil attack is one in which an attacker subverts the reputation system of a peer-to-peer network by creating a large number of pseudonymous entities, using them to gain a disproportionately large influence. [ScienceDirect]

Plugins and Smart Contracts

We are still in the early days but are planning to support plugins and WASM smart contracts in Unchained. Plugins allow adding new functionality to the Unchained network, such as introducing a new dataset. On the other hand, Unchained smart contracts are there to run computations on the validated data before returning them to the consumer.

These smart contracts can also be used to run arbitrary computations without involving the data available on the Unchained network. Some examples include crunching sensor data in an IoT network, training an AI model, applying visual effects on a photo, or signal processing.

Although functions used for Unchained datasets must be deterministic, there is no such requirement for plugins or smart contracts. Depending on whether this is the case or not, consumers can choose to query multiple peers or be satisfied with the value returned from only one peer. Unchained is agnostic in this regard and delegates the choice to the end user.

One example of non-deterministic functions is generative AI. Although by adding a seed parameter, these functions can be made deterministic, that doesn’t matter most of the time for generating one-off creative content. Unchained can be used as an API provider or FaaS by allowing this type of non-deterministic use case.

Use Cases

Even though Unchained is its own independent network, it can provide validated data and off-chain computation to other chains. For example, smart contracts on Ethereum can use Unchained to source data from the internet or run their heavy computations off-chain without paying for too much gas. In this regard, Unchained can be used as an Oracle network for other blockchains.

The data provided by Unchained can be used directly by analytics and data visualization tools. It can also feed or train an AI model if it requires verified and validated data. Unchained can also be used as an API provider; peers on the network can be queried for the services they provide, and consumers can select the services they’re interested in and call their functions over RPC.

Unchained also allows running private and local networks for applications that require data validation but aren’t able to join the public Unchained network due to data privacy laws or other regulations. For example, sensitive sensor data or medical information can be plugged into a private Unchained network for validation and analysis.

Validator Incentives

Each validator running a node on the Unchained network gets one point from its peers when it sends them a meaningful contribution. Nodes who choose to store the validated data in addition to validating them are challenged by the other nodes, and if they can provide proof of storage, they will be rewarded extra points by their peers.

Since Unchained is made by Kenshi, the native token of Unchained is the KNS utility token. Peers are rewarded in KNS tokens based on the points they earn. The KNS token is also used by consumers to query validated data or to run computations on Unchained. This creates an economically autonomous system around the KNS token.

Current State of the Project

We have achieved numerous milestones with the project already, but several points remain to be covered. We have a working peer-to-peer network where each peer independently validates one specific dataset. We also have the node reputation and scoring system in place. We are optimizing what has been done before adding the remaining required features.

The current state of the Unchained test at the time of writing this article

So far, 909 unique validators have joined our testnet network and validated around 200,000 data points together, with a total of more than 22 million signatures on the validated dataset. If you’d like to see the progress, you can visit the Unchained testnet dashboard here. If you’d like to check the project source code, you can see it on our GitHub organization, and if you have any questions, don’t hesitate to join our community and share it with us!

--

--

Pouya Eghbali

Founder at Kenshi, Clio programming language, and CTO at Equip.