SYSTEM ARCHITECTURE · FULL REFERENCE

Two-tier ledger.
Five financial systems.
One root chain.

A parent chain anchors sovereign child chains. Each chain is an isolated financial environment with its own schema, currency, permission policy, and embedded regulatory authorities. Every financial primitive from payments, lending, insurance, commerce and identity reside within the consensus layer, not in smart contracts.

FXTCHAIN + BETACHAINS 70+ TRANSACTION TYPES 6-LEVEL PERMISSIONS 13 TAX RATE TYPES BINDER PROTOCOL POST-QUANTUM CONSENSUS
2
Chain tiers:
FxtChain + BetaChains
6
Permission types:
Active + Blocker hierarchy
70+
Protocol-native
transaction types
13
Tax rate types:
Basis-point precision
01
CHAIN HIERARCHY
FxtChain anchors every BetaChain

The two-tier model separates infrastructure from application. FxtChain handles global settlement finality and houses the infrastructure-only transaction set. BetaChains are sovereign financial environments where each has its own schema, currency, permission policy, and embedded regulatory authority accounts.

PARENT CHAIN · LAYER 0 · INFRASTRUCTURE
FxtChain: SHAMWARI (WEALTH)
id=1  ·  schema: PUBLIC  ·  supply: 1,000,000,000,000 QNT  ·  decimals: 3
POST-QUANTUM ROOT INFRASTRUCTURE ONLY
BETACHAINS: SOVEREIGN JURISDICTION LAYER
🏦
CAPITAL
CAPITAL MARKETS CHAIN
Schema: CAPITAL
Totem Exchange
Digital Certificates
Developer App Store
Open permission policy
🇿🇼
ZIMBABWE
ZWG · RESERVE BANK OF ZIM
Schema: ZIMBABWE
ZWG stablecoin · CBDC
Full ShamwariPay + Insurance
CENTRAL BANK authority account
Policy → BETA at block 10K
🇿🇦
SOUTH AFRICA
ZAR · SARB · FSB · SARS
Schema: SOUTHAFRICA
ZAR digital currency
Totem + Insurance
SARB + FSB authority accounts
SARS tax withholding
YOUR CHAIN
CONFIGURABLE AT GENESIS
Schema: <JURISDICTION>
Custom stablecoin
White-label config
3 authority accounts
LATAM · ASEAN · MENA · EU
PropertyFxtChain (Parent)BetaChain (Child)
Chain id1 (fixed singleton)2, 3, 4… sequential at creation
Database schemaPUBLICChain name e.g. ZIMBABWE, CAPITAL
Native currencyWEALTH (SHAMWARI)Per-chain ZWG, ZAR, CAPITAL…
Total supply1,000,000,000,000 QNTImmutable configuration at genesis
Transaction scopeCore type infrastructure-wide transactions onlyFull financial primitive set (application types)
Permission policyN/A for root authorityNONE → BETA_CHAIN at a pre-committed block height
Regulatory authoritiesN/A3 hardcoded at genesis: CB + SEC + INS
Disabled API tagsChain-control subsetConfigurable per chain via disabledAPITags
Instantiation patternStatic singleton (JVM init)Builder pattern which is immutable after build()
Cross-chain settlementProvides finality anchorReferences FxtChain for global settlement events
02
SCHEMA ISOLATION
Every BetaChain is a fully isolated database

Each chain writes exclusively to its own named schema in the database. Account balances, totem ownership, insurance policies, and all financial state are schema-scoped and one chain cannot read or write another's tables. This is not application-level isolation; it is enforced at the database layer.

