Ferrum鐵鏈
閱讀白皮書Read
主權技術白皮書 · 版本 1.2 · 草案 · 雙語Sovereign Technical White Paper · v1.2 · Draft · Bilingual

國家級Ferrum 鐵鏈

National-GradeFerrum

一條以 Rust 打造的主權區塊鏈,在密碼學隱私保護下統一數位身分驗證稅務管理,並以主權鏈聯邦實現跨境互通與中立清算。

A sovereign blockchain built in Rust that unifies digital identity and tax administration under cryptographic privacy, and achieves cross-border interoperability and neutral clearing through a federation of sovereign chains.

框架Framework Substrate · FRAME 共識Consensus PoSA 隱私Privacy ZK · 最小揭露 語言Language 100% Rust 互通Interop XCM 主權鏈聯邦
出塊時間Block time
3 秒Aura 確定性排程
3 sAura deterministic slots
最終性Finality
~6 秒GRANDPA BFT
~6 sGRANDPA BFT
拜占庭容錯BFT tolerance
<⅓惡意節點上限
<⅓malicious-node bound
記憶體安全Memory safety
100%Rust 編譯期保證
100%guaranteed at compile time
01

摘要

Executive Summary

為什麼一個國家需要把身分與稅務放在同一條鏈上,以及為什麼用 Rust。

Why a nation would put identity and tax on one ledger — and why in Rust.

Ferrum(鐵鏈)是一套許可制主權區塊鏈,目標是同時承載兩項國家核心職能:數位身分驗證稅務管理。兩者共享同一組信任問題——「這個人是誰」與「這個人該負什麼義務」——統一在可稽核、防竄改、且具密碼學隱私保護的帳本上,能消除政府各機關間重複認證、資料孤島與對帳成本。

Ferrum is a permissioned sovereign blockchain that carries two core state functions on one ledger: digital identity verification and tax administration. Both share the same trust questions — "who is this person" and "what do they owe" — and unifying them on an auditable, tamper-evident, privacy-preserving ledger removes duplicate verification, data silos and reconciliation costs across agencies.

名稱「Ferrum」即拉丁文的「鐵」;鐵的氧化物正是 Rust——我們以 Rust 實作的雙關,也象徵基礎設施應如鑄鐵般耐久。選擇 Rust 並非風格偏好:其所有權與借用檢查器在編譯期消除整類記憶體安全漏洞(緩衝區溢位、釋放後使用、資料競爭),這對承載全國身分與財稅資料的系統是難以替代的安全底線。

"Ferrum" is Latin for iron; iron's oxide is literally rust — a pun on our implementation language, and a nod to infrastructure built to last. The choice of Rust is not stylistic: its ownership and borrow checker eliminate whole classes of memory-safety bugs at compile time (buffer overflows, use-after-free, data races), an irreplaceable safety floor for a system holding a nation's identity and fiscal data.

原則一
Principle 1

個資不上鏈

No PII on-chain

鏈上僅錨定承諾值與雜湊;一切個人識別資訊(PII)加密儲存於鏈下,以檢視金鑰授權存取。

Only commitments and hashes are anchored on-chain; all PII is encrypted off-chain, accessed via authorized viewing keys.

原則二
Principle 2

公民零加密門檻

Zero crypto barrier

身分驗證與基本報稅免手續費;繳稅以法幣計價、用央行數位貨幣支付,公民無須持有波動性代幣。

Identity checks and basic filing are fee-free; tax is fiat-denominated and paid in CBDC — citizens need not hold any volatile token.

原則三
Principle 3

最小揭露

Minimal disclosure

以零知識證明達成「證明而不揭露」——例如證明「已成年」毋須透露生日。

Zero-knowledge proofs let citizens prove without revealing — e.g. prove "of age" without disclosing a birthdate.

02

背景與設計原則

Background & Principles

主權系統的限制條件,與我們因此放棄的「典型加密貨幣」假設。

The constraints of sovereign systems, and the "typical crypto" assumptions we drop.

多數公有鏈假設匿名參與、無許可驗證者、以代幣價格驅動安全性——這與國家基礎設施直接衝突。承載稅務義務的帳本不能讓公民義務隨幣價波動;承載身分的帳本不能讓匿名者擔任最終裁決者。Ferrum 因此從五項原則出發,並讓每項對應具體技術選擇:

Most public chains assume anonymous participation, permissionless validators and price-driven security — which directly conflicts with state infrastructure. A ledger of tax obligations cannot let duties float with a token price; a ledger of identity cannot let anonymous parties be the final arbiter. Ferrum therefore starts from five principles, each tied to a concrete technical choice:

  1. 主權與問責並存。驗證者為受認證的公私機構,身分公開、行為可究責,但仍以密碼學最終性而非單一中央點背書。
  2. 隱私即預設值。系統預設不揭露任何超出必要的資訊;揭露需經授權或法定程序,並留稽核軌跡。
  3. 可稽核但不可全知。監理與審計在授權範圍內檢視,但沒有任何單一角色能讀取全民明文。
  4. 包容性優先。無智慧型手機、無加密資產者仍能透過代理據點完成身分與稅務事務。
  5. 可演進。透過 WASM runtime 無分叉升級,並預留後量子密碼遷移路徑。
  1. Sovereignty with accountability. Validators are accredited public/private institutions — publicly identified and answerable — yet backed by cryptographic finality, not a single central point.
  2. Privacy by default. Nothing beyond the necessary is disclosed; disclosure requires authorization or due process and leaves an audit trail.
  3. Auditable, not omniscient. Supervisors audit within authorized scope, but no single role can read everyone's plaintext.
  4. Inclusion first. Those without a smartphone or crypto assets can still complete identity and tax tasks via assisted points of service.
  5. Evolvable. Forkless WASM runtime upgrades, with a post-quantum migration path reserved.
設計取捨
Ferrum 是聯盟/許可制鏈,而非無許可公有鏈。我們以「驗證者公開且受治理」換取問責與監理相容,並以開放全節點/輕節點、公開狀態根、多機構地理分散的驗證者集合,抵銷中心化風險。第 16 節誠實列出此取捨的限制。
Design trade-off
Ferrum is a consortium/permissioned chain, not a permissionless one. We trade "public, governed validators" for accountability and regulatory fit, offsetting centralization risk with open full/light nodes, public state roots and a geographically dispersed multi-institution validator set. Section 16 lists the limits of this trade-off honestly.
03

系統架構

System Architecture

五個分層,從密碼學底層到公民與機關的應用介面。

Five layers, from the cryptographic base to citizen and agency interfaces.

Ferrum 採分層架構。核心邏輯以 FRAME pallet 實作為原生 runtime 模組,商業與第三方邏輯則以 ink!(Rust→WASM)智能合約沙箱執行。下圖呈現由下而上的五層:

Ferrum is layered. Core logic ships as native FRAME pallets; commercial and third-party logic runs in an ink! (Rust→WASM) contract sandbox. The diagram shows the five layers from the bottom up:

L5 · 應用層L5 · Application公民錢包(輕節點)· 機關入口 · 報稅前端 · 驗證者控制台 · 第三方 dAppCitizen wallets (light clients) · agency portals · filing UI · validator console · 3rd-party dAppsL4 · 業務協定層(FRAME Pallets + ink!)L4 · Protocol Layer (FRAME Pallets + ink!)pallet-identity · pallet-tax · pallet-lottery · pallet-credential · pallet-treasury · 智能合約沙箱pallet-identity · pallet-tax · pallet-lottery · pallet-credential · pallet-treasury · contract sandboxL3 · Runtime / 狀態層L3 · Runtime / StateWASM 執行環境 · Merkle 狀態樹 · 無分叉升級 · 權重計費(weights)WASM runtime · Merkle state trie · forkless upgrades · weight-based feesL2 · 共識層(PoSA)L2 · Consensus (PoSA)Aura 出塊排程 · GRANDPA BFT 最終性 · 質押與罰沒 · 治理控制的驗證者集合Aura authoring · GRANDPA BFT finality · staking & slashing · governed validator setL1 · 網路與密碼學層L1 · Network & Cryptographylibp2p 點對點網路 · Tokio 非同步 · sr25519/BLAKE2 · arkworks 零知識 · RocksDBlibp2p p2p · Tokio async · sr25519/BLAKE2 · arkworks ZK · RocksDB
圖 3.1 — 分層架構:個資永不進入 L1–L3,僅以承諾值錨定。
Fig 3.1 — Layered architecture: PII never enters L1–L3; only commitments are anchored.

關鍵設計在於資料的物理位置:L1–L3 永遠只看得到密碼學承諾與雜湊;明文個資存於 L4 治理下、由機關營運的鏈下加密儲存。這讓「鏈的不可竄改性」與「個資的可刪除/可遺忘權」得以共存。

The key design is where data physically lives: L1–L3 only ever see commitments and hashes; plaintext PII sits in agency-run encrypted off-chain stores governed at L4. This lets chain immutability coexist with a right to erasure / to be forgotten.

04

技術堆疊

Technology Stack

為何整條鏈、從網路到合約都用 Rust。

Why the whole stack — network to contracts — is Rust.

