Status: NORMATIVE companion to Chapter 10. This appendix renders the three
core Nexus Mobile Wallet (NMW) operations as ASCII sequence/flow diagrams with
numbered step legends. It is descriptive of Chapter 10 (Mobile Interface) and
Chapter 8 (Account Abstraction) as currently specified; where a value is a
recommendation awaiting an ADR-0005 counter-sign, it is labelled inline.
All parameters trace to CONSTANTS.md and DECISIONS-pending-ratification.md.
Custody-model reminder (current spec). The Desktop Node self-custodies both assets in software at genesis — an AEV key (ML-DSA-44) and a BND key (ML-DSA-65) in a hardware-sealed keystore — and the air-gapped Arca is the recommended upgrade for BND custody, not required (§10.5.1, §10.5.4, Axiom 1). Every flow below therefore works with either a Desktop Node or an Arca as the sovereign issuer; the diagrams name "Arca / Desktop" wherever the sovereign device acts.
Key/authority legend used throughout.
| Symbol | Meaning |
|---|---|
| Sovereign device | Arca (air-gapped) or Desktop Node — the SAT/PAT issuer |
| ML-DSA-65 | Root custody signer (NIST Level 3) — BND settlement, FCRC. Never on the NMW |
| ML-DSA-44 (delegation) | Arca/Desktop delegated capability that signs SATs/PATs for the Aevum-side NMW. Distinct key from the ML-DSA-65 custody root; carries no BND authority (recommended; pending ADR-0005 ratification — CONSTANTS sig.arca / [R9]) |
| Attestation key | Hardware-backed, non-exportable device keypair in the phone's secure element (iOS Secure Enclave / Android StrongBox). Classical P-256 — no spend authority, off the consensus path (§10.1.2) |
| SAT | Session Auth Token — CBOR+zstd, ML-DSA-44-signed bounded authorization, ~3 KB (§10.3.1) |
| MA | Mobile Allowance — the contract-bounded spend zone of the PartFund (Extension 0x01, §10.2) |
→ sync/local step ⇢ animated-QR (ADQ) or camera hop ⇒ on-chain UserOp |
A05.1. Flow 1 — Registration & Device Binding
Registration provisions a new phone: the NMW mints a hardware attestation keypair, the sovereign device pins its public half into a device profile, and a first SAT is issued over Animated Dynamic QR (ADQ-SAT). No private key material ever crosses the air gap — only public keys and the signed SAT travel by QR.
NMW (smartphone) Sovereign device Aevum ESC
Secure Enclave/StrongBox (Arca / Desktop) (PartFund 0x01)
──────────────────── ─────────────────── ───────────────
│ │ │
(1) │ generate NON-EXPORTABLE │ │
│ attestation keypair in SE │ │
│ (private half never leaves │ │
│ hardware) │ │
│ │ │
(2) │ device_id = │ │
│ SHA3-256(attest_pubkey ∥ │ │
│ platform_attest) │ │
│ │ │
(3) │ ── Registration QR ──────⇢ │ │
│ {device_id, attest_pubkey, │ │
│ platform attestation} │ │
│ │ │
│ (4) │ verify platform attestation │
│ │ (Android HW Attestation / │
│ │ iOS DeviceCheck) │
│ │ │
│ (5) │ slot check: registered │
│ │ devices < 5 ? else free a │
│ │ slot via revokeDevice │
│ │ │
│ (6) │ create device profile: │
│ │ pin attest_pubkey; set MA │
│ │ params (cap, timeout, │
│ │ tx_limit, whitelist, │
│ │ geofence, auto_renewal) │
│ │ │
│ (7) │ sign SAT with ML-DSA-44 │
│ │ (delegation key): │
│ │ valid_until = issue_height │
│ │ + ⌈timeout_s / 5⌉ │
│ │ (aevum.block_time = 5 s) │
│ │ │
│ ⇠── ADQ-SAT animation ──── │ │
(8) │ UR 2.0 ur:nmw-sat, ~15-18 │ │
│ frames @10 FPS, ~1.5-2 s │ │
│ (rear camera scan) │ │
│ │ │
(9) │ reconstruct + verify │ │
│ SHA3-256 checksum │ │
│ │ │
(10) │ encrypt SAT at rest: │ │
│ Argon2id(PIN, salt) → │ │
│ key; store in Keychain / │ │
│ StrongBox │ │
│ │ │
(11) │ ── acknowledge QR ───────⇢ │ │
│ (12) │ log active allowance; │
│ │ (setAllowance already │
│ │ on-chain, or issued now) ─⇒ │ (13) profile +
│ │ │ attest_pubkey
│ │ │ registered;
│ │ │ MA armed
▼ ▼ ▼
Step legend — Flow 1.
- The NMW generates a hardware-backed, non-exportable device-attestation keypair inside the platform secure element (iOS Secure Enclave / Android StrongBox). This is the only private key the phone ever holds; its private half never leaves hardware and it confers no spend authority (§10.1.2).
- The NMW derives
device_id = SHA3-256(attestation_pubkey ∥ platform_attestation). The IMEI is deliberately not used — it is unreadable to consumer apps on modern iOS/Android (§10.3.1). - The NMW emits a static Registration QR carrying
device_id, the attestation public key, and the platform attestation identifier. Only public material crosses the gap. - The sovereign device (Arca or Desktop) scans and verifies the platform attestation chain (Android Hardware Attestation / iOS DeviceCheck) to confirm the key truly lives in genuine secure hardware.
- Slot check: the PartFund permits a maximum of 5 concurrently registered
NMW devices per wallet (§10.5.2). Registering a 6th requires first freeing a
slot with
revokeDevice(§10.2.4). - The sovereign device creates a device profile pinning the attestation
public key, and sets the Mobile Allowance parameters —
cap,timeout(1 hour – 30 days),tx_limit, optionalwhitelist, optionalgeofence,auto_renewal(§10.2.2). All MA parameters are set exclusively by the sovereign key and are immutable from the NMW side. - The sovereign device signs the SAT with its ML-DSA-44 delegation key
(recommended; pending ADR-0005 ratification — [R9]).
valid_untilis a block height derived from the wall-clocktimeoutat the canonical Aevum block time of 5 s:valid_until = issue_height + ⌈timeout_seconds / 5⌉(§10.3.1; CONSTANTSaevum.block_time). The SAT'sissuer_pubkey_hash = SHA3-256(ML-DSA-44 delegation pubkey)references this delegation key, not the ML-DSA-65 custody root. - The SAT is serialized (CBOR + zstd, ~3 KB) and streamed as an ADQ-SAT
animation over the UR 2.0 type
ur:nmw-sat: Fountain (LT) codes with 10% redundancy, ~200-byte frames (QR v15, ECC-M), ~15–18 frames at 10 FPS, ~1.5–2 s, tolerating up to 30% frame loss (§10.3.2). The NMW scans it with the rear camera. - The NMW reconstructs the payload and verifies the SHA3-256 checksum before accepting it.
- The NMW encrypts the SAT at rest under an Argon2id-derived key (memory 64 MB, iterations 3, parallelism 4) from the user's Master PIN plus an install-unique salt, and stores the ciphertext in iOS Keychain / Android StrongBox (§10.1.2, §10.4.2).
- The NMW displays an acknowledge QR; the sovereign device scans it to confirm the SAT landed.
- The sovereign device logs the active allowance. The corresponding on-chain
setAllowance(...)(sovereign-key-signed) arms the MA in the PartFund (§10.2.4). - On-chain end state: the device profile and its attestation public key are registered, and the MA is armed and spendable within its configured bounds.
Derived-figure note (valid_until). For a 24-hour cycle,
timeout_seconds = 86,400, so ⌈86,400 / 5⌉ = 17,280 blocks and
valid_until = issue_height + 17,280. The two extremes of the permitted
timeout range give ⌈3,600/5⌉ = 720 blocks (1-hour floor) and
⌈2,592,000/5⌉ = 518,400 blocks (30-day ceiling). These follow directly from
aevum.block_time = 5 s; the concrete issue_height is only known at signing
time.
A05.2. Flow 2 — POS Payment (QR Nonce + SAT + Paymaster)
A point-of-sale payment composes three independent authorizations: the terminal-signed QR nonce (physical-presence proof, §8.7.1), the SAT (sovereign-delegated bounded spend authority, §10.3), and the merchant Paymaster (gas sponsorship, §8.6). The customer pays zero gas; the merchant absorbs the micro-gas. The per-operation device-attestation signature binds the submission to the registered phone off-chain.
POS terminal NMW (phone) Bundler Merchant Paymaster EntryPoint / PartFund
(sk_terminal SE) (permissionless) (validatePaymasterOp) (0x01, on-chain)
─────────── ─────────── ───────── ────────────────── ─────────────────────
│ │ │ │ │
(1) │ token = tid ∥ │ │ │ │
│ amount ∥ nonce │ │ │ │
│ ∥ timestamp │ │ │ │
│ σ_t = ML-DSA-44 │ │ │ │
│ .Sign(sk_term, │ │ │ │
│ token) │ │ │ │
│ ── payment QR ⇢│ │ │ │
│ {tid,amount, │ │ │ │
│ nonce,ts,σ_t,│ │ │ │
│ merchant, │ │ │ │
│ paymaster} │ │ │ │
│ │ │ │ │
│ (2) │ auth by matrix: │ │ │
│ │ biometric if │ │ │
│ │ ≤10% tx_limit; │ │ │
│ │ +PIN if >10%; │ │ │
│ │ +PAT if > custom│ │ │
│ │ threshold │ │ │
│ │ │ │ │
│ (3) │ decrypt SAT │ │ │
│ │ (Argon2id key) │ │ │
│ │ │ │ │
│ (4) │ attest_sig = │ │ │
│ │ SE.sign(nonce, │ │ │
│ │ dest, amount) │ │ │
│ │ (P-256, off │ │ │
│ │ consensus) │ │ │
│ │ │ │ │
│ (5) │ build UserOp: │ │ │
│ │ calldata = │ │ │
│ │ spendAllowance(│ │ │
│ │ dest, amount, │ │ │
│ │ SAT, gfProof) │ │ │
│ │ paymasterAndData│ │ │
│ │ = {paymaster, │ │ │
│ │ nonce,ts,σ_t, │ │ │
│ │ attest_sig} │ │ │
│ │ ── submit ───⇢ │ │ │
│ │ │ (6) local sim: │ │
│ │ │ sig, gas, PM │ │
│ │ │ deposit + rep OK? │ │
│ │ │ ── bundle ─────────────────────────⇒ │
│ │ │ │ (7) Phase 1
│ │ │ │ validateUserOp: │
│ │ │ │ PartFund checks SAT │
│ │ │ │ (ML-DSA-44 sig, │
│ │ │ │ nonce fresh, │
│ │ │ │ valid_until, │
│ │ │ │ issuer_pubkey_hash,│
│ │ │ │ device_id match, │
│ │ │ │ amount≤tx_limit, │
│ │ │ │ Σcycle≤cap, │
│ │ │ │ whitelist); │
│ │ │ │ NONCE CONSUMED │
│ │ │ (8) validate │ │
│ │ │ PaymasterOp: ────┤ │
│ │ │ σ_t verify vs │ │
│ │ │ pk_terminal; │ │
│ │ │ nonce unique; │ │
│ │ │ ts ±60 s; │ │
│ │ │ amount binding; │ │
│ │ │ (attest_sig: off-│ │
│ │ │ chain, not here) │ │
│ │ │ EWMA+EWMVar rate;│ │
│ │ │ geofence (opt) │ │
│ │ │ │ (9) Phase 2
│ │ │ │ executeUserOp: │
│ │ │ │ AEV: customer→ │
│ │ │ │ merchant; gas ← │
│ │ │ │ PM gas deposit; │
│ │ │ │ postOp updates EWMA │
│ ⇠── on-chain confirm (WebSocket) ────────────────────────────────────────┤ (10)
(11) │ success screen │ receipt + TXID │ │ │
▼ ▼ ▼ ▼ ▼
Total end-to-end: ~8-12 s (≈1 block confirmation at 5 s)
Step legend — Flow 2.
- Terminal presence token (Layer 1, §8.7.1). The POS terminal draws a fresh
random
nonce, reads the timestamp, and signstoken = terminal_id ∥ amount ∥ nonce ∥ timestampwith its terminal keyσ_t = ML-DSA-44.Sign(sk_terminal, token).sk_terminallives in the terminal's secure element; onlypk_terminalis registered on-chain. The QR carries{terminal_id, amount, nonce, timestamp, σ_t, merchant, paymaster}. - Local authentication (§10.4.4). The NMW scans and authenticates by the
operation-context matrix: biometric only for a payment ≤ 10% of
tx_limit; biometric + Master PIN for > 10%; + a PAT from the sovereign device above the custom high-value threshold (the PAT sub-flow, §10.5.3, is an extra Intent-QR → sovereign-sign → ADQ round trip not drawn here). Biometric is Class 3 (Strong); 5 failures → 15-min cool-down → PIN. - SAT decryption. The NMW decrypts the at-rest SAT with the Argon2id-derived key. The NMW holds no ML-DSA spending key — the SAT is the sole spend-authorization artifact (§10.1.2).
- Device-attestation signature (§10.1.2, §10.3.1). The secure element signs
(nonce, dest, amount)with the non-exportable attestation key (classical P-256). This is a classical anti-theft / liveness proof kept off the consensus path — it is never verified on-chain, preserving zero on-chain elliptic-curve exposure (Axiom 2). An attacker who exfiltrates only the decrypted SAT bytes cannot produce this signature from another phone. - UserOp construction (§8.5, §8.8). The NMW builds a UserOperation whose
calldatacallsspendAllowance(dest, amount, sessionToken, geofenceProof)on the PartFund, and whosepaymasterAndDatapoints at the merchant Paymaster and carries the terminal token{nonce, timestamp, σ_t}plus the attestation signature. It submits to its preferred Bundler. - Bundler local simulation (§8.4, §8.8 Step 4). The (permissionless) Bundler locally checks the signature, estimates gas, and confirms the Paymaster has a sufficient gas deposit and acceptable reputation, then places the op in the next bundle and submits to the EntryPoint. The Bundler's incentive is the gas margin; it cannot forge the ML-DSA-44 SAT signature.
- EntryPoint Phase 1 — validation (§8.2.2). The EntryPoint calls the
customer wallet's
validateUserOp(); the PartFund verifies the SAT: ML-DSA-44 signature, nonce freshness (anti-replay),valid_untilnot passed,issuer_pubkey_hash== registered sovereign delegation key,device_idfield == registered profile,amount ≤ tx_limit, cycle-cumulative ≤cap, and destination ∈whitelistif active (§10.2.4). The nonce is consumed here, during validation, before any execution and regardless of the later execution outcome (§8.2.2, §8.3.1) — so an included-but-reverting op still burns its nonce and cannot be replayed. - Paymaster validation (§8.6.2, §8.7). The EntryPoint calls the merchant
Paymaster's
validatePaymasterOp(), which verifiesσ_tagainst the on-chainpk_terminalforterminal_id; nonce uniqueness (consumed-nonce map); freshness (timestamp within an acceptable window, e.g. ±60 s of block time, §8.7.1); value binding (signedamount== UserOp amount); the adaptive EWMA + EWMVar rate limiter (fires only aboveμ + kσand theB_minburst floor, §8.7.2); and, if a geofence is active, the off-chain geofence proof before agreeing to sponsor (§10.2.3 Layer 1 verifier). The device-attestation signature is not checked in this on-chain call: the Paymaster verifies it against the profile's pinned attestation public key off-chain, before sponsoring (device binding, §10.1.2, §10.3.1). Flow 2 does not draw that off-chain step; its name and its boundary with this on-chain call are pending maintainer decision. - EntryPoint Phase 2 — execution (§8.2.2, §8.8 Step 5). The wallet's
executeUserOp()transfers AEV from customer to merchant; gas is debited from the Paymaster's gas deposit (never its slashable stake);postOp()updates the rate-limiter EWMA/EWMVar state. - Confirmation. The terminal observes on-chain confirmation via a WebSocket subscription to an Aevum node.
- Receipts. The terminal shows success; the NMW shows a receipt with the
TXID. Total end-to-end ≈ 8–12 s (~1 block confirmation at
aevum.block_time = 5 s).
Cost / gas notes (canonical bands). The customer pays zero gas. The merchant's per-transaction gas cost sits in the canonical ~1–100 Vea band (§4.6.1, §8.6.2): a simple POS payment (~215,000 gas) sits at the ~1–10 Vea end; adding an on-chain geofence commitment is +20,100 gas (one 20,000-gas storage write + 100-gas hash check), for ~235,000 gas total — about 1.1× the plain POS cost at the same gas price (§10.2.3). The §4.6.1 / §8.6.3 placement of geofence-verified payments at the ~10–100 Vea end does not follow from this +9% gas delta; reconciling the band classification with the gas figures is pending maintainer decision (§8.6.3). Non-AEV settlement adds AMM fee + slippage + AEV price risk on top, none of which appear in the gas figure (§8.5, §8.6.3). Worst-case theft on this path is MA-bounded — never Vault principal — even if the Paymaster's attestation check is bypassed or colluding (§10.3.1 honest residual).
A05.3. Flow 3 — Emergency Freeze / Device Revocation
Two distinct sovereign operations share this flow. emergencyFreeze(device_id)
is the fast, alert-emitting response to a stolen/lost phone: it zeroes the MA,
invalidates the SAT on-chain, and leaves the device profile registered.
revokeDevice(device_id) is a permanent deregistration (decommission /
upgrade) that removes the profile and frees one of the 5 device slots
(§10.2.4, §10.5.2). Both are sovereign-key-only; the NMW can never initiate
either (authority flows strictly downward, §10.1.1).
Owner Sovereign device Aevum ESC (PartFund 0x01) Stolen/old NMW
(Arca / Desktop) (attacker-held)
───── ──────────────── ───────────────────────── ───────────────
│ │ │ │
(1)│ report theft / │ │ ┌ attacker may be
│ decommission ─▶│ │ │ spending MA in a
│ │ │ │ ~minutes race
(2)│ │ authenticate on sovereign │ │ window ────────┐
│ │ device (biometric / PIN); │ │ │
│ │ NO NMW involvement │ │ │
│ │ │ │ │
(3)│ │ sign HIGH-PRIORITY UserOp │ │ │
│ │ (ML-DSA-44 delegation key): │ │ │
│ │ │ │ │
│ ┌─ THEFT/LOSS path ─────────┐ │ │ │
(4a)│ │ revokeAllowance() │ ──────────────⇒ │ MA → 0; │ │
│ │ + emergencyFreeze(dev_id)│ │ SAT invalidated; │ │
│ │ │ │ on-chain ALERT; │ │
│ │ │ │ profile KEPT │ │
│ └──────────────────────────┘ │ │ │
│ │ │ ▼ │
(5)│ │ │ subsequent spendAllowance() │
│ │ │ from stolen NMW → REVERT ◀─────────┘
│ │ │ (SAT invalid on-chain)
│ │ │
(6)│ │ unspent MA remainder → Vault │
│ │ after timeout, or now via │
│ │ reclaimAllowance() ────────⇒ │ remainder returned to Vault
│ │ │
│ ┌─ MIGRATION/DECOMMISSION path ─┐ │
(4b)│ │ revokeDevice(old_dev_id) ─────┼──────────⇒ │ profile REMOVED;
│ │ │ │ SAT invalidated;
│ └───────────────────────────────┘ │ 1 of 5 slots FREED
│ │ │
(7)│ register replacement phone via Flow 1 (A05.1) │ new profile + SAT;
│ │ ─────────────────────────────│ zero downtime if pre-registered
▼ ▼ ▼
Worst-case loss = MA remainder at moment of theft. Vault principal untouchable.
Step legend — Flow 3.
- Trigger. The owner reports a stolen/lost phone (theft/loss path) or a planned decommission/upgrade (migration path). The owner reaches a sovereign device — the Arca or the Desktop Node — not the NMW.
- Sovereign authentication. The owner authenticates directly on the sovereign device (biometric / PIN on that device). The NMW is not in the loop: emergency revocation is not an operation the NMW can perform (§10.4.4).
- Sovereign signature. The sovereign device signs a high-priority UserOp with its ML-DSA-44 delegation key (recommended; pending ADR-0005 ratification — [R9]).
- Path split.
- (4a) Theft / loss (§10.7.1). The UserOp calls
revokeAllowance()+emergencyFreeze(device_id)on the PartFund. The MA is zeroed, the SAT is invalidated on-chain, and an on-chain alert is emitted. The device profile is left registered (fast freeze, reversible posture). - (4b) Migration / decommission (§10.7.3, §10.5.2). The UserOp callsrevokeDevice(device_id), which permanently removes the profile, invalidates its SAT on-chain, and frees one of the 5 registered-device slots. - Enforcement. Every subsequent
spendAllowance()from the stolen/old NMW reverts — the SAT is invalid on-chain, independent of the attacker's network path or device state. - Remainder recovery (theft/loss). The unspent MA remainder returns to the
Vault automatically after the cycle
timeout, or immediately via an explicit sovereignreclaimAllowance()(idempotent with the automatic post-timeout return, §10.2.4, §10.7.1). - Replacement. The owner registers a replacement phone via Flow 1 (A05.1). If the new phone was pre-registered before decommissioning the old one, payment capability has zero downtime (up to 5 concurrent devices, §10.5.2).
Residual-risk note (§10.7.1, §10.9). The worst-case loss is the MA
remainder at the moment of theft — never the Vault principal, which is
architecturally unreachable from the NMW authorization context. The only open
window is the race between theft and freeze (~minutes), during which the attacker
can spend at most the MA remainder subject to tx_limit, cap, whitelist, and
(if the live device is locked) biometric/PIN. This window is mitigated by
conservative MA sizing. Note that revocation invalidates the SAT on-chain; a
Paymaster observing a frozen/invalidated SAT will also stop sponsoring, but the
on-chain PartFund revert is the authoritative backstop and does not depend on
Paymaster cooperation.
A05.4. Cross-Flow Invariants
These hold across all three flows and are the load-bearing security properties the diagrams instantiate:
- No sovereign or spending key ever on the phone. The NMW holds only the non-exportable attestation key (no spend authority) and the encrypted SAT (§10.1.2). Capture of the phone caps loss at the MA remainder.
- Authority is strictly downward (§10.1.1). The NMW cannot issue SATs, elevate permissions, reconfigure the MA, or initiate freeze/revoke — every such act requires the sovereign ML-DSA-44 delegation key on the Arca/Desktop.
- MA-bounded worst case, always. The on-chain PartFund enforces
cap,tx_limit,whitelist,valid_until, and nonce anti-replay as the ultimate backstop. Attestation compromise, Paymaster bypass, or Paymaster collusion can never exceed MA-bounded loss and can never reach the Vault (§10.3.1, §10.9). - Zero on-chain elliptic-curve exposure (Axiom 2). The classical P-256
device-attestation signature is verified off-chain by the Paymaster only;
the entire on-chain path uses ML-DSA-44 (SAT/UserOp) and SHA3-256
(commitments,
device_id,userOpHash) exclusively (§10.1.2, §8.5.1). - Sovereign issuer is either Arca or Desktop. Software self-custody of AEV (ML-DSA-44) and BND (ML-DSA-65) works from genesis on the Desktop Node; the Arca is the recommended BND-custody upgrade, not a precondition for any flow above (§10.5.1, §10.5.4, Axiom 1).
Ratification-dependent items in this appendix. (i) The Arca/Desktop
SAT/PAT issuer key is ML-DSA-44 delegation, distinct from the ML-DSA-65 custody
root — recommended, pending ADR-0005 counter-sign (CONSTANTS sig.arca /
DECISIONS [R9]). All other diagrammed values (aevum.block_time = 5 s,
valid_until derivation, ADQ-SAT parameters, 5-device cap, Argon2id parameters, gas bands, ~8–12 s settlement) are drawn from the
current Chapter 8 / Chapter 10 spec and CONSTANTS.md as settled text. The ±60 s freshness window is the
illustrative example of §8.7.1, not a pinned parameter.