Skip to content

Repository files navigation

Zero Chain

The core node implementation for the Zero Network — a permissionless stablecoin microtransaction network.

1 Z = $0.01 USD | 136-byte transactions | <500ms finality | 0.01 Z flat fee

Architecture

zero-chain/
├── zero-types Core types: accounts, blocks, transfers, parameters
├── zero-crypto Ed25519 signing + BLAKE3 hashing
├── zero-storage Account state, staking, rate limiting, snapshots
├── zero-consensus DAG-based aBFT consensus, trust scoring, finalization
├── zero-network gRPC gossip layer + JSON-RPC API
├── zero-bridge EVM bridge guardian (Base USDC, Arbitrum USDT)
└── zero-node Binary entry point, config loading, faucet

Design Choices

  • Block-lattice account model — each account has its own chain of blocks, no global block ordering bottleneck
  • Leaderless DAG aBFT consensus — events reference parents from other validators, finalized when 2/3+ weight achieved
  • Ed25519 + BLAKE3 — fast, small signatures (64 bytes) and hashes (32 bytes)
  • 136-byte wire format — from (32) + to (32) + amount (4 u32) + nonce (4 u32) + signature (64 Ed25519) = 136 bytes
  • Trinity Validators — 3 trusted parties with 2-of-3 multisig for bridge operations

Consensus

The consensus engine uses a DAG (Directed Acyclic Graph) where each validator produces events that reference the latest events from other validators. Finalization occurs when an event is seen by 2/3+ of committee stake weight.

  • Trust scoring: validators earn/lose reputation (500 initial, 1000 max, ejected below 100)
  • Slashing: equivocation = 100% stake, downtime = 10%, invalid attestation = 100%
  • Committee rotation at epoch boundaries (every 10,000 finalized events)
  • Late event detection (>5s threshold)

Bridge

Two-chain bridge with ECDSA guardian attestation:

ChainAssetConfirmations
BaseUSDC20
ArbitrumUSDT20

Circuit breaker: max 20% of reserves releasable per 24h with 2-of-3 sigs, up to 50% with 3-of-3.

Bridge-in is free (user pays L1/L2 gas only). Bridge-out costs 0.50 Z flat fee.

Quick Start

Install

curl -sSf https://install.zzero.net/install.sh | sh

Or build from source:

git clone https://github.com/Zzero-net/zero-chain.git
cd zero-chain
cargo build --release

The binary is at target/release/zero-node.

Run a Local Testnet

cd devnet
./launch.sh

This starts 3 validator nodes locally on ports 50051-50053 with a JSON-RPC API on port 9070.

Configuration

validator_index = 0key_file = "validator.key"listen = "0.0.0.0:50051"peers = ["http://peer1:50051", "http://peer2:50051"]
data_dir = "/opt/zero/data"event_interval_ms = 200log_capacity = 100000max_batch_size = 500

Run Tests

cargo test

202 tests covering crypto, storage, consensus, and bridge logic.

Network Parameters

ParameterValue
Units per Z100
Transfer fee1 unit (0.01 Z)
Max transfer amount2,500 units (25 Z)
Account creation fee500 units (5 Z)
Bridge-out fee50 units (0.50 Z)
Rate limit100 tx/s per account
Dust pruning<10 units (<0.10 Z) inactive 30 days
Max validators1,024
Min validator stake10,000 Z
Unbonding period7 days
Epoch length10,000 events

Fee Distribution

RecipientShare
Validators70%
Bridge reserve15%
Protocol reserve15%

SDKs & Tools

ResourceLink
Python SDKzero-sdk-python
JavaScript SDKzero-sdk-js
MCP Servermcp-server
Bridge Contractszero-contracts
Payment Widgetpay.zzero.net
Documentationdocs.zzero.net
Explorerexplorer.zzero.net

License

Apache-2.0

About

Zero Network node — permissionless stablecoin microtransactions. DAG-based aBFT consensus, Ed25519+BLAKE3, <500ms finality.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages