Skip to main content

Architecture Overview

Shamwari Network (developed by TheNamelessTree Networks) is a sovereign, post-quantum financial operating system (OS) and dual-chain blockchain infrastructure purpose-built for emerging markets (SADC, Sub-Saharan Africa, MENA, ASEAN, and LATAM).

Built on an evolved Java NXT / Ardor core architecture paired with a native compiled Post-Quantum Cryptography (PQC) engine (nxt.crypto), Shamwari replaces classical smart contract execution environments with optimized, protocol-native financial primitives, eliminating smart contract vulnerability risks while maintaining strict regulatory compliance across jurisdictions.

Core Components

┌─────────────────────────────────────────────────────────────┐
│ API Layer (Jetty) │
│ REST/JSON API | API Proxy | Developer Servlet | Apps UI │
├─────────────────────────────────────────────────────────────┤
│ Transaction Layer │
│ CreateTransaction | Validate | Sign (ML-DSA-2) | Broadcast │
├─────────────────────────────────────────────────────────────┤
│ Protocol Subsystem Layer │
│ ShamwariPay | Totem Exchange | Certificates | App Store │
│ Subscriptions | Credit Markets | Chain Control / Taxes │
├─────────────────────────────────────────────────────────────┤
│ Blockchain Engine │
│ Block Generation (PoS Forging) | BetaChain Processing │
│ Binder Protocol Handler | Peer Consensus │
├─────────────────────────────────────────────────────────────┤
│ Post-Quantum Crypto Layer │
│ ShamwariPublicKey | ShamwariPrivateKey | ShamwariQKP │
│ PBKDF2-HMAC-SHA512 KDF | SHA3-256 Domain Separation │
│ ML-KEM-512 (FIPS 203) | ML-DSA-2 / Dilithium (FIPS 204) │
│ HKDF-SHA256 & AES-256-GCM | ASN.1 X.509 / PKCS#8 DER │
├─────────────────────────────────────────────────────────────┤
│ Data Layer (H2) │
│ EntityDbTable | DerivedDbTable | PrunableDbTable │
├─────────────────────────────────────────────────────────────┤
│ Network Layer │
│ Peers | NetworkHandler | APIProxy | P2P Bootstrap │
└─────────────────────────────────────────────────────────────┘

Sovereign Dual-Chain Architecture

Shamwari operates a dual-chain topology that decouples core consensus security from application logic and jurisdictional governance:

  1. AlphaChain / FxtChain (Parent Chain):

    • Serves as the primary settlement and consensus layer.
    • Powered by a balance-weighted Proof-of-Stake (PoS) consensus mechanism ("forging") using the native utility token (WEALTH / FXT).
    • Generates blocks signed natively with NIST-standardized ML-DSA-2 signatures (~12-second block time).
  2. BetaChains (Child Chains / Sovereign Chains):

    • Independent, leasable child-chains that execute application logic, domestic currency stablecoins, and jurisdiction-specific financial services.
    • Allows central banks, governments, or commercial institutions (e.g., ZIMBABWE, SOUTH AFRICA, CAPITAL chains) to run isolated environments.
    • Enforces custom per-chain regulatory authority accounts (Central Bank, SEC, Tax Collector, Insurance Regulator), KYC permissions, and local tax collection rules.
  3. The Binder Protocol:

    • Acts as the economic and transaction bridge connecting BetaChains to the AlphaChain settlement layer.
    • Binders process child-chain transactions, collect fees in domestic tokens/fiat, and settle network consensus fees on AlphaChain in WEALTH/FXT.
    • Enables a zero gas-fee user experience, allowing end-users to transact directly in local fiat/stablecoins without holding volatile network tokens.

Module Structure

PackageResponsibility
nxt.httpREST API endpoints, parameter parsing, JSON responses, API console
nxt.accountAccount model, 15 protocol-enforced account types, leasing, AutonomousAccountControl (AI Agents)
nxt.blockchainBlock processing with ML-DSA-2 signatures, chain state, transaction execution
nxt.cryptoPost-quantum cryptographic primitives (ShamwariQKP, Crypto, KyberPublicKey, KyberPrivateKey, DilithiumPublicKey, DilithiumPrivateKey, EncryptedData, PBKDF2 KDF, HKDF-SHA256, AES-256-GCM, ASN.1 X.509/PKCS#8 encodings)
nxt.monetary / nxt.msShamwariPay: 5 programmable currency types, order-book exchange, savings, vaults, P2P credit markets, LOAN_RESCUE
nxt.aeTotem Exchange: Fungible tokens, NFTs, order-book trading, dividends, TotemApproval regulatory gating
nxt.certificatesDigital Certificates: ML-DSA-2 signed PKI credentials, W3C Verifiable Credentials
nxt.dbDatabase abstraction using H2 (EntityDbTable, DerivedDbTable, PrunableDbTable, FilteredDbTable)
nxt.peerP2P networking, peer discovery, message routing, handshake verification
nxt.votingPhasing, polls, multi-party account control, threshold voting
nxt.subscriptionsProtocol-native recurring subscription payments and billing plans
nxt.appsOn-chain Application Registry / Developer App Store

Protocol-Native Subsystems

Rather than running unverified VM-executed smart contracts, Shamwari implements 70+ protocol-native transaction types directly in the core blockchain runtime:

  • ShamwariPay (Monetary System): Multi-currency engine with 5 programmable currency types (EXCHANGEABLE, CONTROLLABLE, MINTABLE, NON_SHUFFLEABLE, BYPASS_TAX), decentralised order-book trading, savings accounts, time-locked vaults, and P2P credit markets with 8 credit tiers and multi-factor risk scoring.
  • Totem Digital Asset System: Engine for fungible and non-fungible assets (Totems), including corporate action snapshotting, dividend distributions, and multi-party regulatory gating (TotemApproval).
  • Chain Control & Regulatory Stack: Protocol-native AML/CFT compliance, real-time ZIMRA/tax withholding, Travel Rule enforcement, and 15 protocol-enforced account types (including BANK, MFI, GOVERNMENT, and AUTONOMOUS AI agent accounts).
  • Digital Certificates: Post-quantum Public Key Infrastructure (PKI) for issuing, verifying, and revoking credentials fully on-chain.
  • Developer App Store: Protocol-native application registry providing developer identity proof and dApp distribution.
  • Subscriptions System: On-chain, trustless recurring billing engine without payment processor dependencies or chargeback risks.

Storage Architecture

Shamwari uses an H2 relational database indexed by block height, providing deterministic state rollbacks and historical auditability:

  • EntityDbTable: Persistent core entity records (accounts, transactions, blocks, currencies).
  • DerivedDbTable: Computed on-chain state registers (account balances, trade history, loan statuses).
  • PrunableDbTable: Prunable encrypted and plaintext message payloads with configurable lifetimes (MAX_PRUNABLE_LIFETIME), while preserving permanent on-chain hash commitments.
  • FilteredDbTable: Query-optimized database views for high-throughput API reads.