SCHEMA ISOLATION MODEL
PUBLIC
FxtChain (SHAMWARI)
Infrastructure
ZIMBABWE
ZIMBABWE BetaChain
Full suite
SOUTHAFRICA
SOUTH AFRICA BetaChain
Regulated
CAPITAL
CAPITAL BetaChain
Markets only
GENESIS CONFIGURATION and immutable after init
// BetaChainBuilder for key genesis params BetaChain.newBuilder() .id(2) .schema("ZIMBABWE") .currency("ZWG") .name("Zimbabwe Gold Chain") .description("Central Bank regulated chain") .totalAmount(100_000_000_000L * Constants.ONE_COIN) .permissionPolicyType(PermissionPolicyType.NONE) .permissionSwitchHeight(10_000L) // NONE → BETA_CHAIN at block 10K .centralBankAccountId(RESERVE_BANK_ACCOUNT_ID) // hardcoded at genesis .securitiesRegulatorId(SEC_ACCOUNT_ID) .insuranceAuthorityId(IPEC_ACCOUNT_ID) .disabledAPITags() // no restrictions .build();
THREE EMBEDDED REGULATORY AUTHORITIES
Central Bank
Controls currency issuance, reserve requirements, and monetary policy transactions. The only account type permitted to execute CURRENCY_ISSUANCE and set currency control parameters. Embedded at betaChain genesis and cannot be changed post-deployment.
Securities Regulator
Controls TotemApproval lifecycle: approving, suspending, and delisting tokenised securities. The 6-state machine requires securities regulator signature on all state transitions. No application code can bypass this.
Insurance Authority
Approves and suspends insurance products. Only the insurance authority account can execute INSURANCE_APPROVAL and INSURANCE_SUSPENSION. Authority account ID validated at consensus, not by application logic.
Immutability Guarantee
All three authority account IDs are written into the chain genesis block. There is no admin transaction that changes them post-deploy. A nation's central bank cannot be replaced by any participant including Shamwari network operators.
03
PERMISSION FRAMEWORK
Five levels. One temporal gate. No hard fork.

BetaChains launch with the NONE permission policy with permissionless bootstrapping for community adoption. At a pre-committed block height set at genesis, the policy transitions automatically to BETA_CHAIN: all future transactions require CHAIN_USER permission or above. The transition is protocol-enforced and requires no chain upgrade.

PERMISSION HIERARCHY
MASTER_ADMIN
Root authority. Grants CHAIN_BINDER and CHAIN_ADMIN permissions. Cannot be revoked by any other account. Equivalent to system root.
CHAIN_BINDER
Transaction processor permission allowing granted accounts to preprocess chain transactions. Granted by MASTER_ADMIN only.
CHAIN_ADMIN
Approves account CHAIN_USER permissions after KYC/AML checks. Banks and financial services providers operate with this permission.
CHAIN_USER
Standard participant. Required on BETA_CHAIN policy chains. All transactional operations from payments, trading to insurance and commerce require this level.
BLOCKED_CHAIN_USER
Positive denial mechanism hard-blocks a CHAIN_USER even if CHAIN_USER is also set. Preserves full audit history of both permission grants and blocks.
POLICY LIFECYCLE
Genesis: NONE policy deployed
The chain launches with PermissionPolicyType.NONE. Any account may participate. MASTER_ADMIN and authority accounts are embedded. permissionSwitchHeight is set and immutable.
permissionPolicyType = NONE
Bootstrap phase for open adoption
Community participants, merchants, MFIs, and developers onboard freely. CHAIN_ADMIN begins KYC onboarding ahead of the transition.
blocks 0 → permissionSwitchHeight
Automatic transition requiring no hard fork
At block N (set at genesis), the consensus engine switches policy from NONE to BETA_CHAIN. Every node transitions simultaneously. No governance vote. No node upgrade. Active participants with CHAIN_USER are unaffected.
block == permissionSwitchHeight → BETA_CHAIN
Regulated operation: BETA_CHAIN policy
All new transactions require CHAIN_USER or above. Administrative types require CHAIN_ADMIN. Existing accounts without permission retain balances but cannot initiate transactions.
permissionPolicyType = BETA_CHAIN
AI ACCOUNT PERMISSION MATRIX
TransactionAI AllowedMethod
CURRENCY_PAYMENT (P2P)✓ YesisAIAllowed() → true
SUBSCRIBE / UNSUBSCRIBE✓ YesisAIAllowed() → true
PURCHASES✓ YesisAIAllowed() → true
EXCHANGE_BUY / SELL✓ YesisAIAllowed() → true
ISSUE_CERTIFICATE✗ Blockeddefault → false
INSURANCE_APPROVAL✗ Blockeddefault → false
GRANT_PERMISSION✗ Blockeddefault → false
TOTEM_APPROVAL✗ Blockeddefault → false
04
CONSENSUS PIPELINE
Seven deterministic gates before ledger commit

Every transaction passes through the same ordered validation pipeline on every node. Each gate is deterministic and identical input always produces identical output. This is what produces consensus: not a voting mechanism, but a shared computation over the same validation logic.

