This proposal asks Juno governance to signal support for adding a small piece of standard cryptographic plumbing — a BN254 pairing precompile — to the CosmWasm virtual machine that Juno uses. The precompile makes on-chain zero-knowledge-proof verification on Juno roughly twice as fast and twice as cheap.
No funds are requested. No code executes on-chain from this vote. This is a signaling proposal only. If it passes, the code change is proposed upstream to CosmWasm — the shared VM used by dozens of Cosmos chains — with a Juno community mandate behind it. A separate future proposal would then ask validators to approve the actual software upgrade that carries it.
Full proposal write-up (readable version): https://hackmd.io/@WHsRy8ndRX6AWEQtE4AQiw/SyHB-GZ0Zl
Technical deep-dive (cases, risks, reproduction): https://github.com/Dragonmonk111/junoclaw/blob/main/docs/BN254_PRECOMPILE_CASE.md
Benchmark results (5 devnet samples): https://github.com/Dragonmonk111/junoclaw/blob/main/docs/BN254_BENCHMARK_RESULTS.md
Upstream CosmWasm PR: being opened in parallel — see source repo for latest.
Medium synthesis (post-#373 engineering diary): https://medium.com/@tj.yamlajatt/hardening-after-a-91-71-yes-on-proposal-373-b46d2939461f
Three Ordeals — TEE, ZK, scalability architecture: https://medium.com/@tj.yamlajatt/three-ordeals-on-the-juno-shore-a4662514ed44
Ffern audit retrospective: https://medium.com/@tj.yamlajatt/when-the-abbot-came-5dda4f22a5b1
Source (Apache-2.0): https://github.com/Dragonmonk111/junoclaw
Why this matters, beyond the numbers
Cheap on-chain zero-knowledge verification is a precondition for three directions the Juno community is actively discussing:
Secure cross-chain bridges. If JUNO tokens flow to Base and Ethereum — as the recently proposed 10M JUNO liquidity incentive envisages — the bridges securing those flows are either multi-signature (historically fragile: Ronin, Wormhole, and Nomad together lost over a billion dollars) or zero-knowledge-verified (provably secure). Cheap BN254 makes the secure option affordable. Without it, Juno defaults to the fragile kind.
AI agents that can prove what they did without leaking data. Today, agent attestation is all-or-nothing: publish prompts, model weights, and outputs — or trust the operator. With cheap ZK verification, an agent can prove on-chain that its output complies with policy, without revealing the private inputs that produced it.
The agent-company suite — deterministic agents with pre-intent tools. JunoClaw is building a full agent-company stack on top of CosmWasm and DAODAO: task ledgers, escrow, registries, and a zk-verifier — all governed by on-chain DAOs. When an agent moves with a pre-defined intent (route a swap, verify a credential, triage a service request), it carries that intent as a deterministic, auditable program. BN254 is the piece that makes the proof of correct execution cheap enough to require on every task, not just sampled ones. The agent's TEE workbox produces the attestation; the chain's BN254 precompile verifies it. Together they guarantee that every agentic action — every meaningful service exchange between a person and a machine — is auditable, true, and fair. Compute is preserved because the agent doesn't re-execute on-chain; it proves it already executed correctly off-chain, and the chain checks the proof in a fraction of the time. That is the scalability unlock: verifiable deterministic agents doing real work, with the full composability of CosmWasm and the governance scaffolding of DAODAO as home base for expansion.
At 370,719 gas today, zero-knowledge verification on Juno consumes about 3.7 % of a whole block. That is too expensive to require on every important action. At ~187,000 gas it becomes affordable to require on every one. Cheap enough to be mandatory is the security property; the 2× speed-up is its shadow.
Scope relative to Proposal #373
Proposal #373 (91.71 % YES, 24 March 2026) recognised JunoClaw as Juno ecosystem infrastructure on the strength of TEE-attested verifiable agents, the Junoswap revival, and the validator-sidecar track. #373 did not explicitly ratify on-chain zero-knowledge verification as a second supervisory layer over agent behaviour. That frame has been built out since, and is what this proposal asks Juno governance to endorse next.
#373 said yes to the TEE half. The ZK half is new, and is properly put to a separate vote.
The gas delta — measured baseline, projected precompile
| Path | Gas per proof verification | Source |
|---|---|---|
Pure-CosmWasm (live on junoclaw-bn254-1 devnet) |
370 719 gas | MEASURED (5 samples, tx 87ECC0…0358488, code_id 1) |
| BN254 precompile — 3-pair canonical (EIP-1108) | ~187 000 gas | PROJECTED (EIP-1108 schedule) |
| BN254 precompile — 4-pair (as coded) | ~223 300 gas | PROJECTED (BN254_BENCHMARK_PROJECTED.md) |
| Reduction | ~1.66–1.99× | — |
Pure-Wasm baseline is measured on the junoclaw-bn254-1 devnet (5 identical samples, 2026-04-30) and corroborated by the earlier uni-7 deployment (371,486 gas, code_id 64). Precompile projection is grounded in the EIP-1108 gas schedule plus a 30k SDK contract-overhead ceiling; the per-primitive wall-clock sanity check shows 3.4× – 13.5× headroom between scheduled and observed gas (see BN254_BENCHMARK_PROJECTED.md for the algebra). Every number above reproduces from a clean checkout with the benchmark harness in the source repository.
Precedent — this is not new technology
| Chain | BN254 precompile | Since |
|---|---|---|
| Ethereum | Yes (0x06 / 0x07 / 0x08) | 2017 Byzantium, repriced 2019 |
| Sui | Yes (sui::groth16) |
2023 launch |
| CosmWasm | Not yet | — |
BN254 has 12+ years of cryptanalysis, is the curve every Ethereum zk-rollup and privacy protocol uses, and its reference library ark-bn254 is audited upstream.
What is already shipped (origin/main, commit ffa6545, 29 April 2026)
cosmwasm_2_3 flag — no major version bump, existing contracts compile unchanged.cargo run --example gas_projection) producing docs/BN254_BENCHMARK_PROJECTED.md — interim projection while devnet measurement is in flight.devnet/scripts/transfer-image-from-windows.sh) — bypasses patch-corruption issues when building from source on non-Windows hosts.Plan of record if this passes
MsgSoftwareUpgrade proposal asks validators to adopt a junod build carrying the patch.MsgMigrateContract swaps the live zk-verifier from its current backend to the precompile variant. Same contract address, same interface, same admin, same verification key — only the internal dispatch changes.What this proposal does not ask for
Risks and mitigations
wasmd fork; upstream merge is preferred, not required.Audit scope and cost estimate
Effective audit surface is small by design: ~400 lines (host-function glue + upstream patches). The reference crate is ~90 % tests and documentation. The cryptographic library beneath (ark-bn254) is audited upstream. Realistic audit estimate: $30–45k, 3–5 weeks with Oak Security, Halborn, or Informal Systems (revised up from an earlier $15–25k pre-Ffern line; multi-platform validation, differential-test review, and re-audit-after-operator-hardening were the missing line items). To be funded via DAO treasury post-mainnet, per #373's plan.
Voting guide
Bottom line for non-developer voters: A YES vote tells the Juno community "yes, go pursue the upstream code change." Nothing happens on-chain from this vote itself. If accepted upstream, a separate future proposal asks validators to approve the actual software upgrade.
Authorship
Proposed by VairagyaNodes — Juno staker since December 2021, validator candidate (unbonded). Reference implementation, patches, and documentation written by Cascade (pair-programming AI agent) at the proposer's direction.
Solo submission — signaling proposals do not require cosignatories. Jake Hartnell (Juno co-founder, WAVS architect) gave informal direction to pursue this work on 17 March 2026; he is welcome to co-sign on the Commonwealth thread if he chooses.
License — Apache-2.0 throughout.