# \[Final Report\] ZeroStyl - Privacy Toolkit for Arbitrum Stylus

**URL:** <https://forum.arbitrum.foundation/t/final-report-zerostyl-privacy-toolkit-for-arbitrum-stylus/31277>\
**Category:** Domain Allocator Offerings (prev Questbook)\
**Created:** [August 23, 2026, 7:23pm UTC](https://forum.arbitrum.foundation/t/final-report-zerostyl-privacy-toolkit-for-arbitrum-stylus/31277 "2026-08-23T19:23:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kazai777](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.arbitrum.foundation/kazai777/32/16138_2.png) [@kazai777](https://forum.arbitrum.foundation/u/kazai777)\
**Post date:** [August 23, 2026, 7:23pm UTC](https://forum.arbitrum.foundation/t/final-report-zerostyl-privacy-toolkit-for-arbitrum-stylus/31277/1 "2026-08-23T19:23:44Z")

</div>

# [Final Report] ZeroStyl — Privacy Toolkit for Arbitrum Stylus

**Program:** Domain Allocators for Developer Tooling  
**Repository:** [GitHub - kazai777/zerostyl: ZeroStyl is an open-source Rust-based toolkit to streamline privacy-preserving smart contract development on Arbitrum Stylus. · GitHub](https://github.com/kazai777/zerostyl)  
**License:** MIT (fully open-source)

## Executive summary

ZeroStyl is an open-source Rust toolkit that makes privacy-preserving smart contracts practical to build on **Arbitrum Stylus** , using **halo2 zk-SNARKs** (KZG polynomial commitment on the BN254 curve).

Over the grant, ZeroStyl grew from a design into a complete local zero-knowledge development workflow: developers can **build and debug** halo2 circuits, **generate and verify** proofs off-chain, **export privacy-safe contract ABIs** from annotated Stylus functions, and generate **typed client SDKs** in three languages — all without an external proving service. The toolkit also ships an **Orbit deployability adapter** for per-chain analysis and a **runtime + technical dashboard** providing the standardized on-chain event and fingerprinting primitives.

All source code is public and MIT-licensed. The reusable library crates and the client SDKs are published on **[crates.io](http://crates.io)**, **npm** , and **PyPI**.

* * *

## Milestone 1 — zk-Compiler & reference circuits

A Rust library that turns halo2 zk-SNARK circuits into WASM-targetable components for the Stylus runtime, together with a set of reference circuits.

**Delivered:**

- **Circuit-building library** (`zerostyl-compiler`) on the halo2 PSE fork (KZG/BN254), plus a dedicated **`no_std` / `wasm32` gadget crate** (`zerostyl-gadgets`) providing Poseidon, range-check, comparison and Merkle-membership gadgets — the building blocks for privacy circuits that must eventually run in a WASM verifier.
- **Three reference circuits** (the proposal targeted two — `private_vote` was added as a bonus):
  - **`state_mask`** — proves a hidden `collateral_ratio` lies within `[150, 300]` and that `hidden_balance > threshold`, while committing to the secret values with a Poseidon hash. (Private solvency / eligibility.)
  - **`tx_privacy`** — validates a private token transfer through balance conservation, Merkle membership of the spent note, and an unlinkable nullifier, without revealing balances or the amount.
  - **`private_vote`** — casts a boolean vote proving eligibility (`balance ≥ threshold`), committing to both the balance and the vote with Poseidon.

- **Local Stylus tests** and a comprehensive automated test suite, with **CI running build, tests, `clippy`, formatting and a `wasm32` build** across Linux, macOS and Windows, plus a dedicated coverage job.
- **5-minute demo video:** [https://youtu.be/OTnLZRm5Ww8](https://youtu.be/OTnLZRm5Ww8)

**Proof:** [`crates/zerostyl-compiler`](https://github.com/kazai777/zerostyl/tree/main/crates/zerostyl-compiler) · [`crates/zerostyl-gadgets`](https://github.com/kazai777/zerostyl/tree/main/crates/zerostyl-gadgets) · [`examples/`](https://github.com/kazai777/zerostyl/tree/main/examples) (circuits) · [CI workflows](https://github.com/kazai777/zerostyl/tree/main/.github/workflows)

* * *

## Milestone 2 — Privacy Debugger & on-chain integration

A command-line debugger built around zk-mocking, plus off-chain proving/verification and reference verifier contracts on testnet.

**Delivered:**

- **`zerostyl-debug` — the privacy debugger.** Uses halo2’s **MockProver** (zk-mocking: constraint checking without generating a full proof) to run a witness against a circuit and report **exactly which gate and region fails** , with readable diagnostics. Sub-commands: `inspect` (columns/gates/constraints/degree), `schema` (expected witness JSON), `witness` (assignments + derived public inputs), `debug` (failure diagnostics).
- **`zerostyl-prove` — off-chain proving/verification.** Generates a compact halo2-KZG proof from a witness (measured proof size **~2.7 KB** ) and verifies it against the circuit’s public inputs. Proving parameters are cached after first use.
- **`zerostyl-verifier` — a `no_std` verifier library** implementing halo2-KZG verification for the Arbitrum Stylus runtime, with the verifying key and parameters embedded at build time (no runtime keygen). Compiles to `wasm32-unknown-unknown`.

**Proof:** [`crates/zerostyl-debugger`](https://github.com/kazai777/zerostyl/tree/main/crates/zerostyl-debugger) · [`crates/zerostyl-cli`](https://github.com/kazai777/zerostyl/tree/main/crates/zerostyl-cli) · [`crates/zerostyl-verifier`](https://github.com/kazai777/zerostyl/tree/main/crates/zerostyl-verifier) · [`docs/DEPLOYMENTS.md`](https://github.com/kazai777/zerostyl/blob/main/docs/DEPLOYMENTS.md)

* * *

## Milestone 3 — Toolkit launch, Orbit adapter & STARK study

The privacy-safe ABI exporter, multi-language SDKs, documentation, published packages, the Orbit adapter module, and the zk-STARKs feasibility study.

**Delivered:**

- **`zerostyl-export` — the zk-safe ABI exporter.** Scans a Stylus contract for parameters annotated with `#[zk_private]` and generates, for each circuit: a **halo2 circuit** , a backend-agnostic **descriptor** , a **privacy-safe ABI** (`abi.json`, replacing private parameters with a commitment + proof), and a **transformed contract** module.
- **Typed client SDKs in three languages** , all reading the same `abi.json`:
  - **Rust** — [`zerostyl-sdk`](https://crates.io/crates/zerostyl-sdk): registry, prove/verify helpers, witness builder, proof envelope.
  - **TypeScript** — [`@zerostyl/sdk-ts`](https://www.npmjs.com/package/@zerostyl/sdk-ts): `abi.json` → typed TypeScript module.
  - **Python** — [`zerostyl-sdk`](https://pypi.org/project/zerostyl-sdk/): `abi.json` → typed dataclasses, pure Python.

- **Package publication:** SDKs on **npm** and **PyPI** , and the reusable library crates (`zerostyl-sdk`, `zerostyl-orbit`, `zerostyl-circuits`, `zerostyl-runtime`) on **[crates.io](http://crates.io)**.
- **Documentation & tutorials** at **docs.zerostyl.dev** (installation, quick start, CLI reference, circuit reference, end-to-end tutorials, and an events/fingerprinting reference).
- **Mock DeFi integration:** reference verifier contracts on Arbitrum Sepolia covering private lending (solvency), private swaps and voting patterns.
- **zk-STARKs feasibility study:** [`docs/STARK_FEASIBILITY.md`](https://github.com/kazai777/zerostyl/blob/main/docs/STARK_FEASIBILITY.md) — analyzes FRI-based transparent/post-quantum proving against the project’s measured constraints and outlines when a STARK backend would make sense behind the toolkit’s backend-agnostic circuit interface.
- **Orbit zk-Adapter Module** ([`zerostyl-orbit`](https://crates.io/crates/zerostyl-orbit)): per-chain **configuration profiles** (size caps, ink/gas model, required precompiles) as TOML, built-in profiles for Arbitrum One / Nova / Sepolia and a customizable Orbit template, **deployability analysis** (Brotli-compressed sizing against a chain’s on-chain budget), a **precompile-requirement mapping** per proving system, and a **multi-chain analysis CLI** (`list` / `show` / `check` / `matrix` / `init`).
- **`zerostyl-runtime` + technical dashboard.** The runtime crate provides the standardized **`ZeroStylPrivacyTransaction`** event (with its canonical signature and `topic0`) and the **`BytecodeFingerprint`** primitive — a single source of truth for on-chain tracking. The **technical dashboard** exposes the event schema, its exact `topic0`, a live client-side keccak256 fingerprint tool, and the deployed-contract registry.

**Proof:** [`crates/zerostyl-exporter`](https://github.com/kazai777/zerostyl/tree/main/crates/zerostyl-exporter) · [`crates/zerostyl-sdk`](https://github.com/kazai777/zerostyl/tree/main/crates/zerostyl-sdk) · [`packages/sdk-ts`](https://github.com/kazai777/zerostyl/tree/main/packages/sdk-ts) · [`packages/sdk-py`](https://github.com/kazai777/zerostyl/tree/main/packages/sdk-py) · [`crates/zerostyl-orbit`](https://github.com/kazai777/zerostyl/tree/main/crates/zerostyl-orbit) · [`crates/zerostyl-runtime`](https://github.com/kazai777/zerostyl/tree/main/crates/zerostyl-runtime) · Dashboard: [Dashboard | ZeroStyl](https://zerostyl.dev/dashboard)

* * *

## Technical architecture

- **Proof system:** halo2 (PSE fork) with a KZG polynomial commitment on **BN254** , SHPLONK, Keccak transcript.
- **Workspace** (Rust, MIT):

```auto
zerostyl-circuits Backend-agnostic circuit descriptors, registry & ABI schema (published)
zerostyl-gadgets no_std/wasm32 halo2 gadgets — Poseidon, range, comparison, Merkle
zerostyl-compiler halo2 circuit construction for the reference circuits
zerostyl-runtime On-chain primitives — privacy event & bytecode fingerprint (published)
zerostyl-verifier no_std halo2-KZG verifier for the Stylus runtime
zerostyl-sdk Rust client SDK (published)
zerostyl-orbit Per-chain deployability analysis + CLI (published)
zerostyl-debugger `zerostyl-debug` — circuit inspection & witness diagnostics
zerostyl-cli `zerostyl-prove` — off-chain proving & verification
zerostyl-exporter `zerostyl-export` — #[zk_private] → circuit + ABI + bindings
packages/sdk-ts TypeScript SDK (@zerostyl/sdk-ts, npm)
packages/sdk-py Python SDK (zerostyl-sdk, PyPI)

```

- **Command-line tools:** `zerostyl-debug`, `zerostyl-prove`, `zerostyl-export`, `zerostyl-orbit`.
- **On-chain path:** the verifier and gadget crates compile to `wasm32-unknown-unknown` for the Stylus runtime.

* * *

## Project resources

- **GitHub:** [GitHub - kazai777/zerostyl: ZeroStyl is an open-source Rust-based toolkit to streamline privacy-preserving smart contract development on Arbitrum Stylus. · GitHub](https://github.com/kazai777/zerostyl)
- **Documentation:** [https://docs.zerostyl.dev](https://docs.zerostyl.dev)
- **Technical dashboard:** [Dashboard | ZeroStyl](https://zerostyl.dev/dashboard)
- **[crates.io](http://crates.io):** [zerostyl-sdk](https://crates.io/crates/zerostyl-sdk) · [zerostyl-orbit](https://crates.io/crates/zerostyl-orbit) · [zerostyl-circuits](https://crates.io/crates/zerostyl-circuits) · [zerostyl-runtime](https://crates.io/crates/zerostyl-runtime)
- **npm:** [@zerostyl/sdk-ts](https://www.npmjs.com/package/@zerostyl/sdk-ts)
- **PyPI:** [zerostyl-sdk](https://pypi.org/project/zerostyl-sdk/)
- **zk-STARKs study:** [`docs/STARK_FEASIBILITY.md`](https://github.com/kazai777/zerostyl/blob/main/docs/STARK_FEASIBILITY.md)

* * *

## Closing

ZeroStyl delivers an end-to-end, open-source zero-knowledge development workflow for Arbitrum Stylus — from circuit building and debugging to proving, verification, privacy-safe ABI export, typed SDKs, and per-chain deployability analysis.

The work does not stop at the close of the grant. The focus going forward is to **improve the toolkit as far as it can go** , to **have it professionally audited** , and to **grow awareness so that more developers adopt privacy tooling on Stylus.**

---

<div class="post-metadata">

**Author:** ![Anzus\_GemWallet](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.arbitrum.foundation/anzus_gemwallet/32/16624_2.png) [@Anzus\_GemWallet](https://forum.arbitrum.foundation/u/Anzus_GemWallet)\
**Post date:** [August 24, 2026, 10:37am UTC](https://forum.arbitrum.foundation/t/final-report-zerostyl-privacy-toolkit-for-arbitrum-stylus/31277/2 "2026-08-24T10:37:43Z")

</div>

Interesting project. Privacy tools can be valuable, but for everyday users the important part will be clear and simple explanations of what is private, what is public, and what they need to do. Making that easy to understand will matter a lot.

---

<div class="post-metadata">

**Author:** ![kazai777](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.arbitrum.foundation/kazai777/32/16138_2.png) [@kazai777](https://forum.arbitrum.foundation/u/kazai777)\
**Post date:** [August 25, 2026, 3:47am UTC](https://forum.arbitrum.foundation/t/final-report-zerostyl-privacy-toolkit-for-arbitrum-stylus/31277/3 "2026-08-25T03:47:10Z")

</div>

Thanks! Completely agree.

That’s exactly why I’m planning a series of videos where I build something concrete from A to Z. The goal is to make it very easy for developers who aren’t familiar with zero-knowledge proofs to clearly understand both the value and, more importantly, the real need for them.

Alongside that, there’s a secondary but really important objective (as you mentioned): helping everyday users understand that on the blockchain everything is public and traceable by default and that transparent solutions exist to fix this without sacrificing usability.

Clear and simple explanations will be at the heart of the whole series.