1
Dilithium Signature Verification
Every transaction carries a Dilithium (ML-DSA FIPS 204) signature over the serialised transaction body. The signature is verified against the sender's registered public key before the transaction touches any other validation logic. Invalid signature → immediate rejection.
TransactionImpl.verify() → Crypto.verify(signature, txBytes, publicKey)
ML-DSA DilithiumFIPS 204No ECDSA anywhere
2
Chain Routing: isAllowed(TransactionType)
Chain.isAllowed(type) determines whether this transaction type is permitted on the target chain. FxtChain rejects all BetaChain transaction types. BetaChains reject all negative-byte infrastructure types. Chains with disabled transaction types enforce rejection on submission.
Chain.isAllowed(tx.getType()) → boolean
Type byte routingdisabledAPITags enforcement
3
Permission Policy Check
On BETA_CHAIN policy chains, the sender's permission level is verified. Transactions requiring administrator status are rejected from CHAIN_USER accounts. MASTER_ADMIN limited to granting CHAIN_ADMIN and CHAIN_BINDER permissions.
PermissionPolicy.check(sender, txType) → PASS | REJECT
5-level hierarchyAdmin-type enforcement
4
Account Type Gate
AccountType.isAllowed(tx, account) enforces protocol-level role restrictions. Only a BANK account can issue currency. Only a MERCHANT account can receive STORE_PURCHASE transactions. AI accounts can only submit transactions where isAIAllowed()=true. Verified at consensus.
AccountType.isAllowed(Transaction tx, Account sender)
10 account typesAI gate enforcedRole-based tx routing
5
Attachment Validation
Each transaction type implements its own validateAttachment() as the business logic gate. Insurance validates reserve sufficiency and product state. Totem validates TotemApproval lifecycle. Store validates merchant account type, escrow availability, and delivery deadline. Loan validates collateral value.
TransactionType.validateAttachment(Transaction tx)
Business logic gateState machine validationReserve checks
6
Balance & Overflow Check
All arithmetic uses Java long with explicit overflow-safe guards. Insufficient balance → rejection. The ledger can never enter a state with negative balances or integer overflow through checks before any ledger write occurs. Escrow amounts are locked and validated in the same gate.
BalanceHome.addToBalance(accountId, -amount) → overflow-safe
Overflow-safe arithmeticNo negative balances
7
Block Apply & Atomic Ledger Commit
All validated transactions in a block are applied atomically in a single database transaction. Balance debits and credits, totem transfers, insurance state changes, loan updates, and certificate issuances all commit or all roll back together. There is no partial-block state on Shamwari.
BlockchainProcessorImpl.apply(block) → atomic DB transaction
Atomic block commitNo partial-state riskCross-system atomicity
05
PROTOCOL AUTOMATION
The blockchain bills itself and pays itself out

After every successfully applied block, the AFTER_BLOCK_APPLY event fires. Multiple systems register listeners that execute automatic protocol operations without any user transaction subscriptions unsubscribe themselves after lapses, insurance products cancel on expiry, expired purchases refund buyers, and Totem freeze heights activate without any human trigger.

TRIGGER: AFTER_BLOCK_APPLY
Subscriptions
When currentHeight == nextBillingHeight, without another premium payment, the subscription listener unsubscribes the account to the service and updates the subscription statusin the same block. For payments, the nextBillingHeight is set to currentHeight + billingPeriod. Works for human accounts and AI accounts alike.
TRIGGER: AFTER_BLOCK_APPLY
Insurance Reserve Redistribution
When an insurance product reaches DELISTED status or has been SUSPENDED for 90 days, the redistribution listener proportionally distributes the remaining actuarial reserve to all active policyholders. No claim required. No intermediary. Executed at block height.
TRIGGER: AFTER_BLOCK_APPLY
Purchase Expiry Refund
If a merchant has not confirmed delivery by deliveryDeadlineHeight, the escrowed purchase amount is automatically refunded to the buyer at that block. No dispute required. The seller's rating is penalised in the same operation.
TRIGGER: AFTER_BLOCK_APPLY
Totem Freeze Monitor
At the block height set in TOTEM_FREEZE_HEIGHT_PROPERTY, the freeze listener marks the Totem as illiquid. All subsequent transfer transactions are rejected at attachment validation. No separate freeze transaction is required from the issuer.
TRIGGER: AFTER_BLOCK_APPLY
Totem Migration Activation
At TOTEM_MIGRATE_HEIGHT_PROPERTY, the migration listener activates the TotemSnapshot capturing the holder distribution at that block. Used for token migration events across chains without requiring holder action.
TRIGGER: AFTER_BLOCK_APPLY
Insurance Policy Lapse
When a policy's expirationHeight is reached and no renewal transaction has been received, the lapse listener transitions the policy to LAPSED status. Actuarial reserves are updated accordingly without issuer intervention.
06
TRANSACTION TAXONOMY
70+ consensus-layer transaction types

Every financial operation is a typed, protocol-enforced transaction and not a smart contract call. The type byte determines chain routing, permission requirements, account type eligibility, and the validation logic applied.

SHAMWARI PAY
17
CURRENCY_ISSUANCE · CURRENCY_PAYMENT
RESERVE_INCREASE · RESERVE_CLAIM
PUBLISH_EXCHANGE_OFFER
EXCHANGE_BUY · EXCHANGE_SELL
LOAN_OFFER · LOAN_ACCEPT · LOAN_REPAYMENT
COLLATERAL_RESCUE
SAVINGS_DEPOSIT · SAVINGS_WITHDRAWAL
ORDER_PLACEMENT · ORDER_CANCELLATION
CANCEL_ALL_ORDERS · TRANSFER_CURRENCY
TOTEM EXCHANGE
11
TOTEM_ISSUANCE · TOTEM_TRANSFER
TOTEM_APPROVAL (6-state lifecycle)
TOTEM_SUPPLY_INCREASE · TOTEM_DELETION
TOTEM_SET_PROPERTY · DIVIDEND_PAYMENT
PLACE_ASK_ORDER · PLACE_BID_ORDER
CANCEL_ASK_ORDER · CANCEL_BID_ORDER
INSURANCE
19
INSURANCE_CREATION · INSURANCE_APPROVAL
INSURANCE_SUSPENSION · INSURANCE_DELISTING
INSURANCE_RENEWAL · POLICY_APPLICATION
POLICY_APPROVAL · POLICY_REJECTION
POLICY_CANCELLATION · PREMIUM_PAYMENT
CLAIM_SUBMISSION · CLAIM_APPROVAL
CLAIM_REJECTION · CLAIM_APPEAL
APPEAL_ADJUDICATION · FRAUD_INVESTIGATION
RESERVE_DEPOSIT · RESERVE_WITHDRAWAL
E-COMMERCE
4
PURCHASES
DELIVERIES
REFUNDS
REWARDS
IDENTITY & CERTIFICATES
4
ISSUE_CERTIFICATE · RENEW_CERTIFICATE
REVOKE_CERTIFICATE · SET_ACCOUNT_INFO
CHAIN CONTROL (FxtChain)
5
GRANT_PERMISSION · REVOKE_PERMISSION
FORGING_ASSIGNMENT · CHAIN_CONFIG
BLOCK VALIDATION
GATING INTERFACE where every type implements
interface TransactionType { // Chain routing: does this type run here? boolean isAllowed(TransactionType type); // AI gate: secure by default default boolean isAIAllowed() { return false; // override to permit AI agents } // Business logic: type-specific rules void validateAttachment(Transaction tx) throws ValidationException; // Admin gate: does this need CHAIN_ADMIN? default boolean isAdministrative() { return false; } }
07
DESIGN PHILOSOPHY
Why protocol-native beats smart contracts for financial infrastructure

The decision to implement every financial primitive at the consensus layer rather than as smart contract overlays is not a limitation but a core architectural thesis. Every security property, compliance guarantee, and operational cost advantage flows directly from this design choice.

Fixed, auditable security surface

On existing platforms, every new dApp deployment is a new attack surface. Shamwari's financial logic is audited once in the protocol codebase and deployed everywhere. $3.8B+ in DeFi has been lost to smart contract exploits that are structurally impossible here.

  • No re-entrancy and no external contract calls from financial logic
  • No integer overflow or explicit overflow-safe arithmetic throughout
  • No upgrade proxy vulnerabilities as the protocol is the final arbiter
  • No frontrunning on type routing with consensus determining order

Compliance is enforced, not requested

Regulatory controls like TotemApproval, account type restrictions, and insurance authority actions are enforced by the consensus engine. No application-layer code can override them such that a suspended Totem stays suspended regardless of what any front-end tells users.

  • TotemApproval state blocks transfers at attachment validation
  • MERCHANT type required for purchase receipt and is enforced at consensus level
  • Insurance reserve gate blocks over-issuance automatically
  • AI isAIAllowed() checked before mempool entry, not after

Cross-system atomicity without bridges

All five financial systems share the same protocol, so cross-system operations are atomic by construction. A purchase that triggers a loyalty reward, a loan repayment that releases collateral can all execute in one block, one database transaction. No bridge risk. No cross-contract call failure.

  • No bridge risk as there is no cross-contract calls between systems
  • Single DB transaction per block based on all-or-nothing semantics
  • AFTER_BLOCK_APPLY listeners maintain consistent post-state
  • No oracle dependency for internal financial logic

Predictable fees for mass-market access

Gas models create unpredictable transaction costs, making them unusable for high-frequency, low-value operations like subscription billing, insurance premium collection, and microfinance repayments. Shamwari's transaction fee model is fixed and predictable per transaction type.

  • Fixed, predictable fees per transaction type
  • No fee spikes during network congestion events
  • Subscription payment viable at zero marginal cost per cycle
  • Viable on feature phones with low-bandwidth connections
PropertyShamwari (Protocol-native)Ethereum (Smart contract)Solana (Programme-based)
Financial logic locationConsensus layerSmart contract (EVM bytecode)On-chain programme (SBF)
Compliance enforcementProtocol-enforced, ungovernable by appsApplication-layer only, bypassableApplication-layer only, bypassable
Transaction cost modelFixed per-type feeVariable gas fees spike unpredictablyLow but not zero and SOL denominated
Security audit surfaceOne codebase, one auditEvery contract is a new surfaceEvery programme is a new surface
Re-entrancy riskNone with no external callsStructural risk (DAO hack, $60M)Structural risk exists
Post-quantum signaturesML-DSA Dilithium from genesisECDSA migration TBDEd25519 is quantum vulnerable
Regulatory authorityHardcoded at genesis, immutableNo native conceptNo native concept
08
CHAIN CONTROL & KYC
Protocol-native permission governance

Shamwari transforms each BetaChain from an open blockchain into a regulated financial network where participation is a privilege that must be explicitly granted, can be revoked, and is permanently recorded. This is not application-layer access control but enforced logic at the transaction validation layer.

SIX PERMISSION TYPES
MASTER_ADMIN
Set exclusively at chain construction. Grants CHAIN_ADMIN, BLOCKED_CHAIN_ADMIN, and CHAIN_BINDER. Immutable for the chain's lifetime.
CHAIN_ADMIN
Granted by MASTER_ADMIN. Manages day-to-day KYC onboarding through granting and revoking CHAIN_USER and BLOCKED_CHAIN_USER permissions.
CHAIN_BINDER
Infrastructure permission. Authorised to submit BetaBlock transactions anchoring BetaChain activity onto FxtChain. Granted by MASTER_ADMIN only.
CHAIN_USER
Standard transactional participant. Submit transactions, receive transfers and payments. Granted by CHAIN_ADMIN after KYC verification.
BLOCKED_CHAIN_ADMIN
Blocker type. Hard-blocks a CHAIN_ADMIN where their effective permissions are nullified without removing the original grant record.
BLOCKED_CHAIN_USER
Blocker type. Hard-blocks a CHAIN_USER and ensures they cannot transact even if CHAIN_USER is also set. Preserves full audit history.
CASCADING REVOCATION

When a CHAIN_ADMIN is removed, the system automatically revokes every CHAIN_USER and BLOCKED_CHAIN_USER permission they granted from the specified height onwards. No orphaned permissions persist after an admin is compromised or removed.

ENCRYPTED KYC ON-CHAIN
Kyber-Encrypted Permission Data
Each BetaChainPermission record carries an EncryptedData payload as a Kyber-encrypted blob holding KYC documentation references and compliance attestation identifiers. Readable only by the granting institution's custody system; the blockchain stores ciphertext permanently.
Dynamic Policy Transition
Chains transition from NONE (open access) to BETA_CHAIN (permissioned) at a configured block height. The switch is block-exact and evaluated dynamically by a Supplier lambda on every height check. No hard fork required.
Transaction Validation Enforcement
BetaChainPermissionChecker validates every transaction: sender must hold CHAIN_USER, recipient must hold CHAIN_USER (with exceptions for currency transfers). BetaBlocks require CHAIN_BINDER. SHUFFLING_CREATION and DIVIDEND_PAYMENT are categorically forbidden on permissioned chains.
Reversible Account Freezing
BLOCKED_CHAIN_USER provides targeted, reversible suspension. The original CHAIN_USER grant remains in the versioned table; removing the blocker instantly restores access. Full history of both grant and block preserved for regulatory audit.
CHAIN CONTROL COMPARISON
CapabilityShamwari Chain ControlTraditional KYC SystemSmart Contract Access Control
Permission enforcementProtocol layer is robust and structurally impossible to bypassApplication layers can be circumventedApplication layer depends on smart contract logic
Cascading revocationAutomatic on admin removalManual multi-system updateNot available
Blocker mechanismPositive denial with full historyDelete-only and loses audit trailNot available
KYC data attachmentEncrypted on-chain per grantSeparate databaseNot available
Policy upgradeIn-protocol at configured block heightRequires redeploymentRequires contract upgrade
Audit trailVersioned blockchain table that is immutableExternal database which is modifiableEvent logs only
09
PROTOCOL-NATIVE TAXATION
Automatic tax withholding at the consensus layer

Shamwari's Taxation System is the most comprehensive on-chain tax infrastructure deployed on any blockchain. Every taxable transaction automatically computes applicable taxes, withholds them from relevant parties, and credits the chain's designated Tax Collector account all atomically within the same block.

13 TAX RATE TYPES with BASIS-POINT PRECISION
TRANSACTION
0–3500 bps
General levy
VALUE ADDED
0–3500 bps
Goods & services
CAPITAL GAINS
0–3500 bps
Asset sales
SALES
0–3500 bps
Store purchases
INSURANCE LEVY
0–3500 bps
Policy applications
CURRENCY TRANSFER
0–3500 bps
Payments & lending
LOAN INTEREST
0–3500 bps
Withholding at source
SUBSCRIPTION
0–3500 bps
Recurring services
EXCHANGE / FX
0–3500 bps
Foreign exchange
TOTEM ISSUANCE
0–3500 bps
Stamp duty
DIVIDEND
0–3500 bps
Withholding tax
STORE REFUND
0–3500 bps
Refund transactions
INSURANCE PREMIUM
0–3500 bps
Premium payments
TAX CALCULATION

Basis-Point Precision with Thresholds

Tax calculation: taxAmount = (transactionAmount × rateBps) / 10,000. Each type supports independent min/max taxable thresholds. Amounts below minimum are untaxed; amounts above maximum are capped.

  • Zero-rate disables tax without deleting history
  • Integer arithmetic with no rounding errors
  • Multi-tax transactions: independent calculation, no compounding
  • Per-type audit receipt via computeTaxBreakdown()

Atomic Multi-Rate Updates

The SetTaxRatesAttachment allows up to 13 rate entries in a single transaction. All entries apply at the same block height via atomic database transaction ensuring partial updates are structurally impossible.

TAX COLLECTOR & RECORDS
Embedded Tax Collector Account
Each chain's Tax Collector account is set at genesis (ZIMBABWE_TAX_COLLECTOR_ID, SOUTH_AFRICA_TAX_COLLECTOR_ID). Every taxable transaction credits withheld tax to this account via CurrencyTaxRecord.creditTaxAccount().
Immutable CurrencyTaxRecord
Every tax collection event writes a permanent CurrencyTaxRecord linking the originating transaction hash, paying account, Tax Collector account, currency, and amount. The blockchain is the authoritative tax collection record and no reconciliation required.
Real-Time Regulatory Reporting
TaxPolicy.toJSON() returns a machine-readable snapshot of all configured rates including effective block heights. Regulators query this endpoint at any time to verify the chain is operating with correct rates.
Withholding-at-Source
LOAN_INTEREST_TAX and DIVIDEND_WITHHOLDING_TAX implement structural tax evasion prevention. Tax is deducted before income reaches the recipient making it impossible to bypass, with immediate credit to the Tax Collector.
10
BINDER PROTOCOL
Fee abstraction for institutional use

The Binder Protocol removes the requirement for end users to hold native blockchain tokens to pay transaction fees. A Binder holds WEALTH (FXT) tokens and pays FxtChain fees on behalf of BetaChain users, who pay BetaChain fees in their local currency. Users only ever need ZWG, ZAR, or CAPITAL to transact.

HOW BINDING WORKS
Binder Registration
A binder calls addOrChangeBinder with a BetaChain, their ShamwariQKP, a total fee limit, and a list of binding Rules. Banks, MFIs, or PSPs can act as binders for their customers.
Transaction Filtering
The binder's runBinding() scans unconfirmed transactions against each Rule's filters based on transaction type, account group andfee range. Only matching transactions qualify for acceptance.
Fee Calculation
For each qualifying transaction, the binder calculates the FXT fee using the Rule's feeCalculator (MIN_FEE, PROPORTIONAL_FEE, or custom). The binder's profit margin is the overpay factor.
BetaBlock Bundling
Qualifying transactions are bundled into a BetaBlockFxtTransaction i.e a single FxtChain transaction carrying up to MAX_NUMBER_OF_BETA_TRANSACTIONS BetaTransactions. The binder pays one FXT fee.
Confirmation & Recovery
When confirmed, all bundled BetaTransactions execute. The binder's FXT cost is recovered from BetaChain fees collected from users. The binder sets a totalFeesLimitFQT for exposure management.
BINDING RULES

Rule Structure

Each Rule combines three elements: minimum rate (minRateMTAPerFXT), overpay factor (overpayFQTPerFXT), and an ordered list of Filters. Filters determine which transactions the Rule applies to.

  • Transaction type filters
  • Account group filters
  • Fee range filters
  • Chain-specific filters

Fee Calculators

MIN_FEE charges exactly the required FXT fee. PROPORTIONAL_FEE scales with the BetaChain fee paid by the user. Custom calculators can be loaded via nxt.customBindingFeeCalculators for institutional-specific structures.

Rate Discovery

Binders advertise rates via BinderRate broadcast to the peer-to-peer network. Wallets query getBinderRates() and select the most favourable binder. Competitive binder pricing is incentivised as the binder offering the lowest fee wins contested transactions.

FINANCIAL INCLUSION IMPACT
In emerging markets, requiring users to hold a universal token to use financial applications is a significant adoption barrier. The Binder Protocol removes this entirely. A bank, MFI, or payment provider acts as binder for their customers where the end customer deposits tokens denominated in their national currency and transacts immediately, never interacting with the main chain tokens.
11
BLOCKS & CONSENSUS
Post-quantum proof-of-stake

Every Shamwari block is signed with ML-DSA-2 (Dilithium Level 2, NIST FIPS 204). The balance-weighted forging algorithm determines block generation rights without energy expenditure. Dynamic base target adjustment maintains ~60-second block times.

BLOCK HEADER
FIELDS
10
version : 4 bytes
timestamp: 4 bytes (epoch seconds)
previousBlockId: 8 bytes
transactionCount: 4 bytes
totalFeeFQT: 8 bytes
payloadHash: 32 bytes (SHA-256)
generatorPublicKey: 2112 bytes (Kyber 800 + Dilithium 1312)
generationSignature: 32 bytes
previousBlockHash: 32 bytes
blockSignature: 2420 bytes (ML-DSA-2)
BLOCK LIMITS
  • Hard size limit: 10 MB raw bytes
  • Max BetaBlock payload: configurable per chain
  • Max BetaTransactions per BetaBlock: configurable
  • Target block time: ~12 seconds
FORGING ALGORITHM

Hit & Target Calculation

For each candidate forger, a hit value is computed from SHA-256(previousBlock.generationSignature || forgerPublicKey.combinedPublicKey). The forger with the earliest hitTime generates the next block.

  • Balance-weighted with no energy consumption
  • Deterministic verification by all nodes
  • Up to 100 forgers per node

Dynamic Base Target

Adjusts every 2 blocks to maintain target time. If average block time exceeds target, baseTarget increases (easier forging). If below, it decreases. Bounded by MIN/MAX_BLOCKTIME_DELTA to prevent sudden swings.

Resource-Aware Forging

The Generator module prevents block generation when CPU or RAM is insufficient for current transaction volume. Required resources scale linearly with mempool size to prevent node crashes under extreme load.

~12s
Target block time
10 MB
Block size hard limit
2,420
Bytes per Dilithium block signature
100
Max forgers per node
12
GENESIS & STATE
Deterministic bootstrapping and versioned state

The genesis block establishes the entire initial network state from JSON data files. All mutable state is stored in versioned entity tables and every state change at every block height is preserved, enabling point-in-time queries without transaction replay.

GENESIS IMPORT SEQUENCE
IMPORT ORDER
8
1. PUBLIC_KEY.json: Initial account public keys
2. SHAMWARI.json: FxtChain initial balances
3. CAPITAL.json: CAPITAL chain balances
4. ZIMBABWE.json: ZIMBABWE chain balances
5. SOUTH_AFRICA.json: SOUTH AFRICA balances
6. TOTEMS.json: Pre-existing digital assets
7. SHAMWARI_CURRENCIES.json : Pre-registered currencies
8. ACCOUNT_INFO.json: Metadata and encrypted data
SPECIAL GENESIS PROPERTIES
  • Version -1, timestamp 0, previousBlockId 0
  • All-zero payloadHash and ShamwariPublicKey
  • Hardcoded generationSignature as a cryptographic seed for all PoS randomness
  • Deterministic: same input files = same genesis payload hash
STATE MANAGEMENT
Versioned Entity Tables
All mutable state is keyed by (id, height). Query any entity at any past block height without replaying transactions. Foundation for snapshots, dividend distributions, and historical balance queries.
Read-Write-Update Lock
Three-tier locking: multiple read locks for queries, single update lock for lightweight modifications, exclusive write lock for block application and pop-off. Maximises read concurrency while serialising mutations.
Prunable Data
Encrypted message payloads can be removed after configurable lifetime while the hash remains as a permanent cryptographic commitment. Reduces storage footprint without breaking verifiability.
Unconfirmed Transaction Pool
512 MB maximum mempool size with per-account rate limit of 100 concurrent transactions. Prevents flooding attacks while accommodating institutional transaction volumes. Forging thread polls every 500ms.
13
MULTI-JURISDICTION
One network, many regulatory regimes

A single Shamwari node simultaneously serves a fully open global asset market (CAPITAL chain), a regulated ZWG monetary system with Central Bank oversight (ZIMBABWE chain), and a South African rand-denominated financial platform (SOUTH AFRICA chain) all isolated, each under its own regulatory framework, sharing the same proof-of-stake consensus.

ChainCurrencyCodeDecimalsTotal SupplyKey Restriction
FxtChainSHAMWARIWEALTH31,000,000,000,000Settlement only
CAPITALCAPITALCAPITAL41,000,000,000,000Open permission policy
ZIMBABWEZimbabwe GoldZWG1100,000,000,000Permissioned from configured height
SOUTH AFRICASouth African RandZAR1100,000,000,000Permissioned from configured height
Central Bank Authority
Controls currency issuance, reserve requirements, and monetary policy. The only account permitted to execute CURRENCY_ISSUANCE and set currency control parameters. Hardcoded at genesis and cannot be changed.
Securities Regulator
Controls TotemApproval lifecycle responsible for approving, suspending, and delisting tokenised securities. The 6-state approval workflow requires regulator signature on all transitions. No bypass possible.
Insurance Authority
Approves and suspends insurance products. Only this account can execute INSURANCE_APPROVAL and INSURANCE_SUSPENSION. Authority ID hardcoded at genesis and validated at consensus.
Tax Collector
Receives all tax withholding from taxable transactions. Immutable designation at chain genesis. Tax Collector account balance reflects total tax revenues collected in real time.
Immutability Guarantee
All regulatory authority account IDs are written into the chain genesis block. No admin transaction can change them post-deployment. A nation's central bank cannot be replaced by any participant.
Shared Consensus
All chains share the same proof-of-stake consensus and block ordering. Inter-chain settlement is provably tied to specific block heights. Compliance teams query each chain's state independently.
14
COMPETITIVE POSITION
Architecture comparison

Shamwari's architectural decisions from a dual-chain design to protocol-native financial primitives, post-quantum security, and embedded regulatory governance create structural advantages that application-layer solutions cannot replicate.

Architectural PropertyShamwariEthereumHyperledger Fabric
Block signaturesPost-quantum Dilithium (FIPS 204)ECDSA (quantum-vulnerable)RSA/ECDSA (quantum-vulnerable)
Account keysML-KEM-512 + ML-DSA-2 hybridECDSA secp256k1RSA/ECDSA
ConsensusBalance-weighted PoS (no energy waste)PoS (ETH 2.0)PBFT / Raft (permissioned)
Multi-jurisdictionNative BetaChain modelManual shardingChannels (limited)
Regulatory accountsProtocol-embedded authority accountsApplication layer onlyApplication layer only
Fee abstractionNative Binder ProtocolERC-4337 (complex)Orderer pays (limited)
Financial product depth70+ native transaction typesERC standards + contractsCustom chaincode
KYC/permissionProtocol-native PermissionPolicyApplication layer onlyMSP (member services)
Tax integrationAutomatic on-chain withholdingNoneNone
Permission upgradeBlock-height-triggered in-protocolGovernance contractsMSP configuration
FIVE TECHNICAL VOLUMES WITH FULL SPECIFICATION

Read the complete architecture documentation

All five volumes of the Shamwari Technical Papers are available in the documentation covering every system, every transaction type, every cryptographic decision, and the full database schema.