Quai Network is a network of many interoperable chains. A stylized representation of the network structure can be seen below:

The network is made up of 3 levels: Prime, Region, and Zone. Prime and Region chains act as coordination layers as they contain no state, transactions, or accounts.

The Zone layer is the most pertinent to application developers as each Zone chain within the layer contains its own state, virtual machine, transactions, and accounts.

Interoperability is native in all Zone chains. The Quai protocol supports contract initiated transactions from one chain to another. These cross-chain contract transactions are executed by the Zone chains and routed by the Prime and Region chains. This functionality allows for trustless applications built across multiple Zone chains at once. Developers can choose to deploy their applications on one or many of these Zone chains depending on their application’s complexity and use case.

It should be noted that while Quai does support cross-chain transactions between contracts, the protocol does not natively support cross-chain state reading between contracts. A transaction must be sent from one chain to another in order to communicate state changes.

Differences between Quai and Ethereum

It is easiest to think of the Zone layer as a collection of individual Ethereum-like chains running in parallel. Each of these chains is a unique pseudo-EVM environment, meaning it retains much of the structure and functionality of the traditional EVM with some changes/additions.

The main differences between Quai’s EVM and the traditional EVM can be seen below.

Available Tooling

As mentioned earlier, Quai has a subset of Ethereum tooling that has been adapted to handle the multi-chain network. This tooling includes:

Migrating your Ethereum App to Quai

Ethereum applications are typically built with one of 3 SDKs: Ethers, Web3.js, or Viem. Regardless of which of these SDKs your application uses, you will need to either incorporate or transition to the Quais SDK in your application to support Quai.

The Quais SDK is a fork of Ethers v6. Because of this, syntax in Quais is almost identical to Ethers with the caveat that the above changes have been applied. If your application is currently built with Viem or Web3.js, these guides are helpful in understanding syntax mapping of your existing code to Quais:

Almost all of the existing functions and utilities in Ethers, Viem, and Web3.js have direct mappings to similar or the same methods in Quais.js, with the exception of methods that utilize provider polling.