分層Layer技術選型(Rust)Choice (Rust)職責Role
區塊鏈框架Blockchain frameworkSubstrate / Polkadot SDKFRAME pallet、WASM runtime、無分叉升級FRAME pallets, WASM runtime, forkless upgrades
出塊共識Block authoringsc-consensus-aura受認證驗證者的確定性輪替排程Deterministic round-robin for accredited validators
最終性Finalitysc-finality-grandpaBFT 最終性,容忍 <⅓ 拜占庭節點BFT finality, tolerates <⅓ byzantine nodes
點對點網路P2P networkinglibp2p (rust-libp2p)區塊/交易 gossip、節點探索Block/tx gossip, peer discovery
非同步執行Async runtimetokio高併發 I/O、事件迴圈High-concurrency I/O and event loop
簽章Signaturesschnorrkel (sr25519) · ed25519-dalek帳戶與驗證者簽章Account and validator signatures
雜湊HashingBLAKE2b · keccak · sha2狀態樹、承諾值、相容性雜湊State trie, commitments, compatibility hashes
零知識Zero-knowledgearkworks (Groth16/PLONK) · BBS+選擇性揭露、稅級門檻證明Selective disclosure, tax-bracket proofs
智能合約Smart contractsink! → pallet-contracts商業/第三方邏輯的 WASM 沙箱WASM sandbox for 3rd-party logic
儲存引擎StorageRocksDB (via paritydb)狀態與區塊持久化State and block persistence
後量子(路線圖)Post-quantum (roadmap)pqcrypto (Dilithium/Kyber)簽章與金鑰封裝的後量子遷移Post-quantum migration of sigs & KEM

身分註冊 Pallet(節錄)

Identity pallet (excerpt)

核心身分邏輯以原生 pallet 實作。請注意:鏈上儲存的是 doc_hash(DID 文件雜湊),而非任何個資。

Core identity logic is a native pallet. Note that only doc_hash (the DID document hash) is stored on-chain — never PII.

pallets/identity/src/lib.rsRUST
// 由「認證簽發機構」錨定 DID 文件雜湊;鏈上不存任何個資。
#[frame_support::pallet]
pub mod pallet {
    #[pallet::storage]
    pub type DidRegistry<T: Config> =
        StorageMap<_, Blake2_128Concat, Did, DidDocument<T::AccountId>, OptionQuery>;

    #[pallet::call]
    impl<T: Config> Pallet<T> {
        #[pallet::weight(T::WeightInfo::register_did())]
        pub fn register_did(origin: OriginFor<T>, did: Did, doc_hash: H256) -> DispatchResult {
            let issuer = ensure_signed(origin)?;          // 僅承諾值,非明文
            ensure!(Issuers::<T>::contains_key(&issuer), Error::<T>::NotAccredited);
            ensure!(!DidRegistry::<T>::contains_key(&did), Error::<T>::AlreadyExists);
            DidRegistry::<T>::insert(&did, DidDocument { controller: issuer, doc_hash });
            Ok(())
        }
    }
}
pallets/identity/src/lib.rsRUST
// An accredited issuer anchors the DID document hash; no PII is ever stored on-chain.
#[frame_support::pallet]
pub mod pallet {
    #[pallet::storage]
    pub type DidRegistry<T: Config> =
        StorageMap<_, Blake2_128Concat, Did, DidDocument<T::AccountId>, OptionQuery>;

    #[pallet::call]
    impl<T: Config> Pallet<T> {
        #[pallet::weight(T::WeightInfo::register_did())]
        pub fn register_did(origin: OriginFor<T>, did: Did, doc_hash: H256) -> DispatchResult {
            let issuer = ensure_signed(origin)?;          // commitment only, never plaintext
            ensure!(Issuers::<T>::contains_key(&issuer), Error::<T>::NotAccredited);
            ensure!(!DidRegistry::<T>::contains_key(&did), Error::<T>::AlreadyExists);
            DidRegistry::<T>::insert(&did, DidDocument { controller: issuer, doc_hash });
            Ok(())
        }
    }
}
05

身分驗證層

Identity Layer

自主管理身分(SSI)、可驗證憑證,以及「證明而不揭露」。

Self-sovereign identity, verifiable credentials, and "prove without revealing".

Ferrum 採用 W3C 去中心化識別碼(DID)可驗證憑證(VC)標準,定義 did:fer 方法。公民私鑰由本人裝置持有,政府戶政與受認證機構擔任憑證簽發者。

Ferrum uses W3C DIDs and Verifiable Credentials (VCs), defining the did:fer method. Citizens hold their own keys on-device; civil registries and accredited institutions act as credential issuers.

DID
DID

去中心化識別碼

Decentralized identifiers

每位公民擁有一或多個 did:fer;DID 文件僅以雜湊上鏈,可輪換金鑰而不改變識別碼。

Each citizen holds one or more did:fer; only the document hash is on-chain, so keys rotate without changing the identifier.

VC
VC

可驗證憑證

Verifiable credentials

由簽發者數位簽署的聲明(國籍、年齡、居住地、稅籍),由公民保管,離線可驗。

Issuer-signed claims (nationality, age, residence, tax status) held by the citizen and verifiable offline.

ZK / BBS+
ZK / BBS+

選擇性揭露

Selective disclosure

只揭露必要欄位,或產生零知識證明(如「年齡 ≥ 18」)而不洩漏底層資料。

Reveal only required fields, or produce a ZK proof (e.g. "age ≥ 18") without leaking the underlying data.

Recovery
Recovery

社會化金鑰回復

Social key recovery

以門檻方案(Shamir/MPC)結合機構與親屬監護人,在不託管私鑰下回復遺失金鑰。

Threshold schemes (Shamir/MPC) combine institutional and family guardians to recover lost keys without custody.

零知識年齡證明(節錄)

Zero-knowledge age proof (excerpt)

驗證者只收到證明與公開輸入,即可確認「持證人已成年」,過程中不接觸生日、姓名或證件號。

A verifier receives only a proof and public inputs, confirming "the holder is of age" without ever touching a birthdate, name or ID number.

crates/zk/src/age_proof.rsRUST
// 驗證「年齡 ≥ 18」的零知識證明,毋須揭露出生日期。
pub fn verify_age_threshold(
    proof: &Proof<Bls12_381>,
    vk: &PreparedVerifyingKey<Bls12_381>,
    public_inputs: &[Fr],   // [issuer_commitment, threshold, nullifier]
) -> Result<bool, VerifyError> {
    Groth16::<Bls12_381>::verify_proof(vk, proof, public_inputs)
        .map_err(|_| VerifyError::Malformed)
}
crates/zk/src/age_proof.rsRUST
// Verify a zero-knowledge proof of "age ≥ 18" without revealing the birth date.
pub fn verify_age_threshold(
    proof: &Proof<Bls12_381>,
    vk: &PreparedVerifyingKey<Bls12_381>,
    public_inputs: &[Fr],   // [issuer_commitment, threshold, nullifier]
) -> Result<bool, VerifyError> {
    Groth16::<Bls12_381>::verify_proof(vk, proof, public_inputs)
        .map_err(|_| VerifyError::Malformed)
}
隱私不變式
生物特徵(若採用)僅以模板雜湊保存於裝置安全晶片或機關加密庫,原始生物特徵永不上鏈、亦不集中儲存。鏈上至多保存撤銷狀態的累加器承諾。
Privacy invariant
Biometrics (if used) are kept only as template hashes in a device secure element or agency vault; raw biometrics never go on-chain and are never centrally stored. The chain holds at most a revocation-status accumulator commitment.
06

稅務管理層

Tax Administration Layer

電子發票錨定、自動預扣、隱私保護的稅級證明與可授權稽核。

E-invoice anchoring, automatic withholding, privacy-preserving bracket proofs, authorized audit.

稅務身分綁定於公民的 DID。稅務邏輯由 pallet-tax 與稅務引擎合約承載,重點是讓計算可驗證、繳納可追蹤、明細維持隱私

Tax identity binds to a citizen's DID. Logic lives in pallet-tax and a tax-engine contract, designed so that computation is verifiable, payment traceable, and line items private.

核心機制

Core mechanisms

  • 電子發票錨定。發票雜湊即時上鏈,形成防偽且可稽核的供應鏈,壓縮逃漏稅與假發票空間;明細仍加密於鏈下。
  • 可程式化預扣。薪資、利息等所得可由合約於支付當下自動預扣稅額,直接結算入國庫帳戶。
  • 零知識稅級證明。納稅人可證明「所得落於某稅級」或「符合扣抵資格」而不揭露精確金額。
  • 授權式稽核。審計須持有授權檢視金鑰方能解密特定區段;每次存取產生不可竄改稽核記錄。
  • E-invoice anchoring. Invoice hashes are anchored in real time, creating a tamper-evident, auditable supply chain that shrinks evasion and fake-invoice space; line items stay encrypted off-chain.
  • Programmable withholding. Wages, interest and similar income can be withheld automatically at the moment of payment and settled to the treasury.
  • ZK bracket proofs. A taxpayer can prove "income is in bracket X" or "eligible for relief" without revealing the exact amount.
  • Authorized audit. Auditors need an authorized viewing key to decrypt a specific segment; every access leaves an immutable audit record.
