docs: finish M4 current-vs-custody boundary

This commit is contained in:
2026-10-24 03:30:28 -07:00
parent aa16d5c3e9
commit 517037bf1a
+23 -26
View File
@@ -37,40 +37,37 @@ Implemented Tcl surface:
Future custody surface such as `sign`, `balance`, key generation/import, and transaction
history is intentionally **not implemented** and must not be inferred from the component name.
## 6. Dependencies & stubs
- M5 Traders — 1:1 binding; *stub:* canned trader ID.
- M1 Marketplace — signing requests come through marketplace only; *stub:* direct sign call.
- Blockchain nodes — balance queries and tx broadcast; *stub:* simulated chain state.
- Verschwörern Veregeister wallets — tax destination; *stub:* log transfer.
## 6. Dependencies & runtime state
- M5 Traders — implemented identity registry for 1:1 binding.
- M1 Marketplace — implemented caller of binding/exposure checks.
- Blockchain nodes / signing libraries — absent.
- Tax destination wallets — no transfer surface; M0 only stages receipt metadata.
## 7. Invariants / laws
- **L1 (C5):** **sovereign custody only** — private keys are generated locally, stored locally,
and **never leave the wallet**. No custodial service, no exchange deposit, no trust with external
parties. Our keys, our coins.
- **L1 (C5 target):** **sovereign custody only** if custody is implemented. V1 contains no keys at
all, which is stronger than accidentally introducing an unratified custody path.
- **L2 (C5):** **1:1 trader binding** — each wallet is bound to exactly one trader. A trader
cannot use another trader's wallet. The Marketplace enforces this.
- **L3 (C4):** **signing requires Marketplace confirmation** — a wallet will not sign a transaction
that didn't receive direct authorization from Marketpakce (M1-L1). No direct signing API for traders.
- **L3 (C4 target):** future signing requires Marketplace confirmation. V1 has no signing API for
Marketplace or Traders.
- **L4 (C4):** **spending limits are wallet-level** — independent of Conductor or Marketplace
limits. Defense in depth: even if other rules fail, the wallet itself caps exposure.
- **L5 (C4):** **tax collection is automatic** — realized income triggers tax staging. The trader
cannot opt out. OUT OF SCOPE
- **L5 (C4 target/out of scope):** realized-income tax policy may trigger staging/transfer later.
V1 only exposes an M0 receipt-staging hook; M4 performs no tax action.
## 8. Build steps
1. Implement key generation and secure storage.
2. Implement transaction signing for one chain.
3. Implement trader binding and Marketplace-only signing enforcement.
4. Implement algorithmic limits.
## 8. Build status
1. **Done:** permanent 1:1 Trader↔wallet binding.
2. **Done:** per-action and cumulative session exposure brakes.
3. **Done:** Marketplace-only use of the implemented wallet scaffold.
4. **Open by design:** key generation/storage, signing, balances, chain adapters, rotation/backup.
## 9. Tests
Custody: private key never appears in any response, messages, or log.
Binding: wrong trader cannot sign.
Trade limits: over-limit transaction rejects; risk :: reward ratio below-limit rejects.
Tax: out of scope.
Multi-chain: every chain produces valid signatures.
Current tests verify walletless rejection, wrong-Trader binding rejection, independent per-action
and cumulative exposure limits, and simulated spend accounting. There are intentionally no
signature/multi-chain custody tests because no key/signing implementation exists.
## 10. Open items
- Key storage format.
- Which chains to support initially. (all of them)
- Spending limit configuration (correction: This is algorithmic and hardcoded.)
- Key rotation / backup strategy.
- Ratified key storage, backup, recovery, and rotation design.
- Chain/signature support only after custody is ratified.
- Persistent time-window semantics for the currently session-cumulative exposure limit.
- Balance/transaction-history model if live custody is introduced.