Skip to main content

Architecture

Nunchi SDK supplies reusable Rust modules between Commonware's distributed-systems primitives and your application. The modules define chain and market mechanics. Your team chooses the rules and builds the product around them.

Three layers

LayerResponsibility
CommonwareConsensus, peer networking, authenticated storage, asynchronous runtime, and cryptographic primitives
Nunchi SDKAsset and account models, authority, data modules, market matching, runtime composition, and example chains
Your applicationProduct rules, market parameters, risk limits, interfaces, governance, deployment, and operations

The SDK layer is a policy engine: its modules implement financial and network rules in software.

Who operates the network

Your organization configures and publishes the chain software. Network participants run nodes under your chosen validator and governance model. Nunchi supplies the SDK. The Authority module provides a starting point for proof-of-authority configuration.

Compose an application

The Coins example pairs CoinsRuntime with ClobExtension through nunchi_chain::Application. The runtime connects module operations and state; the extension adds order-book matching to consensus.

Your application connects matching to settlement and product-specific risk rules. Oracle records need application rules for publisher trust and data interpretation. See module boundaries before extending the example.

The Examples guide also covers a bridge chain and a custom module's transaction, ledger, state, and RPC components.

Commonware foundation

The SDK uses Commonware 2026.7.0. These versioned references cover the main primitives:

CratePurpose
commonware-actorMessage-passing between concurrent components
commonware-runtimeAsynchronous execution and deterministic testing
commonware-p2pPeer networking
commonware-consensusConsensus constructions, including Simplex
commonware-storageAuthenticated storage structures
commonware-glueIntegrations between lower-level primitives

runtime::tokio provides asynchronous execution; runtime::deterministic provides repeatable scheduling for tests and simulations. Use the deterministic runtime to reproduce concurrent behavior and exercise failure scenarios.

For upgrades, consult the release-specific compatibility notes, including peer-version and state-sync constraints.