Image source: MidJourney, Derivative By soaringcrowz

Preface

Due to the booming development of Layer 2 and DeFi these days, many new protocols have begun to enter the world of Web3 residents, and there are many innovative applications and interesting experiments.

Among so many protocols, ZKX on StarkNet really attracted my attention. On the one hand, it is the services and network architecture it provides, and on the other hand, it guides people through activities to solve tasks. process to understand what ZKX is doing.

This article will briefly introduce this decentralized contract exchange led by Starkware and what it is doing!

Image source: ZKX Protocol

Introduction to ZKX

ZKX is a permissionless derivatives protocol developed on StarkNet that features a decentralized order book and offers complex financial instruments as a unique exchange tool. ZKX hopes to break the “illusion of decentralization” that plagues the current ecosystem, which are also the three main problems currently faced by DeFi projects:

  1. Current DeFi projects rely heavily on oracles, liquidity providers, and centralized listing mechanisms.

  2. For newly created tokens, it is difficult to establish hedging mechanisms to protect against volatility and impermanent losses.

  3. Navigating market depth and liquidity for new derivatives is challenging without an incentive structure that brings market makers and traders together.

Image source: ZKX Protocol

The protocol builds the first permanent decentralized exchange with self-custody and true community governance. The exchange leverages account abstraction and low transaction costs to provide a next-generation DEX that is as scalable as CEX. The protocol also features improved token economics, with staked native tokens receiving a share of revenue and anyone in the community able to participate in the development of ZKX.

ZKX conducts derivatives transactions on StarkNet through built-in reward mechanisms, liquidity supply and complex trading strategies. The five main differences between the ZKX protocol and other protocols are:

  1. Powered by The DAO: Placing the DAO on top of an open source protocol to orchestrate growth, enable DAOs and projects to list derivatives markets for their tokens, and provide incentives for the community to trade.

  2. Decentralized Limit Order Book (DLOB): A unique node network that will help scale derivatives exchanges with permissionless node clients. The network of nodes will provide price information directly to exchanges to increase efficiency for retail and high-frequency institutional traders. The consensus algorithm will achieve trust and security within the network, and the custody of funds will always be kept by the users (completely non-custodial).

  3. Financial innovation: The revised financing rate will adapt to the volatility of the underlying assets, providing a premium for riskier assets to incentivize stakeholders to keep order balances. This enables ZKX to offer perpetual trading with innovative yield structures.

  4. Transactional Liquidity Mining: DAOs, protocols, and community stakeholders will be able to list new assets and provide incentives to trade these new perpetual transactions using any ERC-20 pair of their choice. By enabling native liquidity bootstrapping mechanisms, ZKX’s open source derivatives protocol can grow with the community.

  5. Layer 2 extension: The trading interface is powered by StarkNet, StarkWare’s ZK rollup. Allowing the platform to achieve low fees, instant settlement, fast withdrawals, and evolving trading scenarios.

Image source: ZKX Protocol

Architecture

ZKX’s architecture consists of two layers, each with its own specific role.

  • The first layer is an Ethereum smart contract, using Solidity, and the second layer is a Starknet smart contract, using Cairo.

  • The decentralized ZKX node network sits on top, consisting of data availability, network predictions, computing algorithms, and consensus within the network. Decentralization and permissionless are the foundation of ZKX, ensuring users have full control over their investments and the functionality of the protocol. This is critical to building a sustainable and trustworthy ecosystem for DeFi.

Image source: ZKX Protocol

ZKX node network

Node Networking is a solution that combines the best features of Virtual AMM and CLOB with minimal weaknesses. Consisting of a series of nodes that interact with each other using a consensus algorithm, they enable decentralized order matching.

