Universal Circuits 101

Manta Network
4 min readAug 8, 2023

Manta Network’s Universal Circuits are a powerful and versatile library of Zero-Knowledge (ZK) circuits specially designed for generalized use cases, providing a groundbreaking solution for developers.

Universal Circuits provide ZK-as-a-Service, allowing Solidity developers to enable ZK features in their applications with just a few lines of code. This includes capabilities like compliant private payments for DeFi, identity verification for Web3 Social, and privacy-preserving shuffling for on-chain gaming. Manta Network continues to roll out more Universal Circuits to enable additional ZK features in the future for Solidity dapps.

With Universal Circuits on Manta Pacific, developers gain a user-friendly experience for deploying EVM-native ZK applications. They can easily call ZK-enabled contracts for their existing Solidity smart contracts and dApps through high-level APIs.

Current Challenges and Manta Universal Circuits: A Solution for ZK Applications

Currently, there is no dedicated platform for EVM-native Zero-Knowledge (ZK) applications. We firmly believe that ZK applications represent the next generation of decentralized apps, given their strong focus on user safety and privacy within the typical dapp experience. Thus, creating a suitable environment for ZK applications is crucial for the continuous growth and expansion of web3.

Developing and scaling Zero-Knowledge (ZK) applications with existing solutions has been fraught with challenges. While some privacy networks offer ZK-based private transacting, they lack the programmability required for application layers. On the other hand, existing VM, EVM blockchains, and zkEVMs do not provide the necessary tools for easy ZK application development and deployment, leading to high gas costs and slow performance for successful deployments. Furthermore, ZK networks with VM environments force developers to learn new languages, restricting their applications to limited userbases within specific ecosystems.

To address these issues, Manta Network’s Universal Circuits emerged as a transformative solution. They streamline the implementation of ZK technologies, significantly reducing the learning curve for engineers. Prior to Universal Circuits, developers had to build circuits manually, which requires a steep learning curve to adopt Rust, understand circuits, and implement in compilers like Circom to deploy as a smart contract. Universal Circuits eliminate these complex and time-consuming steps, making ZK application development more accessible and user-friendly. With Universal Circuits, engineers can seamlessly integrate ZK functionalities into Solidity smart contracts through the Universal Circuits’ Interface Contracts or SDK.

zkShuffle: A Practical Example of Manta Universal Circuits

One practical example of how Manta Universal Circuits simplify Zero-Knowledge (ZK) application development is zkShuffle. zkShuffle provides Ethereum developers with an easy way to create “mental poker” games using zero-knowledge proofs. The concept of “mental poker” involves implementing a fair imperfect-information gaming protocol over a communication system without relying on any trusted third-party. Poker is an example of an imperfect-information game, where the players don’t know what the cards are but need to agree that the cards in the deck are in the order they’re intended to be.

Before Universal Circuits, building zkShuffle and similar ZK applications required manual circuit building and conversion between programming languages like Rust and Solidity. However, with the introduction of Manta Universal Circuits, the complexity has been significantly reduced. Developers can now seamlessly integrate zkShuffle functionalities into Solidity smart contracts with just a few lines of code through Interface Contracts or the Universal Circuits SDK. This streamlined process eliminates the need for intricate cryptographic techniques and enables a more accessible and user-friendly ZK application development experience.

By providing a straightforward solution for zkShuffle and other ZK applications, Manta Network’s Universal Circuits demonstrate their transformative power in simplifying ZK development and paving the way for a more secure and private decentralized future.

To get started with Manta Network’s Universal Circuits and explore the Manta Pacific ecosystem, follow these steps:

  • 1. Documentation: Visit https://docs.manta.network/ to access comprehensive documentation provided by Manta Network. This resource will guide you through the process of integrating Universal Circuits and developing/deploying applications on the Manta Pacific testnet.
  • 2. Configure MetaMask: Add the Manta Testnet L2 Rollup to your MetaMask wallet to interact with Manta Pacific. Use the following information to configure your MetaMask:

Network Name: Manta Testnet L2 Rollup

Network URL: https://manta-testnet.calderachain.xyz/http

Chain ID: 3441005

Currency Symbol: ETH

  • 3. RPC and Websocket URLs: Use the provided RPC URL (https://manta-testnet.calderachain.xyz/http) and Websocket URL (wss://manta-testnet.calderachain.xyz/ws) to interact with the Manta Pacific testnet.
  • 4. Obtain Testnet Assets: To conduct transactions on Manta Pacific, you’ll need testnet assets. Manta Pacific uses ETH as the underlying asset for transaction fees. You can request faucet funds for both Manta and Goerli (a testnet for Ethereum) at https://pacific-info.manta.network/. Additionally, you have the option to bridge your assets from Goerli to Manta Pacific.

By following these steps and using the provided resources, you can quickly onboard and start exploring the possibilities of Manta Network’s Universal Circuits and the Manta Pacific ecosystem on the testnet.



Manta Network

Manta Pacific, the First Modular L2 | Backed by PolyChain, Binance Labs | 🤝 Celestia, Polygon, LayerZero