MONETARY SYSTEM · VOL I

The Complete
Monetary System

Five currency types, programmable taxation, credit markets, savings, and time-locked vaults, all enforced by blockchain consensus, not application code.

5 CURRENCY TYPESCBDC-READYPROGRAMMABLE TAXLENDING MARKETS
14
Monetary transaction types
5
Currency property types
8
Credit risk tiers
13
Tax rate configurations
Currency Types Exchange Lending Savings & Vaults Taxation Transactions
01
CURRENCY ARCHITECTURE

Five currency types at consensus

The CurrencyType bitmask encodes all monetary properties in a single field. The protocol enforces restrictions automatically without the need for smart contracts, or application code.

0x01
EXCHANGEABLE
Can be traded on the Totem DEX for other currencies. The standard liquid currency for CBDC and retail payment use cases.
✓ Order book trading · ✓ DEX pairs · ✓ FX settlement
0x02
CONTROLLABLE
Issuer retains veto power over transfers. Required for regulatory compliance, a Central Bank can freeze or block any transfer.
✓ Issuer transfer veto · ✓ AML enforcement · ✓ Regulatory freeze
0x04
RESERVABLE
Supports reserve allocation model. Required for insurance products and lending pools that need segregated reserve accounts.
✓ Reserve segregation · ✓ Insurance reserves · ✓ Loan pools
0x08
CLAIMABLE
Holders can claim units from the reserve allocation. Used for dividend-like distributions and insurance payouts.
✓ Reserve claims · ✓ Payout distribution · ✓ Insurance payouts
0x10
MINTABLE
Issuer can create new units up to the maximum supply. Used for Central Bank CBDC issuance and credit-backed currencies.
✓ CBDC issuance · ✓ Credit expansion · ✓ Supply management
0x20
NON_SHUFFLEABLE
Cannot be used in shuffling (mixing) operations. Mandatory for CBDC and AML-regulated currencies on permissioned chains.
✓ AML compliance · ✓ CBDC traceability · ✓ Regulatory audit
02
DECENTRALISED EXCHANGE

Price-time priority order book

The Shamwari DEX is a full price-time priority order book operating at the consensus layer. Orders cannot be front-run since they are atomic with the block that includes them.

LIVE ORDER BOOK (EXAMPLE)
PRICE (ZWG)SIZETOTAL
42.85012,500535,625
42.8008,200351,160
42.7505,000213,750
42.700 - Mid Price
42.6506,800290,020
42.60015,000639,000
42.5509,300395,715
Price-Time Priority
Orders matched by best price first, then submission time. Front-running is structurally impossible where order inclusion in a block is atomic and non-modifiable.
Capital Gains Tax at Execution
The protocol calculates and withholds capital gains tax at the moment of trade execution with zero off-chain reporting required for compliant exchanges.
Any Currency Pair
Any two EXCHANGEABLE currencies on the same chain can form a trading pair. The protocol handles FX settlement atomically within the same block.
No Slippage Guarantees
Limit orders execute at exact specified prices. Market order handling uses the existing order book depth with no AMM slippage, no MEV extraction.
03
CREDIT MARKETS

Crowd-funded lending with on-chain risk scoring

The Shamwari lending system combines a 6-factor RiskCalculator with crowd-funded loan pools and an automatic rescue mechanism executed and enforced at the consensus level.

1
Loan Application
Borrower submits LENDING transaction specifying amount, term, and collateral. Protocol validates account type (SAVINGS required) and creditworthiness.
LENDING transaction type
2
Risk Assessment
RiskCalculator scores the application across 6 dimensions: credit history, debt-to-income ratio, collateral quality, account age, transaction velocity, and repayment history.
RiskCalculator.score(accountId)
3
Lender Participation
Lenders contribute to the loan pool up to the requested amount. Multiple lenders can fund a single loan, with proportional repayment distribution.
LOAN_PARTICIPATION
4
Disbursement
Once fully funded, loan is disbursed to borrower. RepaymentHeight is set i.e the block at which full repayment is due. Loan balance tracked on-chain.
5
Repayment or Rescue
Borrower submits LOAN_REPAYMENT transactions. If balance is at risk, any party can submit LOAN_RESCUE with additional collateral to prevent default.
LOAN_REPAYMENT · LOAN_RESCUE
6
Maturity / Expiry
At RepaymentHeight, LOAN_EXPIRED event fires automatically. Remaining balance distributed to lenders from collateral via protocol-enforced liquidation.
AFTER_BLOCK_APPLY → LOAN_EXPIRED
RISK CALCULATOR: 6 DIMENSIONS
DIMENSION 01
Credit History
Prior loan repayment record, defaults, and late payments weighted by recency.
DIMENSION 02
Debt-to-Income
Outstanding loan balance relative to incoming payment flows over the trailing window.
DIMENSION 03
Collateral Quality
Type, liquidity, and current market value of pledged assets relative to loan principal.
DIMENSION 04
Account Age
Blocks since account activation. Longer history reduces perceived default risk.
DIMENSION 05
Transaction Velocity
Activity level and consistency of blockchain usage as a proxy for economic stability.
DIMENSION 06
Insurance Status
Active coverage on the chain reduces lender risk and insured borrowers receive better rates.
04
SAVINGS & VAULTS

