Knowledge Base
  • Introduction
  • SHIELDING
    • Shielded pools
    • Key generation process
    • Privacy best practices
  • Fraud protection
  • Web App – User Guide
  • SMART YIELD
    • How does Smart Yield work?
    • Governance Model
    • Shielding
  • COMMON ECONOMY
    • The Economy of Common
    • CMN Token
    • CMN Tokenomics and Vesting Schedules
    • CMN Airdrops
    • Shared Fees and Reward Economics of Common
  • Wallet (Extension)
    • Introduction
    • Getting Started
    • Usage
    • Settings
  • DEX and Bridge (Aleph Zero WASM layer 1)
    • Account
      • How to Connect Your Wallet
      • Video Guide: How to Connect Your Wallet
      • How to Check Your Balance
      • Video Guide: How to Check Your Balance
    • Swap
      • How to Swap Tokens
      • Video Guide: How to Swap Tokens
    • Farm
      • How to Farm
      • Video Guide: How to Farm
    • Pool
      • Explaining Liquidity Pools
      • Video guide: Explaining Liquidity Pools
      • Managing Liquidity Pools with Custom Tokens
      • Video Guide: Managing Liquidity Pools with Custom Tokens
    • Bridge
      • How to Bridge With Most
        • Ethereum to Aleph Zero WASM
        • Aleph Zero WASM to Aleph Zero EVM
      • Video Guide: How to Bridge With MOST?
      • Bridging 10,000+ AZERO from Aleph Zero WASM to EVM
  • Protocol Details
    • Shielder
    • Overview
    • Design Against Bad Actors
    • Preliminaries: ZK Relations
    • Notes and Accounts
    • ZK-ID and Registrars
    • Anonymity Revokers
    • PoW Anonymity Revoking
    • Relayers
    • Deterministic Secret Management
    • SNARK-friendly Symmetric Encryption
    • SNARK-friendly Asymmetric Encryption
    • Cryptography
    • Token Shortlist
    • User Wallet
    • Versioning
    • PoC
    • Version 0.1.0
    • Version 0.2.0
Powered by GitBook
On this page
  • Deployment information
  • Basic Information
  • Technical Information on Circuits

Was this helpful?

  1. Protocol Details

Version 0.1.0

PreviousPoCNextVersion 0.2.0

Last updated 5 days ago

Was this helpful?

Deployment information

Source code:

Testnet Contracts:

  • Shielder:

Mainnet Contracts:

  • Shielder:

Basic Information

This is the first release, considered beta, and thus it has several limitations aimed to provide protection for users while the code awaits a full audit and a few features are still under active development. The following list characterizes Version 0.1.0, with most of the restrictions expected to be lifted in the next release:

  1. Only AZERO is supported for shielding. Stable coins and ERC20 tokens are not yet supported.

  2. There is a limit of maximum 100 AZERO to be deposited at once. Also, the user interface (Common App browser Extension) does not allow a user to hold more than 100 AZEROin the shielded account, at any time.

  3. Instead of the mechanism with Anonymity Revokers (), another scheme with limited privacy is used in this release (see ). This will be replaced by the proper mechanism in the subsequent version.

  4. The access to Shielder is fully permissionless and there are no Registrars (see ), this means anybody can create an account and there are no additional requirements.

Technical Information on Circuits

While awaiting a full audit, the source code of the Halo2 circuits that we use stays in a private Github repository. The code of circuits will be published after the audit is finished and all findings have been addressed.

Notes and Hashing

For this release the structure of the note is as follows:

struct Note {
    version: Scalar, // version of the note structure. We start at 0
    id: Scalar, // the ZK-ID of a user
    trapdoor: Scalar, // a secret needed to prove ownership of the note
    nullifier: Scalar, // a secret used to invalidate the note
    balance_hash: Scalar, // the hash of the user's balance
} 

Specifically:

balance_hash = hash(balance, 0, 0, 0, 0, 0, 0)

Where balanceis the user's AZERObalance — it is followed by 6zeros before hashing (using Poseidon2 Hash). The reason for including the zeros, is to make it possible for a quite simple migration to a version that supports a limited number of ERC20 tokens (they would populate the 6 zeros). Since the maximum constant-arity Poseidon2 Hash that we support in out circuits is 7the 6zeros is the most natural choice.

The Noteis then hashed simply as:

hash(version, id, trapdoor, nullifier, balance_hash)

using a 5-aryPoseidon2 Hash.

Circuits and Constraints

Apart from some changes in hashing (explained above) the circuits in Version 0.1.0 mostly follow the PoC Version — see . The only significant difference is related to the introduction of:

Versioning. Starting with this initial release each note has a version. We refer to for a detailed discussion on that.

PoW Revoking. We refer to .

https://github.com/Cardinal-Cryptography/zkOS-monorepo/releases/tag/v0.1.0
0x0019849f3fBA1ECd3fB4A2e27759e9432b19F6F3
0x48237d5B3659182b1B70Ccf8E4D077e812AaA5FF
Anonymity Revokers
PoW Anonymity Revoking
ZK-ID and Registrars
PoC
#versioning
PoW Anonymity Revoking