幣值與義務分離
稅務義務一律以法幣計價。實際繳納使用受監理的央行數位貨幣 / 法幣穩定幣(eTWD),絕不以波動性網路代幣計價或繳納。這是讓系統在財政上可信的關鍵——詳見第 8 節。
Value and obligation, separated
Tax obligations are always fiat-denominated. Payment uses a regulated CBDC / fiat stablecoin (eTWD) and is never priced or paid in a volatile network token. This is what makes the system fiscally credible — see Section 8.

電子發票開獎 — 以隱私為前提的全民稅務誘因

E-invoice Lottery — a privacy-preserving civic tax incentive

臺灣自 1951 年以「統一發票給獎」鼓勵消費者索取發票、商家誠實開立,把每張發票號碼變成一張彩券,將逃漏稅的監督權交給數百萬消費者。Ferrum 將此制度原生上鏈:每一筆已依本節錨定、由商家本人簽署、且對應一筆真實已結算營業稅的電子發票承諾(invoice_hash)即為一張彩券——毋須另立帳本、毋須揭露個資、毋須持有任何投機代幣。獎金以央行發行、十足準備的 eTWD 給付,價值移轉走 CBDC 軌道,鏈上僅留去識別化的收據承諾與金額。

Since 1951 Taiwan's Uniform-Invoice Lottery (統一發票) has turned every receipt number into a lottery ticket, enlisting millions of consumers to police merchant under-reporting through a prize incentive. Ferrum makes this native to the chain: every e-invoice anchored under this section, signed by the issuing merchant and backed by a real, settled VAT amount — its invoice_hash commitment — is a ticket. No parallel ledger, no PII disclosure, no speculative token to hold. Prizes pay in fully-reserved, central-bank-issued eTWD; the value moves on the CBDC rail and only a PII-free receipt commitment stays on-chain.

錨定發票即隱私彩券。「一發票一票」由三道門共同保證:pallet-tax 強制只有持商家金鑰者可錨定並對同一雜湊去重;pallet-lotteryinvoice_hash 為主鍵不可重複登記;登記時須以零知識證明持有人握有該發票的購買秘密。買方 DID 與發票明細只存在於 ZK 見證中,永不上鏈;每張票以電路推導的一次性 nullifier 防止重複登記。發票錨定的區塊高度(而非可被驗證者影響的時間戳)決定其落入哪一期。

Anchored invoice = privacy ticket. "One invoice = one ticket" rests on three gates: pallet-tax lets only the merchant key-holder anchor and de-duplicates each hash; pallet-lottery keys tickets on invoice_hash so re-registration is rejected; and registration needs a ZK proof of possessing that invoice's purchase secret. The buyer DID and line items live only in the ZK witness — never on-chain — and a circuit-derived one-time nullifier blocks double-entry. The block height at which an invoice was anchored (not a validator-influenceable timestamp) decides its draw period.

可驗證的公開開獎。Ferrum 共識為 Aura + GRANDPA、無原生 VRF,故開獎採承諾—揭示並錨定於 GRANDPA 已最終化的未來區塊雜湊:具保證金的驗證者先提交 H(seed),於嚴格早於最終化區塊的揭示期公開 seed,最終隨機數 R = blake2(⊕seedᵢ ‖ block_hash(B_fin) ‖ draw_id)。如此最後揭示者無法預知 B_fin 雜湊、出塊者無法碾磨;缺席揭示以固定公開後備值代入,且承諾保證金不小於單期可被改向之獎金上限,使「承諾後扣留」嚴格虧損。任何人皆可由公開錨定集、揭示事件與最終化雜湊獨立重算每位中獎者並以 Merkle 證明核對。

A verifiable public draw. Ferrum runs Aura + GRANDPA with no native VRF, so the draw is commit–reveal anchored to a GRANDPA-finalized future block hash: bonded validators post H(seed), reveal during a window that ends strictly before the finalize block, and randomness is R = blake2(⊕seedᵢ ‖ block_hash(B_fin) ‖ draw_id). The last revealer cannot know B_fin's hash and the author cannot grind it; a missing reveal is replaced by a fixed published fallback, and the commit bond is no less than the maximum prize a colluding set could redirect — making commit-then-withhold strictly loss-making. Anyone can recompute every winner from the public anchor set, reveals and finalized hash, checking each via a Merkle proof.

獎池 · eTWD
PrizePool · eTWD

十足準備、不增發、鏈下移轉

Fully reserved, never minted, settled off-chain

獎池為純帳務計數器(FiatAmount),對應央行於 CBDC 軌道既有之 eTWD 準備;鏈上不鑄造、不持有可花用 eTWD 餘額。FER 僅為驗證者保證金,公民永不持有。

The pool is a pure accounting counter (FiatAmount) against eTWD the central bank already holds on the CBDC rail; the chain mints and holds no spendable eTWD. FER is only a validator bond; citizens never hold it.

稅務等比率
Tax-proportional

資金比率 r

Funding ratio r

獎池 = r × 當期經認證之已結算稅收(僅統一發票營業稅),r 為治理參數,並以央行鏈上認證之 eTWD 準備餘額封頂、原子化扣減,不足則結算失敗。

Pool = r × period authenticated settled VAT revenue; r is governed and clamped to — and atomically debited from — the CB's on-chain-attested eTWD reserve, failing closed if insufficient.

分級比例 w[]
Tier split w[]

等比率分配

Equal-ratio distribution

獎池依固定比例向量 w[](Σ=1)分為各獎級,單票設上限;所有不可分配之餘額(溢出與整除餘塵)一律回流準備,不折入受限獎級。

The pool splits across tiers by a fixed proportion vector w[] (Σ=1) with a per-ticket cap; all unspendable residue (overflow and floor-division dust) recycles to reserve, never folded into a capped tier.

領獎與 eTWD 給付。領獎免手續費、可由臨櫃輔助點代送,使無錢包者亦能領獎。中獎人以 ZK 所有權電路證明持有中獎票,並將受款帳戶綁入公開輸入,故複製他人證明也改不了收款人;選擇性揭露的檢視金鑰承諾為電路的已驗證輸出,稽核軌跡不可偽。給付透過 pallet-treasury-fer 記錄一筆去識別化收據,收據鍵為 H(invoice_hash ‖ nullifier),無法將公開中獎雜湊與付款金額交叉連結;真正價值移轉走央行 CBDC 軌道。逾期未領由 sweep_expired 冪等回流主權準備。

Claim & eTWD payout. Claiming is fee-free and relayable by any assisted point-of-service, so winners without a wallet can still claim. The winner proves ownership with a ZK circuit that binds the payout beneficiary as a public input, so a copied proof cannot redirect funds; the selective-disclosure viewing-key commitment is a verified circuit output, making the audit trail unforgeable. Payout records a PII-free receipt via pallet-treasury-fer keyed by H(invoice_hash ‖ nullifier) — never the raw winning hash — so payout amount and winning invoice cannot be cross-linked; the value itself moves on the CBDC rail. Unclaimed prizes recycle to the sovereign reserve idempotently via sweep_expired.

隱私邊界(誠實揭露)。pallet-tax 的錨定集為公開,其商家帳戶與錨定資訊可被讀取;將彩券資格綁定於此公開集,意味中獎收據可被關聯到「哪一商家、何時開立」,長期相關可能洩漏商家層級型態,即使消費者身分隱藏。緩解方式為以 issuer_commitment(治理維護之商家集合根成員)取代明文商家帳戶。「無從推得購買明細」之保證僅及於消費者端,不及於商家側中繼資料。

Privacy boundary (honest disclosure). pallet-tax's anchor set is public, exposing the merchant account and anchoring metadata; binding eligibility to it means a winning receipt can be correlated to "which merchant issued it, and when," potentially leaking merchant-level patterns over time even though the consumer stays hidden. The mitigation is to store an issuer_commitment (membership under a governance-maintained merchant-set root) instead of the plaintext merchant account. The "no purchase detail derivable" guarantee is scoped to the consumer side only — not merchant-side metadata.

參數Parameter型別Type範例Example說明Meaning
tax_ratio (r)u32 ppm2_000 (0.2%)稅收→獎池比率share of tax revenue → pool
tier_split (w[])[u32] ppm[500000,300000,200000]各獎級比例 Σ=1,000,000tier proportions
reserve_capu32 ppm50_000 (5%)單期獎池佔認證 eTWD 準備上限max pool vs attested eTWD reserve
cadenceBlockNumber~2 月~2 months開獎週期(臺灣雙月)draw period
claim_windowBlockNumber~90 天~90 days領獎期限claim deadline
commit_depositBalance (FER)≥ 可改向獎金上限≥ max redirectable prize抽獎承諾保證金(僅驗證者)commit bond (validators only)
不變量
無個資上鏈 · 獎金僅以 eTWD 計價且價值移轉走 CBDC 軌道(絕不以 FER 計價、鏈上不持可花用 eTWD)· 公民毋須持有 FER · 抽獎熵錨定於已最終化區塊且揭示嚴格早於該區塊 · 票之資格須商家簽署且對應真實已結算稅額 · 國內主權功能,無全球彩券、無跨境獎金價值轉移。
Invariants
No PII on-chain · prizes are eTWD-denominated and value moves on the CBDC rail (never priced in FER; no spendable eTWD held on-chain) · citizens never hold FER · draw entropy anchored to a finalized block with reveals strictly before it · a ticket is eligible only if merchant-signed and backed by a real settled tax amount · a domestic sovereign function — no global lottery, no cross-border prize transfer.
07

共識與節點驗證

Consensus & Node Verification

PoSA:受認證驗證者 + 質押問責 + BFT 最終性。

PoSA: accredited validators + staked accountability + BFT finality.

Ferrum 採用 PoSA(Proof of Staked Authority,質押權威證明):出塊權限僅開放給受認證機構,但每個驗證者須質押 FER 作罰沒保證金,最終性由 GRANDPA 提供 BFT 保證。投票權依質押量加權,而是合格驗證者近乎等權,避免資本集中導致權力集中。

Ferrum uses PoSA (Proof of Staked Authority): authoring is open only to accredited institutions, but each validator stakes FER as a slashing bond, and GRANDPA provides BFT finality. Voting power is not stake-weighted — eligible validators are near-equal, so capital concentration does not become power concentration.

交易池Mempoollibp2p gossiplibp2p gossipAura 出塊者Aura author該時槽輪值驗證者Slot-leader validator執行 WASM runtimeRuns WASM runtime其餘驗證者Other validators重新執行並驗證Re-execute & verifyGRANDPA 投票GRANDPA vote≥ ⅔ 預提交≥ ⅔ pre-commits最終確定Finalized不可逆狀態根Irreversible state root罰沒監測:雙重簽章 / 離線 / 審查 → 沒收質押 FERSlashing watch: equivocation / offline / censorship → seize FER
圖 7.1 — PoSA 一個出塊週期:出塊(金)→ 驗證與最終性投票(綠)→ 罰沒監測(紅)。
Fig 7.1 — One PoSA cycle: authoring (gold) → verify & finalize (green) → slashing watch (red).

節點角色

Node roles

角色Role由誰營運Operated by職責Duty質押Stake
驗證者節點Validator央行、稅捐機關、特許銀行、電信、會計師事務所Central bank, tax authority, licensed banks, telcos, audit firms出塊、最終性投票Authoring, finality voting需要Required
全節點Full node政府機關、審計單位、學研機構Agencies, auditors, academia完整驗證、提供查詢Full verification, queriesNo
封存節點Archive node國家檔案 / 監理機關National archive / regulator保存完整歷史狀態Full historical stateNo
輕節點Light client公民錢包Citizen wallets以最終性證明驗證,無需同步全鏈Verify via finality proofsNo

驗證者的加入與移除由鏈上治理控制,並要求組織與地理分散,避免單一部門或地區掌握出塊多數。共識參數以 runtime 常數定義:

Validator admission and removal are governed on-chain, with organizational and geographic diversity required so no single department or region holds an authoring majority. Consensus parameters are runtime constants:

runtime/src/consensus.rsRUST
// PoSA:Aura 出塊 + GRANDPA 最終性,驗證者集合由治理控制
parameter_types! {
    pub const SlotDuration: u64 = 3_000;            // 3 秒一個出塊時槽
    pub const MaxAuthorities: u32 = 100;            // 受認證機構節點上限
    pub const MinValidatorBond: Balance = 250_000 * FER;
    pub const EquivocationSlash: Perbill = Perbill::from_percent(100); // 雙簽:全沒收
    pub const OfflineSlash: Perbill = Perbill::from_percent(1);
}
runtime/src/consensus.rsRUST
// PoSA: Aura authoring + GRANDPA finality; validator set is governed
parameter_types! {
    pub const SlotDuration: u64 = 3_000;            // one 3-second authoring slot
    pub const MaxAuthorities: u32 = 100;            // cap on accredited institutional nodes
    pub const MinValidatorBond: Balance = 250_000 * FER;
    pub const EquivocationSlash: Perbill = Perbill::from_percent(100); // equivocation: full seizure
    pub const OfflineSlash: Perbill = Perbill::from_percent(1);
}
08

代幣金融模型(國內)

Token Model (Domestic)

單一主權鏈內的雙資產設計:非投機網路代幣(FER)+ 法幣計價支付工具(eTWD)。跨國延伸見第 10、11 節。

A dual-asset design within one chain: a non-speculative network token (FER) + a fiat-denominated payment unit (eTWD). Cross-national extension in §10–11.

為身分與稅務系統設計代幣,首要原則是讓公民的義務與權利不暴露於幣價波動。Ferrum 因此採雙資產模型,將「網路安全與治理」和「價值支付」徹底分離:

The first principle for tokenizing an identity and tax system is to keep citizens' duties and rights out of price volatility. Ferrum therefore uses a dual-asset model, cleanly separating "network security & governance" from "value settlement":

FER · 網路代幣
FER · network token

用於安全與治理,不為投機

For security & governance, not speculation

職能:驗證者質押保證金、罕用情境的資源計費、治理投票權。發行由國庫與治理控制,公民日常使用服務完全不需持有 FER

Roles: validator staking bonds, rare-case resource metering, governance votes. Issuance is treasury/governance-controlled; citizens never need to hold FER for everyday services.

eTWD · 支付工具
eTWD · payment unit

1:1 法幣計價的 CBDC / 穩定幣

1:1 fiat-pegged CBDC / stablecoin

用於實際繳稅與價值移轉,由央行發行、足額準備。稅務義務一律以法幣計價,幣值穩定。

Used for actual tax payment and value transfer; central-bank issued and fully reserved. Obligations are fiat-denominated and stable.

FER 創世配置

FER genesis allocation

主權網路由國家控制發行。創世配置以「安全、公共服務、永續維運」為導向,而非以早期投資人回報為導向:

A sovereign network controls its own issuance. Genesis is oriented toward security, public service and sustainable operations — not early-investor returns:

30% 25% 20% 15% 10%
驗證者質押與安全池 30%Validator staking & security pool 30%主權國庫儲備 25%Sovereign treasury reserve 25%公共服務補貼基金 20%Public-service subsidy fund 20%協定開發與維運 15%Protocol dev & maintenance 15%生態整合補助 10%Ecosystem & integration grants 10%
項目Item機制Mechanism說明Notes
發行政策Issuance治理控制的低度通膨Governed low inflation年增約 3% 充作驗證者獎勵;非固定總量,由治理依安全預算調整。~3%/yr for validator rewards; not fixed-supply, tuned by governance to the security budget.
費用模型Fee modelEIP-1559 式基礎費銷毀EIP-1559-style base-fee burn商業性重度用量的基礎費銷毀以對沖通膨,小費歸驗證者。Heavy commercial base fees are burned to offset inflation; tips go to validators.
公民費用Citizen fees補貼基金吸收Absorbed by subsidy fund身分驗證與基本報稅免費,成本由補貼基金支付。Identity checks and basic filing are free, funded by the subsidy pool.
質押獎勵Staking rewards通膨 + 費用分潤Inflation + fee share驗證者依在線率與正確性獲獎勵,違規遭罰沒。Rewarded by uptime and correctness; misbehavior is slashed.
價值取向Value stance非投機效用代幣Non-speculative utilityFER 不以增值為目的;國庫管理準備,治理可鑄/銷以維持安全預算。FER is not meant to appreciate; the treasury manages reserves and governance can mint/burn for the security budget.
為何不用單一代幣
若以單一波動性代幣同時承載稅款與網路費,公民的納稅負擔將隨市場漲跌——財政上不可接受。雙資產模型讓「鏈的安全經濟」與「人民的法定義務」各自獨立運作。
Why not a single token
Carrying both tax and network fees on one volatile token would make tax burdens swing with the market — fiscally unacceptable. The dual-asset model lets the chain's security economy and citizens' legal obligations operate independently.
09

跨境互通架構

Cross-border Interoperability

從單一主權鏈,到一個主權鏈聯邦——身分與稅務跨越國界,而主權不被讓渡。

From one sovereign chain to a federation of them — identity and tax cross borders without ceding sovereignty.

當多國各自部署 Ferrum 實例,價值來自互通:公民憑證能在他國被驗證,跨境交易的稅務能由兩國協調。Ferrum 刻意不採用「單一全球鏈」,而組成主權鏈聯邦——每國保有自己的鏈、貨幣與治理,透過中立互通層連結。設計承襲 Polkadot 的 XCM、Cosmos 的 IBC,以及國際清算銀行多國 CBDC 專案(mBridge、Dunbar)。

When several nations each deploy a Ferrum instance, the value lies in interoperability: a citizen's credential is verifiable abroad, and cross-border tax is coordinated between two states. Ferrum deliberately avoids a "single global chain" and forms a federation of sovereign chains — each keeps its own chain, currency and governance, linked by a neutral interop layer. The design draws on Polkadot's XCM, Cosmos's IBC and the BIS multi-CBDC projects (mBridge, Dunbar).

鐵橋 · 互通結算層Ferrum Bridge · Interop LayerXCM 訊息 · 多邊清算 · XSU 籃子單位XCM · multilateral clearing · XSU unit由參與國央行聯盟營運Run by member central-bank consortium台灣鏈Taiwan chainFER-TW · eTWD日本鏈Japan chainFER-JP · eJPY歐盟鏈EU chainFER-EU · eEUR其他主權鏈Other sovereign chainsFER-XX · eXXX輕客戶端 + GRANDPA 最終性證明Light client + GRANDPA finality proof
圖 9.1 — 主權鏈聯邦:各國鏈保有自有代幣與 CBDC,經中立互通層以信任最小化方式連結。
Fig 9.1 — Sovereign-chain federation: each chain keeps its own token and CBDC, linked trust-minimally via a neutral layer.

跨鏈訊息與信任最小化橋接

Cross-chain messaging & trust-minimized bridging

鏈間以 XCM 式跨共識訊息溝通,橋接不依賴受託保管人:每條鏈在對方鏈上運行一個輕客戶端,直接驗證對方的 GRANDPA 最終性證明後才接受跨鏈訊息。互認的信任根來自密碼學最終性,而非中介機構,大幅降低橋接被攻擊或單點操控的風險。

Chains talk via XCM-style cross-consensus messages; bridging needs no trusted custodian: each chain runs an on-chain light client of the other and verifies its GRANDPA finality proofs before accepting messages. The root of trust is cryptographic finality, not an intermediary — sharply reducing bridge-attack and single-point risk.

跨國身分互認

Cross-border identity recognition

解析
Resolve

跨鏈 DID 解析

Cross-chain DID resolution

did:fer:tw 與 did:fer:jp 透過通用解析器互相解析;識別碼天生帶有來源鏈標記。

did:fer:tw and did:fer:jp resolve via a universal resolver; identifiers carry a source-chain tag by design.

信任註冊表
Trust registry

簽發者互認

Mutual issuer recognition

聯邦維護鏈上信任註冊表,記錄各國受認證簽發者公鑰與互認範圍,依協定授權。

The federation keeps an on-chain trust registry of each nation's accredited issuer keys and recognition scope, authorized by treaty.

ZK 互驗
ZK cross-verify

跨境零知識驗證

Cross-border ZK verification

選擇性揭露證明可在他國鏈上驗證,沿用註冊的驗證金鑰;個資仍不跨境。

Selective-disclosure proofs verify on a foreign chain using registered verification keys; PII never crosses the border.

跨境稅務協調

Cross-border tax coordination

  • 自動資訊交換(AEOI)。承襲 OECD CRS / FATCA,但以零知識與選擇性揭露達成——只交換條約所需最小事實。
  • 雙重課稅減免。鏈上維護租稅協定登記表,合約自動套用稅率與扣抵,跨境所得不被重複課徵。
  • 跨境電子發票互認。各國錨定的發票雜湊可跨鏈驗證,支撐跨境供應鏈勾稽。
  • 跨境消費稅(VAT/GST)。採一站式登記(OSS):跨境數位服務於單一入口申報,稅收依消費地原則經清算聯盟分配。
  • Automatic exchange of information (AEOI). In the spirit of OECD CRS / FATCA, but via ZK and selective disclosure — exchanging only the minimum facts a treaty requires.
  • Double-tax relief. An on-chain tax-treaty registry lets contracts auto-apply rates and credits so cross-border income is not taxed twice.
  • Cross-border e-invoice recognition. Anchored invoice hashes verify across chains, supporting cross-border supply-chain reconciliation.
  • Cross-border VAT/GST. One-Stop-Shop (OSS) registration: cross-border digital services file at a single entry point; revenue is allocated by destination via the clearing union.
隱私不變式(跨境)
跨境互通同樣遵守「個資不跨境」:跨國驗證傳遞的是零知識證明、最終性證明與承諾值,明文個資永遠停留在來源國的鏈下加密庫,僅在授權或條約程序下以檢視金鑰逐筆解密並留稽核軌跡。
Privacy invariant (cross-border)
Cross-border interop keeps "no PII across borders": what travels is ZK proofs, finality proofs and commitments. Plaintext PII stays in the source nation's off-chain vault, decrypted item-by-item only under authorization or treaty process, always leaving an audit trail.
10

跨國代幣金融模型

Cross-national Token Model

三層資產設計:主權不共享投機代幣,跨境以中立籃子單位清算。

A three-tier asset design: no shared speculative token; cross-border clearing in a neutral basket unit.

國內模型(第 8 節)將「網路安全」與「價值支付」分離。跨國再添一道難題:多個主權各有網路代幣與 CBDC,如何在不犧牲主權、也不引入投機性全球幣下清算彼此義務?答案是三層資產模型,並在頂層引入 SDR 式中立籃子單位。

The domestic model (§8) separates network security from value settlement. Cross-national adds a harder question: multiple sovereigns each have their own network token and CBDC — how do they clear mutual obligations without ceding sovereignty or introducing a speculative global coin? The answer is a three-tier asset model topped by an SDR-style neutral basket unit.

第三層 · 互通結算層(中立)Tier 3 · Interop Settlement (neutral)XSU 跨境結算單位(籃子錨定)· 多邊淨額清算聯盟 · 中繼者清算費XSU cross-border unit (basket-pegged) · multilateral clearing union · relayer fees承襲 IMF SDR / Keynes Bancor / BIS mBridgeHeritage: IMF SDR / Keynes Bancor / BIS mBridge第二層 · 國家法定層Tier 2 · National Fiat各國央行數位貨幣 eTWD · eJPY · eEUR …(法幣 1:1 錨定)National CBDCs eTWD · eJPY · eEUR … (1:1 fiat-pegged)國內繳稅與支付 · 跨境最終結算貨幣Domestic tax/payments · cross-border final settlement第一層 · 主權安全層Tier 1 · Sovereign Security各國網路代幣 FER-TW · FER-JP · FER-XX(質押 + 治理,不可跨境橋接)National network tokens FER-TW · FER-JP · FER-XX (stake+govern, non-bridgeable)互通驗證者以本國 FER 作跨鏈罰沒保證金Interop validators post national FER as cross-slash bonds
圖 10.1 — 三層資產模型:安全(底)→ 法定(中)→ 中立清算(頂),三層皆無投機性代幣。
Fig 10.1 — Three-tier model: security (bottom) → fiat (middle) → neutral clearing (top); none of the three is speculative.

XSU · 跨境結算單位

XSU · Cross-border Settlement Unit

XSU 是中立合成記帳單位,定義為一籃參與國 CBDC 的固定權重組合,概念等同「數位化的 IMF 特別提款權(SDR)」,並呼應凱因斯在布列敦森林提出的「Bancor」清算同盟。其職能:

XSU is a neutral synthetic unit of account, defined as a fixed-weight basket of member CBDCs — conceptually a "digital IMF Special Drawing Right (SDR)", echoing Keynes's Bretton-Woods "Bancor" clearing union. Its roles:

  • 中立計價。跨境義務以 XSU 計價,避免任一國貨幣成為事實上的霸權計價單位,降低匯率爭議。
  • 多邊淨額清算。跨境流量先以 XSU 軋差,只就淨部位以各國 CBDC 結算,降低流動性需求與外匯摩擦。
  • 足額準備、非投機。XSU 由 CBDC 準備池1:1 支撐,不自由浮動;籃子權重由聯邦治理定期再平衡。
  • Neutral denomination. Cross-border obligations are priced in XSU, so no single currency becomes a de-facto hegemonic unit, reducing FX disputes.
  • Multilateral netting. Flows net in XSU first; only the net positions settle in CBDCs, cutting liquidity needs and FX friction.
  • Fully reserved, non-speculative. XSU is backed 1:1 by a CBDC reserve pool, does not float freely, and is reweighted periodically by federation governance.

下方為籃子的示意權重(實際權重由參與國依貿易與儲備結構協商):

Below is an illustrative basket (real weights are negotiated by members per trade and reserve structure):

eUSD 40% eEUR 28% eCNY 12% eJPY 8% ·· 12%
美元數位貨幣 40%Digital USD 40%歐元數位貨幣 28%Digital EUR 28%人民幣數位貨幣 12%Digital CNY 12%日圓數位貨幣 8%Digital JPY 8%其他成員 CBDC 12%Other member CBDCs 12%

各層資產的角色與激勵

Roles & incentives by tier

層級Tier資產 / 機制Asset / mechanism跨境角色Cross-border role是否投機Speculative?
主權安全層Sovereign securityFER-{ISO}各鏈質押與治理;互通驗證者跨鏈罰沒保證金Per-chain stake/govern; interop validators' cross-slash bondNo
國家法定層National fiat各國 CBDCNational CBDCs跨境淨額的最終結算貨幣Final settlement of net positions否(法幣錨定)No (fiat)
互通結算層Interop layerXSU 籃子單位XSU basket unit中立計價、多邊淨額清算Neutral denomination & multilateral netting否(籃子錨定)No (basket)
互通結算層Interop layer中繼者清算費Relayer fee跨鏈訊息中繼激勵,以 XSU 或目的地 CBDC 支付Relay incentive paid in XSU or destination CBDCNo
為何不發行單一全球代幣
自由流通的全球加密代幣,會讓各國稅基與財政主權暴露於跨境投機與資本流動衝擊,政治上也難以讓任何主權接受由他者掌控的全球貨幣。三層模型以「主權各持安全代幣 + 法幣 CBDC 結算 + 中立籃子記帳」取而代之——互通的是訊息與淨額,不是投機部位
Why not a single global token
A freely traded global crypto token would expose every nation's tax base and fiscal sovereignty to cross-border speculation and capital-flow shocks, and no sovereign would accept a global currency controlled by others. The three-tier model replaces it with "sovereign security tokens + fiat-CBDC settlement + a neutral basket of account" — what is interoperable is messages and net positions, not speculative exposure.
11

聯邦治理與代幣運作

Federation Governance & Token Operations

互通層的中立性,取決於沒有任何單一主權能片面掌控它。本節說明誰決策、如何決策、決策如何在鏈上自動執行。

The interop layer's neutrality rests on no single sovereign controlling it. This section covers who decides, how, and how decisions execute on-chain.

聯邦治理回答三個問題:誰來決策、如何決策、決策如何在鏈上自動執行。互通層(鐵橋)不屬於任何一國,而由條約理事會共同治理,XSU 籃子與準備池的每一次變動都須通過明確的鏈上門檻,並以時間鎖延遲生效以利各國準備。

Federation governance answers three questions: who decides, how they decide, and how decisions execute automatically on-chain. The interop layer (Ferrum Bridge) belongs to no single nation; it is co-governed by a treaty council. Every change to the XSU basket or reserve pool must clear an explicit on-chain threshold and is delayed by a timelock so members can prepare.

11.1 條約理事會

11.1 The Treaty Council

組成
Composition

一國一席

One seat per nation

每個成員國一席,由其央行或法定代表擔任;另設中立技術秘書處負責草擬與監測,但無投票權

One seat per member, held by its central bank or statutory representative; a neutral technical secretariat drafts and monitors but holds no vote.

職權
Mandate

決策範圍

Scope of decisions

成員准入/除名、籃子權重、費率、互通驗證者集合、參數升級、爭議仲裁,皆由理事會表決。

Membership, basket weights, fees, the interop validator set, parameter upgrades and dispute arbitration are all decided by council vote.

驗證者
Validators

互通層出塊與清算

Interop authoring & clearing

互通驗證者由理事會核准名單,並以本國 FER 質押作跨鏈罰沒保證金;偽造中繼、審查或雙簽將遭沒收並複審。

Interop validators are an approved list; they post national FER as a cross-slashable bond — false relays, censorship or equivocation are slashed and reviewed.

11.2 雙重多數表決

11.2 Dual-Majority Voting

一般提案通過,須同時滿足兩個維度:(a)成員數達門檻(主權平等),且(b)贊成方合計 XSU 籃子權重達門檻(經濟份量)。如此防止小國集團與大國霸權兩種極端,承襲歐盟「雙重多數」與 IMF 加權表決的折衷。憲制級變更(籃子重新定義、條約修訂)需近乎一致;任一成員可對「直接影響其主權」的議案啟動限時緊急煞車觸發複審,但不得無限期阻撓。

A normal proposal passes only if it clears both axes: (a) a threshold share of members (sovereign equality), and (b) a threshold share of XSU basket weight among the Aye voters (economic weight). This blocks both small-bloc capture and large-state dominance, echoing the EU's "double majority" and the IMF's weighted vote. Constitutional changes (basket redefinition, treaty amendment) need near-unanimity; any member may trigger a time-boxed emergency brake for matters directly affecting its sovereignty, forcing review but not allowing indefinite obstruction.

提案Propose理事會成員Council member理事會審議Deliberate秘書處技術報告Secretariat report雙重多數表決Dual-majority成員數 + 籃子權重members + weight時間鎖佇列Timelock依領域 7–30 天7–30 d by domain鏈上生效EnactWASM 升級WASM upgrade緊急煞車:受影響成員可限時保留 → 複審Emergency brake: affected member holds → review
圖 11.1 — 聯邦治理流程:提案 → 審議 → 雙重多數 → 時間鎖 → 生效;緊急煞車為旁路複審。
Fig 11.1 — Governance pipeline: propose → deliberate → dual-majority → timelock → enact; the emergency brake is a side review path.
治理領域Domain門檻Threshold生效方式Enactment
參數調整(費率、時槽)Parameter change (fees, slots)雙重多數 ⅔Dual-majority ⅔時間鎖 7 天後生效7-day timelock
成員准入 / 除名Member admission / removal雙重多數 ¾Dual-majority ¾時間鎖 30 天30-day timelock
籃子權重再平衡Basket reweighting雙重多數 ⅔ + 秘書處技術報告Dual-majority ⅔ + secretariat report公告期 + 漸進過渡Notice + gradual transition
籃子重新定義 / 條約修訂Basket redefinition / treaty amendment近乎一致 ≥ 85%Near-unanimity ≥ 85%各國國內批准後生效Effective after domestic ratification
緊急安全升級Emergency security upgrade技術委員會 + 事後追認Tech committee + post-ratify即時,須 14 天內追認Immediate; ratify within 14 d
爭議仲裁 / 成員停權Dispute / member suspension雙重多數 ¾(當事國迴避)Dual-majority ¾ (party recused)裁決即時,可上訴Immediate, appealable

雙重多數的判定可直接以一個純函式表達,供 pallet-federation 在表決結束時呼叫:

The dual-majority test is a pure function that pallet-federation calls when a vote closes:

pallets/federation/src/voting.rsRUST
// pallets/federation/src/voting.rs
// 雙重多數:必須同時通過「成員數」與「籃子權重」兩個維度。
pub fn passes_dual_majority(
    votes: &BTreeMap<MemberId, Vote>,
    basket: &BTreeMap<MemberId, Perbill>,   // 各成員 XSU 籃子權重
    threshold: Perbill,                       // 例:from_rational(2u32, 3u32)
) -> bool {
    let total = votes.len() as u32;
    let ayes = votes.values().filter(|v| **v == Vote::Aye).count() as u32;

    // 維度一:贊成的成員數比例
    let by_count = Perbill::from_rational(ayes, total.max(1)) >= threshold;

    // 維度二:贊成方的籃子權重總和
    let ayes_weight = votes.iter()
        .filter(|(_, v)| **v == Vote::Aye)
        .map(|(m, _)| *basket.get(m).unwrap_or(&Perbill::zero()))
        .fold(Perbill::zero(), |a, w| a.saturating_add(w));
    let by_weight = ayes_weight >= threshold;

    by_count && by_weight   // 兩維度皆須成立
}
pallets/federation/src/voting.rsRUST
// pallets/federation/src/voting.rs
// Dual majority: must pass BOTH the "member count" and "basket weight" axes.
pub fn passes_dual_majority(
    votes: &BTreeMap<MemberId, Vote>,
    basket: &BTreeMap<MemberId, Perbill>,   // each member's XSU basket weight
    threshold: Perbill,                       // e.g. from_rational(2u32, 3u32)
) -> bool {
    let total = votes.len() as u32;
    let ayes = votes.values().filter(|v| **v == Vote::Aye).count() as u32;

    // Axis 1: share of members voting Aye
    let by_count = Perbill::from_rational(ayes, total.max(1)) >= threshold;

    // Axis 2: summed basket weight of Aye voters
    let ayes_weight = votes.iter()
        .filter(|(_, v)| **v == Vote::Aye)
        .map(|(m, _)| *basket.get(m).unwrap_or(&Perbill::zero()))
        .fold(Perbill::zero(), |a, w| a.saturating_add(w));
    let by_weight = ayes_weight >= threshold;

    by_count && by_weight   // both axes must hold
}

11.3 XSU 籃子與準備池運作

11.3 XSU Basket & Reserve-Pool Operations

  • 足額擔保。每個成員依籃子權重向準備池存入等值 CBDC,作為 XSU 的 1:1 擔保。
  • 鑄造 / 贖回。成員可用一籃 CBDC 按當前權重鑄造 XSU,或銷毀 XSU 贖回 CBDC;準備池始終足額。
  • 多邊清算。跨境流量先以 XSU 記帳軋差,清算窗口結束時只就淨部位從準備池或雙邊 CBDC 結算。
  • 再平衡。秘書處定期(如每 3 年或觸發門檻)提出新權重,經雙重多數核准後以漸進過渡實施,避免市場衝擊。
  • 儲備證明。準備池每日發布鏈上儲備證明(proof-of-reserves),公開可稽。
  • Full backing. Each member deposits CBDC into the reserve pool per its basket weight, backing XSU 1:1.
  • Mint / redeem. A member mints XSU with a basket of CBDCs at current weights, or burns XSU to redeem CBDCs; the pool stays fully reserved.
  • Multilateral clearing. Flows are booked and netted in XSU; at window close, only net positions settle from the pool or bilateral CBDCs.
  • Reweighting. The secretariat periodically (e.g. every 3 years or on a trigger) proposes new weights; once dual-majority-approved, they phase in gradually to avoid market shock.
  • Proof of reserves. The pool publishes a daily on-chain proof-of-reserves, publicly auditable.

11.4 鏈上實作:pallet-federation