Image source: ZKX Protocol
  • Each node is organized as an atomic node, built as a set of hyper-independent services with a service bus.

  • Each node is capable of running all possible operations in the network of nodes.

  • Each node can serve as a

    • Compute nodes (providing storage, memory and processing resources),

    • Signature node (collect consensus),

    • The scheduler node (the platform's connection point) at any given moment.

Image source: ZKX Protocol

There are two basic parts to a node network:

  1. Decentralized Limit Order Book (DLOB)

    The decentralized exchange (DEX) space is constantly evolving. It’s time for DEX users to say goodbye to automated market makers (AMMs) and welcome off-chain centralized limit order books (DLOBs). The ZKX protocol provides a more efficient and user-friendly trading experience, similar to the execution mechanisms found in traditional finance, but with the added benefit of being fully decentralized and permissionless.

    There is no middleman, direct interaction between users, ZKX nodes and smart contracts. It provides the much-needed level of security and reliability that users have been craving for. The ZKX protocol is natively built on Ethereum and Starknet, making it a safe and secure choice for DEX users.

    ZKX uses partial knowledge of the state principle. This allows its decentralized nodes to host DLOBs, data provider services, price engines, and trade matching components while ensuring the security of DLOBs.

  2. Data Provider Service (DPS)

    It is the bridge between the pricing engine and external data sources. DPS is designed to ensure that data requests are processed efficiently and securely. As a single entry point for data requests, DPS can access multiple data sources to get the information you need. This allows for a high degree of flexibility and reliability, as DPS can access multiple sources to ensure data is current and accurate.

    Even more impressively, DPS doesn't need to fetch data. Instead, it has its own Provider Library standard that can connect to third-party data providers. This means that DPS has access to a wide range of data sources, allowing it to provide accurate and up-to-date information to the ZKX protocol.

Image source: ZKX Protocol

Node network consensus

A robust consensus algorithm is required to ensure reliable and efficient communication between ZKX nodes.

When a single node needs to communicate with other nodes (i.e. look up non-local orders/trading pairs in the decentralized limit order book, look up external prices, calculate ABR or High-Tide scores), it needs to decide how to do this. Publish and disseminate on the Internet.

Catamaran is a multifaceted consensus algorithm that improves upon traditional algorithms such as Paxos and Raft. With its enhanced leader voting algorithm and multi-group inclusion, Catamaran provides a higher level of fault tolerance and tamper resistance. This means node voting is faster, more reliable, and better suited for trustless decentralized setups.

Catamaran enhances reliability by separating key elements of consensus such as node voting, Group Root Node, and replication and security of ZKX Node Groups, and enforces a greater degree of consistency to reduce the amount of state that must be computed.

It builds on the efficiency of Paxos but takes reliability to the next level. By separating the key elements of consensus and enforcing a higher degree of consistency, Catamaran reduces the amount of state that needs to be computed and the size of packets transmitted, thereby reducing the number of ways ZKX nodes can be inconsistent with each other.

Image source: ZKX Protocol

Performance and network size

In the pursuit of architecting a network of nodes capable of handling complex formula calculations, ZKX places great emphasis on scalability and performance. It is critical that the network can grow and expand as needed while maintaining high performance levels. Testing has shown that the network is capable of exceeding 9,000 TPS in its current test form, and adding new nodes results in a linear increase in system throughput.

Therefore, ZKX has a three-phase plan to expand the node network:

Phase 1: Testnet launch will be powered by a small number of nodes (dozens) to handle the initial system load. Phase 2: The number of nodes will increase to more than one hundred when the mainnet is launched. Phase 3: Once network demand increases and ZKX is decentralized into the DAO structure, it is expected that hundreds of additional nodes will join and the community will be able to become node operators.

The node network will be decentralized and open to everyone, with node operators able to collect a portion of transaction fees on exchanges and pay for services provided to smart contracts. Plans for decentralization will involve ZKX’s token economic model, staking, and permissionless node clients. As transaction volume increases, incentives will be provided to incentivize node operators and drive revenue growth.

Image source: ZKX Protocol

in conclusion

As I said in the preface, as more and more new projects and new protocols come out, coupled with the development of Layer 2, it can indeed help Ethereum to have more applications, although StarkNet is still quite unfamiliar to most people. , but it does not rule out that it may become one of the important ecosystems on Ethereum. For this reason alone, several major projects in the chain are worth ambushing.

ZKX is currently the only derivatives exchange in the ecosystem. Although it has not yet been launched, it has indeed attracted the attention of many people. ZKX also received US$4.5 million in investment in the seed round in July last year. Investors include: StarkWare, Amber Group , Huobi, Crypto.com, etc.

Image source: ZKX Protocol

ZKX is really a very new project, and relevant documents are still being prepared. Even the test network will not be launched until the fourth quarter of this year. Maybe many people will have doubts about such a project, but isn't that what ambushing early-stage projects is all about? Pay attention to him when no one cares about him, otherwise when most people in the market know him, you will no longer have a share.