Introducing zkJSON: Bridging the Gap between web3 and web2

Ahmad Mardeni
WeaveDB
Published in
4 min readJan 24, 2024

--

The vision is clear: a seamless connection between offchain data and blockchains. zkJSON is not just about making offchain data accessible; it’s about verifying and legitimizing it onchain, expanding the scope of what’s considered online and verifiable.

We are thrilled to announce the release of Zero Knowledge Provable JSON (zkJSON), a solution designed to bridge the gap between Web3 and Web2. This innovation makes offchain data easily accessible and verifiable from within Smart Contracts.

If you are interested in a technical exploration, please refer to the Litepaper of zkJSON here.

The Challenge: Bridging Two Digital Worlds

It’s fair to say that JSON forms the foundational layer of the internet we know as of today. Most web systems store and exchange data in JSON due to it being both easy for humans to read and lightweight to ensure a small transmission size.

However, Blockchains have been failing to connect with offchain JSON data efficiently due to a variety of reasons:

  1. Blockchains are not scalable to the web level.

2. Lack of a decentralized full-featured general-purpose database alternative to cloud databases.

3. Existing decentralized databases are too niche and domain-specific.

4. The current Oracle and Indexer solutions are limited to a great extent.

As a result, data on web2 (offchain) and web3 (onchain) are divided, leading to web3 missing out on a broad range of potential use cases.

What if it were possible to verify and access any offchain JSON data directly from Smart Contracts, and to build a general-purpose decentralized database with web2-like performance and scalability? This is precisely what zkJSON and zkDB aim to achieve, seamless direct connections between Smart Contracts and offchain databases.

Onchain verifiability is what scales the decentralized web. Onchain is the new online, and zkJSON expands what’s online/onchain (verifiable).

The Solution: zkJSON

To connect offchain JSON data to any Smart Contracts, we need to:

  1. Make any JSON provable with zk circuits — zkJSON
  2. Build a database structure with Merkle trees and zkJSON — zkDB
  3. Find a way of making zkDB securely queriable from other blockchains — zkRollup
  4. Make the zkDB queriable using Solidity — zkQuery

All the previous steps have been already implemented by WeaveDB. For an in-depth technical exploration, please refer to the Litepaper of zkJSON here.

Use Cases

The implementation of zkJSON and zkDB unlocks many use cases including but not limited to:

  1. Decentralized Data Infrastructure Solutions: It enables the creation of decentralized oracles and indexers, enhancing data reliability and security.
  2. Decentralized Web2 Alternatives: Imagine a fully decentralized Twitter, free from centralized control, powered by zkJSON.
  3. Enterprise Solutions: Combining zkJSON with DID and Verifiable Credentials, businesses can securely integrate Web3 while maintaining privacy.
  4. Liberating Data Silos: We aim to break down the data silos of Web2, redirecting the revenue models of massive networks like ad networks and future AI-based systems to Web3 using zkJSON.

What’s Next: The Road Ahead

With the first 4 components zkJSON, zkDB, zkRollup, and zkQuery, it's now technically possible to build a fully verifiable zkp-based DB connecting blockchains and offchain data. But it does not stop here, we are building:

WeaveDB Rollup

WeaveDB in its essence is a SmartWeave (Arweave smart contract). Our choice of Warp is because it provides scalability and cost-effectiveness with lazy offchain computation.

We have developed an L3 rollup to the L2 sequencer (Warp) to the L1 Arweave permanent storage. This way, we can have a centralized node for parallel query executions with high performance and low latency of web2 cloud databases, but still keep full decentralization with L1 verifiability and L2 composability.

WeaveDB Rollup will roll out in 3 phases:

  1. Rollup Development Kit (RDK)
  2. Rollup as a Service (RaaS)
  3. Decentralized Physical Infrastructure Network (WeaveChain).

WeaveChain will be a Cosmos-based DePIN blockchain and a marketplace to match database developers / dapps with rollup operators. But that’s a topic for a future article.

Roadmap is coming soon. Follow us on Twitter to stay updated!

About WeaveDB

While web3 dapps may use decentralized technologies like blockchain to facilitate trust and transparency, they may still rely on centralized components like databases for storing data. This can lead to a certain level of centralization, as these components are often controlled by a single entity or organization.

WeaveDB is addressing this issue by offering a high-performance, scalable, decentralized, and reliable database solution.

--

--