11.4 On-chain Implementation: pallet-federation

治理流程為:propose → 理事會表決(記錄各成員票與其籃子權重)→ 雙重多數判定 → 時間鎖佇列 → enact(必要時觸發 WASM runtime 無分叉升級)。不同領域套用不同時間鎖長度,憲制級變更另需各國國內批准。

The flow is: propose → council vote (recording each member's ballot and basket weight) → dual-majority test → timelock queue → enact (triggering a forkless WASM upgrade where needed). Different domains use different timelock lengths; constitutional changes additionally require domestic ratification.

pallets/federation/src/lib.rsRUST
#[pallet::call]
impl<T: Config> Pallet<T> {
    // 任一理事會成員提出聯邦層提案(費率、籃子權重、成員資格…)。
    pub fn propose(origin: OriginFor<T>, action: FederationAction) -> DispatchResult {
        let who = T::CouncilMember::ensure_origin(origin)?;
        let id = NextId::<T>::mutate(|n| { let i = *n; *n += 1; i });
        Proposals::<T>::insert(id, Proposal::new(action, now::<T>()));
        Self::deposit_event(Event::Proposed { id, by: who });
        Ok(())
    }

    // 達雙重多數後進入時間鎖佇列;不同領域套用不同時間鎖。
    pub fn close(origin: OriginFor<T>, id: ProposalId) -> DispatchResult {
        ensure_signed(origin)?;
        let p = Proposals::<T>::get(id).ok_or(Error::<T>::Unknown)?;
        ensure!(
            passes_dual_majority(&p.votes, &BasketWeights::<T>::get(), p.threshold()),
            Error::<T>::Rejected
        );
        let eta = now::<T>() + T::TimelockFor::get(&p.action);
        Queued::<T>::insert(eta, id);              // on_initialize 到期自動 enact
        Self::deposit_event(Event::Queued { id, eta });
        Ok(())
    }
}
pallets/federation/src/lib.rsRUST
#[pallet::call]
impl<T: Config> Pallet<T> {
    // Any council member proposes a federation action (fees, basket weights, membership…).
    pub fn propose(origin: OriginFor<T>, action: FederationAction) -> DispatchResult {
        let who = T::CouncilMember::ensure_origin(origin)?;
        let id = NextId::<T>::mutate(|n| { let i = *n; *n += 1; i });
        Proposals::<T>::insert(id, Proposal::new(action, now::<T>()));
        Self::deposit_event(Event::Proposed { id, by: who });
        Ok(())
    }

    // On dual majority, queue under a timelock; each domain has its own timelock.
    pub fn close(origin: OriginFor<T>, id: ProposalId) -> DispatchResult {
        ensure_signed(origin)?;
        let p = Proposals::<T>::get(id).ok_or(Error::<T>::Unknown)?;
        ensure!(
            passes_dual_majority(&p.votes, &BasketWeights::<T>::get(), p.threshold()),
            Error::<T>::Rejected
        );
        let eta = now::<T>() + T::TimelockFor::get(&p.action);
        Queued::<T>::insert(eta, id);              // on_initialize auto-enacts at eta
        Self::deposit_event(Event::Queued { id, eta });
        Ok(())
    }
}

11.5 透明與爭議

11.5 Transparency & Disputes

所有提案、票數、權重變更與儲備證明皆上鏈公開可稽。爭議以鏈上爭議登記表記錄,依條約仲裁;理事會可暫停成員的出塊與清算權,但保留其準備金的請求權,確保停權不等於沒收。

All proposals, tallies, weight changes and reserve proofs are public and auditable on-chain. Disputes are recorded in an on-chain dispute registry and arbitrated per treaty; the council may suspend a member's authoring and clearing rights while preserving its claim on reserves — so suspension is never confiscation.

中立性如何被保障
沒有任何單一主權能片面變更籃子、費率或成員資格:每項變更都需跨越「成員數」與「籃子權重」雙門檻,並經時間鎖延遲與公開稽核。秘書處掌技術、不掌票;緊急程序須事後追認。權力分散寫進了表決規則本身。
How neutrality is guaranteed
No single sovereign can unilaterally change the basket, fees or membership: every change must clear both the member-count and basket-weight thresholds, then a timelock and public audit. The secretariat holds expertise, not votes; emergency actions require post-hoc ratification. Power dispersion is written into the voting rule itself.
12

詳細驗證流程

Detailed Verification Flows

五條端到端流程:身分簽發、選擇性揭露、稅務申報、區塊最終性,以及跨境互認。

Five end-to-end flows: issuance, selective disclosure, tax filing, block finality, and cross-border recognition.

流程 A · 公民身分註冊與 DID 簽發

Flow A · Citizen registration & DID issuance

1

臨櫃或遠端身分核驗

On-site or remote identity check

公民於戶政或受認證 KYC 機構,以證件 + 生物特徵完成首次核驗。

The citizen completes first verification with documents + biometrics at a registry or accredited KYC institution.

線下 / 機構端Offline / institution
2

裝置端生成金鑰與 DID

On-device key & DID generation

裝置在安全晶片內生成 sr25519 金鑰對,推導 did:fer;私鑰永不離開裝置。

The device generates an sr25519 keypair in its secure element and derives a did:fer; the private key never leaves the device.

公民裝置Citizen device
3

簽發可驗證憑證

Issue verifiable credential

機構簽署 VC(國籍、年齡、稅籍等),經加密通道交付公民錢包。

The institution signs a VC (nationality, age, tax status…) and delivers it to the wallet over an encrypted channel.

簽發者Issuer
4

鏈上錨定承諾

Anchor commitment on-chain

只將 DID 文件雜湊與撤銷狀態承諾上鏈;個資保留於鏈下加密庫。

Only the DID document hash and revocation-status commitment go on-chain; PII stays in the off-chain vault.

L3 RuntimeL3 Runtime

流程 B · 選擇性揭露驗證(如:證明已成年)

Flow B · Selective disclosure (e.g. prove of age)

1

驗證者發出出示請求

Verifier sends a presentation request

服務方僅請求「年齡 ≥ 18」這一述詞,而非完整證件。

The service requests only the predicate "age ≥ 18", not the full document.

驗證者Verifier
2

錢包生成零知識證明

Wallet builds a ZK proof

錢包以 BBS+/Groth16 從 VC 推導證明,僅輸出述詞為真的證據與一次性 nullifier。

The wallet derives a BBS+/Groth16 proof from the VC, outputting only evidence that the predicate holds plus a one-time nullifier.

公民裝置Citizen device
3

驗證證明與撤銷狀態

Verify proof & revocation

驗證者以簽發者公鑰核對證明,並查詢鏈上撤銷累加器確認憑證有效。

The verifier checks the proof against the issuer key and queries the on-chain revocation accumulator.

驗證者 + L3Verifier + L3
4

記錄為承諾

Log as commitment

驗證事件以承諾值留存,過程中零個資傳輸。

The event is stored as a commitment; zero PII is transmitted.

L4 PalletL4 Pallet

流程 C · 稅務申報與繳納

Flow C · Tax filing & payment

1

資料彙整與發票錨定

Aggregate data & anchor invoices

所得與交易資料於鏈下加密彙整,電子發票雜湊即時上鏈。

Income and transaction data are aggregated encrypted off-chain; e-invoice hashes are anchored in real time.

機關 / 商家Agency / merchant
2

稅務引擎計算

Tax engine computes

合約依錨定資料計算應納稅額,或生成稅級零知識證明。

The contract computes liability from anchored data, or produces a ZK bracket proof.

pallet-taxpallet-tax
3

公民複核並簽署

Citizen reviews & signs

公民在錢包檢視預填稅單,以私鑰簽署確認。

The citizen reviews the pre-filled return in the wallet and signs.

公民裝置Citizen device
4

以 eTWD 繳納並開立鏈上收據

Pay in eTWD, issue on-chain receipt

稅款以 CBDC 結算入國庫;鏈上留存收據承諾,審計可憑檢視金鑰核對。

Tax settles to the treasury in CBDC; a receipt commitment is stored, auditable with a viewing key.

國庫 + L3Treasury + L3

流程 D · 區塊共識與最終性

Flow D · Block consensus & finality

1

交易進入交易池

Tx enters the mempool

已簽交易經 libp2p gossip 散播至各節點。

Signed transactions propagate to nodes via libp2p gossip.

L1 網路L1 network
2

輪值出塊者打包

Slot leader builds a block

該時槽的 Aura 驗證者執行 WASM runtime、打包並廣播候選區塊。

The slot's Aura validator runs the WASM runtime, builds and broadcasts a candidate block.

L2 出塊L2 authoring
3

其餘驗證者重新執行

Others re-execute

其他驗證者獨立重執行交易、驗證狀態轉換正確。

Other validators independently re-execute and verify the state transition.

L2 驗證L2 verify
4

GRANDPA 最終確定

GRANDPA finalizes

達 ⅔ 以上預提交後最終確定,狀態根不可逆;罰沒監測持續偵測雙簽。

After ≥ ⅔ pre-commits the block is final and irreversible; slashing watch keeps detecting equivocation.

L2 最終性L2 finality

流程 E · 跨境身分與稅務互認

Flow E · Cross-border identity & tax recognition

1

持本國憑證至他國服務

Use a home credential abroad

公民以本國錢包中的 VC 向他國服務發起出示;收到僅含必要述詞的請求。

The citizen presents a home-chain VC to a foreign service and receives a minimal-predicate request.

公民裝置Citizen device
2

生成 ZK 證明與最終性證明

Build ZK + finality proofs

錢包產生選擇性揭露 ZK 證明,並附上來源鏈的 GRANDPA 最終性證明。

The wallet builds a selective-disclosure ZK proof plus the source chain's GRANDPA finality proof.

公民裝置Citizen device
3

目的地鏈以輕客戶端驗證

Destination verifies via light client

目的地鏈用內建輕客戶端驗證來源鏈最終性,並查信任註冊表確認簽發者互認;全程零個資跨境。

The destination chain verifies source finality with its built-in light client and checks the trust registry; zero PII crosses the border.

目的地鏈 + 互通層Destination + interop
4

跨境稅務以 XSU 清算

Cross-border tax clears in XSU

依鏈上租稅協定登記表套用協定稅率,以 XSU 計價、經清算聯盟多邊軋差,僅就淨額結算入各自 CBDC。

Treaty rates from the on-chain registry apply; amounts are priced in XSU, netted by the clearing union, and only net positions settle into each CBDC.

互通結算層Interop layer
13

安全與隱私

Security & Privacy

從語言層的記憶體安全,到密碼學層的最小揭露。

From language-level memory safety to cryptographic minimal disclosure.

語言層
Language

Rust 記憶體安全

Rust memory safety

所有權與借用檢查在編譯期消除緩衝區溢位、釋放後使用與資料競爭——C/C++ 系統最常見的高危漏洞類別。

Ownership and borrow checking eliminate buffer overflows, use-after-free and data races at compile time — the highest-risk bug classes in C/C++ systems.

資料層
Data

個資鏈下、承諾上鏈

PII off-chain, commitments on-chain

明文 PII 加密儲存於鏈下,鏈上僅承諾值;兼顧不可竄改性與被遺忘權。

Plaintext PII is encrypted off-chain; only commitments are on-chain — balancing immutability with the right to be forgotten.

存取層
Access

檢視金鑰與稽核軌跡

Viewing keys & audit trail

解密需授權檢視金鑰,每次存取產生不可竄改稽核記錄;無單一角色能全知。

Decryption needs an authorized viewing key; each access leaves an immutable record — no role is omniscient.

金鑰層
Keys

門檻式社會回復

Threshold social recovery

以 Shamir/MPC 結合機構與親屬監護人回復金鑰,系統不託管私鑰。

Shamir/MPC combine institutional and family guardians to recover keys; the system never custodies private keys.

驗證層
Assurance

關鍵 pallet 形式化驗證

Formal verification

身分、稅務、國庫、聯邦等關鍵模組導入形式化驗證、外部稽核與漏洞獎勵。

Identity, tax, treasury and federation modules undergo formal verification, external audit and bug bounties.

未來層
Future

後量子遷移路徑

Post-quantum path

預留 Dilithium/Kyber 等後量子演算法的金鑰與簽章遷移,於路線圖階段四執行。

A migration path to post-quantum algorithms (Dilithium/Kyber) is reserved for roadmap phase 4.

14

國內治理機制

Domestic Governance

鏈上治理,但受憲政層約束。(跨國治理見第 11 節)

On-chain governance, bounded by a constitutional layer. (Federation governance is in §11.)

Ferrum 的國內治理在「鏈上效率」與「憲政正當性」之間取得平衡。技術參數與驗證者集合可由鏈上提案與表決調整,但其權限邊界由憲政層(法律授權的機關與監督機制)界定,確保技術治理不逾越民主授權。

Domestic governance balances on-chain efficiency with constitutional legitimacy. Technical parameters and the validator set can be adjusted by on-chain proposal and vote, but the bounds of that authority are set by a constitutional layer (legally mandated bodies and oversight), so technical governance never exceeds its democratic mandate.

  • 驗證者准入。新增或移除驗證者須經鏈上治理通過,並符合組織/地理分散要求。
  • 無分叉升級。runtime 以 WASM 升級,經治理批准後全網一致切換,無需硬分叉。
  • 透明度要求。提案、表決與參數變更公開可稽;緊急程序須事後公開究責。
  • 技術委員會。負責安全升級的快速通道,但行動受監督並可被推翻。
  • Validator admission. Adding or removing validators requires on-chain approval and must satisfy organizational/geographic diversity.
  • Forkless upgrades. The runtime upgrades as WASM, switching network-wide after approval without a hard fork.
  • Transparency. Proposals, votes and parameter changes are public; emergency procedures are accountable after the fact.
  • Technical committee. A fast track for security upgrades, under oversight and overridable.
15

發展路線圖

Roadmap

從規格與形式化模型,到聯邦清算與後量子互通。

From specs and formal models to federation clearing and post-quantum interop.

階段 0 · 規格Phase 0 · Spec

規格與形式化模型

Specs & formal models

定義 did:fer 方法、pallet 介面、威脅模型與形式化規格;啟動內部 devnet。

Define the did:fer method, pallet interfaces, threat model and formal specs; launch an internal devnet.

階段 1 · 身分試點Phase 1 · Identity pilot

許可制測試網 + 身分 MVP

Permissioned testnet + identity MVP

邀集試點機關,上線 DID 簽發、可驗證憑證與選擇性揭露。

Onboard pilot agencies; ship DID issuance, VCs and selective disclosure.

階段 2 · 稅務試點Phase 2 · Tax pilot

稅務引擎與電子發票錨定

Tax engine & e-invoice anchoring

導入發票錨定、預扣與零知識稅級證明,與既有稅政系統介接。

Add invoice anchoring, withholding and ZK bracket proofs; integrate existing tax systems.

階段 3 · 主網Phase 3 · Mainnet

央行數位貨幣整合 · 許可制主網

CBDC integration · permissioned mainnet

整合 eTWD 結算,正式上線許可制主網,推廣公民輕節點錢包。

Integrate eTWD settlement, launch the permissioned mainnet, roll out citizen light-client wallets.

階段 4 · 聯邦Phase 4 · Federation

跨境互通 · 聯邦清算 · 後量子

Cross-border interop · federation clearing · PQ

建立主權鏈聯邦:輕客戶端橋接、信任註冊表、XSU 籃子與多邊清算聯盟上線,並遷移後量子演算法。

Stand up the federation: light-client bridges, trust registries, the XSU basket and the multilateral clearing union; migrate to post-quantum crypto.

16

風險與限制

Risks & Limitations

誠實面對這套設計的代價與未解難題。

An honest account of this design's costs and open problems.

  • 中心化張力。許可制換取問責與監理相容,但本質上比無許可鏈集中。緩解:多機構、地理分散、公開狀態根與開放節點,但無法完全消除。
  • 隱私 vs. 可稽核的拉鋸。授權檢視金鑰雖留稽核軌跡,但「誰能授權、在什麼門檻下」是法律與制度問題,技術只能約束、不能取代民主監督。
  • 金鑰遺失與包容性。社會化回復降低風險,但弱勢與數位落差族群仍需可靠的線下代理據點。
  • 法制與憲政對齊。本系統須與個資法、稅捐稽徵法及憲法保障相容,任何部署前都需完整法律審查。
  • 跨境主權協調成本。聯邦治理、租稅協定數位化與成員准入皆需多邊協商,政治與外交複雜度高,進度受國際關係牽動。
  • 籃子治理與匯率風險。XSU 籃子權重與準備池管理須有中立機構與明確再平衡規則,否則可能引發成員國對計價公平性的爭議。
  • 跨境法遵分歧。各國個資與稅法標準不一,跨境最小揭露與資訊交換的法律基礎需逐一對齊,難以一體適用。
  • 本文件性質。這是一份概念性技術設計,非可直接上線的實作。任何實際部署都必須經過獨立安全稽核、形式化驗證、法律審查與分階段試點。
  • Centralization tension. Permissioning buys accountability and regulatory fit but is inherently more centralized. Mitigated by multi-institution dispersion, public state roots and open nodes — not eliminated.
  • Privacy vs. auditability. Viewing keys leave a trail, but "who may authorize, under what threshold" is a legal-institutional question; technology can constrain, not replace, democratic oversight.
  • Key loss & inclusion. Social recovery reduces risk, but vulnerable and less-connected groups still need reliable offline points of service.
  • Legal & constitutional alignment. The system must fit data-protection law, tax law and constitutional guarantees; any deployment needs full legal review.
  • Cross-border coordination cost. Federation governance, digitizing treaties and admitting members all require multilateral negotiation — politically and diplomatically complex, paced by international relations.
  • Basket governance & FX risk. XSU weights and reserve management need a neutral body and clear reweighting rules, or members may dispute the fairness of denomination.
  • Cross-border compliance divergence. Data and tax standards differ by country; the legal basis for cross-border minimal disclosure and information exchange must be aligned case by case.
  • Nature of this document. This is a conceptual design, not a deployable implementation. Any real deployment requires independent security audit, formal verification, legal review and staged pilots.