Goal-based savings and time-locked vaults

Two distinct on-chain balance dimensions for structured savings with goal-based accumulation and time-locked storage. Both enforced at block level with zero trust in application code.

CURRENCY SAVINGS
Goal-Based Savings
Deposits accumulate towards a user-defined target amount. Funds are locked until the target is reached and then automatically released to the unconfirmed balance. Ideal for savings clubs, target savings, and microsavings products.
targetUnitsUser-defined goal
currentUnitsAccumulated so far
Release conditionunits ≥ targetUnits
Release mechanismAutomatic, block-level
CURRENCY VAULT
Time-Locked Vault
Deposits are locked until a specific block height (releaseHeight). Released automatically by the AFTER_BLOCK_APPLY handler with no transaction required to unlock. Ideal for CBDC lock-up periods, fixed-term deposits, and escrow products.
lockHeightBlock when deposited
releaseHeightBlock when released
Release conditioncurrentHeight ≥ releaseHeight
Release mechanismAFTER_BLOCK_APPLY automatic
05
PROGRAMMABLE TAXATION

13 tax rate types. Zero evasion.

Tax rates are configured by a single SET_TAX_RATES transaction from the designated Tax Collector authority account. The protocol withholds at source eliminating self-reporting, no manual collection.

TRANSFER
25 bps
0–max per tx
EXCHANGE
15 bps
0–max per trade
CAP GAINS
200 bps
On profit portion
DIVIDEND
150 bps
Per distribution
ISSUANCE
50 bps
On new currency units
SHAMWARI: PROTOCOL TAXATION
  • Tax withheld at point of transaction execution
  • 13 distinct rate types with basis-point precision
  • Rates set by on-chain Tax Collector authority account
  • Atomic with the transaction which cannot be separated
  • Immutable CurrencyTaxRecord per collection event
  • Zero off-chain reporting infrastructure needed
TRADITIONAL APPROACH VS APPLICATION TAXATION
  • Tax calculated after the fact, often manually
  • Requires separate reporting and remittance workflows
  • Exchange operator collects and remits making evasion possible
  • Inconsistent application across platforms
  • No immutable audit trail at the ledger level
  • Compliance depends entirely on operator integrity
06
TRANSACTION TYPES

14 monetary protocol transactions

Each financial operation is a distinct protocol transaction type which is rejected by the network if invalid, logged immutably if valid.

SUBTYPE 0
CURRENCY_ISSUANCE
Create a new ShamwariPay currency with defined type bits, supply, and monetary policy parameters.
Issuer onlyType bitmask
SUBTYPE 1
CURRENCY_TRANSFER
Transfer units between accounts. CONTROLLABLE currencies require issuer approval. Tax withheld automatically.
Instant settlementAuto tax
SUBTYPE 2
PUBLISH_EXCHANGE_OFFER
Place a limit order on the DEX to buy/sell currency at a specified rate. Price-time priority matching.
Order bookLimit only
SUBTYPE 3
EXCHANGE_BUY
Immediately fill available sell orders up to a specified amount. Capital gains tax withheld at execution.
Market fillCGT auto
SUBTYPE 5
CURRENCY_PAYMENT
Payment to a SAVINGS-type recipient. Required for retail CBDC distribution and regulated payment flows.
SAVINGS recipientsRegulated
SUBTYPE 9
LENDING
Apply for or fund a loan. Specifies principal, term, risk parameters, and collateral. Crowd-funding support built in.
8 risk tiersCrowd-fundedAI
EXPLORE FURTHER

The complete monetary infrastructure.

Full API documentation, transaction type reference, and testnet access available.