Guest User

Untitled

a guest
Aug 5th, 2026
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 23.00 KB | None | 0 0
  1. # Scoped Continuity: A Reputation Architecture for Anonymous Fractional Settlement
  2.  
  3. **Draft — TradeP2P**
  4.  
  5. ---
  6.  
  7. ## Abstract
  8.  
  9. This document describes a reputation architecture for an anonymous peer-to-peer
  10. trading mediator in which settlement is non-custodial, unverified, and
  11. progressive. The design starts from an uncomfortable premise: in such a system,
  12. the mediator cannot observe whether value moved, participants can create
  13. identities for free, and any persistent public identifier is a stronger
  14. deanonymization vector than the ones the underlying transport already goes out
  15. of its way to eliminate.
  16.  
  17. Most reputation designs respond to this by picking a side — either they abandon
  18. anonymity to get accountability, or they abandon accountability to keep
  19. anonymity. This architecture instead decomposes "reputation" into four
  20. functions that are usually conflated, and scopes each to the narrowest context
  21. that actually requires it. The governing principle:
  22.  
  23. > **Continuity must be scoped to the smallest context that actually requires
  24. > continuity.**
  25.  
  26. The result is a system that provides login continuity with one service, trade
  27. continuity inside one room, private history continuity on the user's own
  28. machine, and optional evidence disclosure to a chosen counterparty — without
  29. producing a public transaction graph, a lifelong identifier, or a scalar
  30. trust score.
  31.  
  32. It does not produce Sybil resistance. That limitation is stated explicitly
  33. rather than obscured, and the one mechanism that could partially address it is
  34. described as a bounded, honest option rather than a solution.
  35.  
  36. ---
  37.  
  38. ## 1. Background: the system this applies to
  39.  
  40. The mediator coordinates trades but never holds, inspects, verifies, or
  41. broadcasts value. Each published offer is also a waiting lobby recording only
  42. the asset and integer amount the creator sells, the asset and amount it buys,
  43. a number of fractional settlement rounds, and an opaque receive address. A
  44. second party takes the offer by room ID and supplies its own address. The room
  45. becomes an active settlement session.
  46.  
  47. Transfers happen externally, on whatever chains the two assets live on. The
  48. mediator coordinates only `sent` and `received` acknowledgements. It does not
  49. identify the chain, validate address format, or confirm that anything moved.
  50.  
  51. Two properties of this design shape everything that follows.
  52.  
  53. **Acknowledgements are claims, not proofs.** When a party signals `sent`, the
  54. mediator learns that a message arrived, nothing more. A completed room means
  55. two parties clicked through a state machine. It does not mean value changed
  56. hands.
  57.  
  58. **Fractional rounds cap damage, they do not deter.** Splitting a trade into *N*
  59. tranches with alternating legs means a defector who abandons the trade at the
  60. last leg steals at most `total/N`. This is real protection against catastrophic
  61. loss. It is not deterrence, because the cost of acquiring a fresh identity and
  62. finding another counterparty is approximately zero. An attacker farms `total/N`
  63. from many victims indefinitely.
  64.  
  65. The transport, by contrast, is deliberately hardened against correlation. TLS
  66. 1.3 only, session tickets disabled on both the option and ticket-count paths
  67. specifically so resumption cannot link sessions, no client authentication, no
  68. accounts, fixed-size framing with a hard payload cap, and optional SOCKS5
  69. transport for onion endpoints.
  70.  
  71. That last point is the crux. **The codebase already treats cross-session
  72. linkability as an attack.** A reputation system that publishes a stable key in
  73. the offer book would not be a mild weakening of that stance — it would invert
  74. it, handing every observer a permanent identifier that TLS resumption was
  75. disabled to prevent.
  76.  
  77. ---
  78.  
  79. ## 2. Design constraints
  80.  
  81. 1. **No public lifelong identifier.** Nothing the architecture introduces may
  82. become a stable handle visible across trades to the offer book, other
  83. clients, or a mediator the user did not choose.
  84. 2. **No scalar score.** Reputation collapses information. Structured evidence
  85. preserves the reader's ability to judge.
  86. 3. **No claim of Sybil resistance.** Key continuity proves continuity. It does
  87. not prove unique personhood, and the architecture must not imply otherwise
  88. anywhere in code, documentation, or interface.
  89. 4. **No gossip.** Personal judgements about counterparties never leave the
  90. user's machine unless explicitly exported.
  91. 5. **Optional in practice, not just in principle.** A design where opting in
  92. costs unlinkability is not optional; it is compulsory with extra steps
  93. (§10.3).
  94. 6. **Honest layering.** Evidence a user generated about themselves and evidence
  95. a third party attested to are different objects with different weight, and
  96. must never be represented as interchangeable.
  97.  
  98. ### Non-goals
  99.  
  100. Identity verification. Dispute arbitration. Custody or escrow. Transaction
  101. verification. Global blocklists. Any mechanism requiring the mediator to be
  102. trusted with value or with truth about the chains.
  103.  
  104. ---
  105.  
  106. ## 3. Threat model
  107.  
  108. **The mediator is not trusted.** It may be adversarial, may be run by a
  109. counterparty, may collude, may forge, and — because node registration is
  110. currently unauthenticated — may be cheap to become at scale. Every claim a
  111. mediator makes must be independently checkable or explicitly marked as
  112. mediator-asserted.
  113.  
  114. **Counterparties are not trusted.** They may defect at the final leg, withhold
  115. receipts to deny an honest counterparty credit, farm reputation against
  116. themselves through self-trades, or attempt to correlate a user's activity
  117. across trades.
  118.  
  119. **Observers of the offer book are not trusted.** Anything published is
  120. published to an adversary building a correlation graph.
  121.  
  122. **The user's machine is trusted, conditionally.** Local storage is assumed
  123. private but not durable — crash, corruption, rollback, and loss are expected
  124. and must fail loudly rather than silently.
  125.  
  126. **Explicitly outside the model:** chain analysis of settled transactions
  127. (§10.1), traffic-timing correlation by a mediator observing both connections
  128. (§10.2), and endpoint compromise.
  129.  
  130. ---
  131.  
  132. ## 4. Key architecture
  133.  
  134. A single master secret, never transmitted, from which scoped keys are derived:
  135.  
  136. ```
  137. master identity secret
  138. ├── service-scoped login key one per service
  139. ├── local-history authentication key one, never leaves the machine
  140. ├── per-mediator pseudonym key one per mediator
  141. └── per-trade ephemeral key one per room, randomly generated
  142. ```
  143.  
  144. Long-term scoped keys are derived deterministically via HKDF-SHA256, with the
  145. master secret as input keying material and a **length-prefixed, domain-labelled
  146. context structure** as the `info` parameter. Naive concatenation is prohibited:
  147. `"login" ‖ "x"` and `"logi" ‖ "nx"` produce identical bytes, and an ambiguity
  148. in derivation is as dangerous as an ambiguity in a signed message. Derived
  149. 32-byte outputs become Ed25519 keys directly.
  150.  
  151. The per-trade key is the exception: it is **freshly generated at random and
  152. never derived**. Derivation from the master secret would make trade keys
  153. mutually linkable to anyone who later learned the derivation path, defeating
  154. the purpose. This has an operational consequence — a randomly generated key
  155. cannot be regenerated after a crash, so the ephemeral key for any in-flight
  156. room must be persisted alongside journal state.
  157.  
  158. ### Why per-mediator pseudonyms
  159.  
  160. A user who returns to the same mediator repeatedly presents the same pseudonym
  161. there and can accumulate standing. That mediator learns nothing about the
  162. user's activity elsewhere, because a different mediator sees an unrelated key.
  163. An adversary running many mediators to correlate a user gets many unlinkable
  164. pseudonyms — the attack does not scale.
  165.  
  166. The mediator identifier used in derivation should be a durable identity rather
  167. than a certificate fingerprint, or key rotation silently destroys accumulated
  168. standing.
  169.  
  170. ---
  171.  
  172. ## 5. Layer one — the local journal
  173.  
  174. An encrypted, hash-chained, append-only record maintained by each client of its
  175. own activity. Each entry commits to the room and trade identifiers, mediator
  176. identity, counterparty pseudonym fingerprint, a commitment to terms, round
  177. number, message direction and type, a hash of the message, acknowledgement
  178. state, local settlement state, timestamp, and the previous entry's hash:
  179.  
  180. ```
  181. entry_hash[n] = H( canonical_entry[n] ‖ entry_hash[n-1] )
  182. ```
  183.  
  184. Checkpoints are authenticated with the local-history key. The chain detects
  185. modification, deletion of interior entries, reordering, rollback to an earlier
  186. checkpoint, and malformed state transitions.
  187.  
  188. **What it is for:** crash and reconnect recovery, duplicate-action prevention,
  189. corruption detection, and feeding the private counterparty record.
  190.  
  191. **What it is not:** evidence. The journal proves what the local client
  192. recorded. A user can write anything into their own journal. It has no value to
  193. a counterparty and must never be presented as though it does. This distinction
  194. is the most important boundary in the architecture and the easiest to erode.
  195.  
  196. The journal never publishes anything automatically.
  197.  
  198. ### Recovery and the persistence trade-off
  199.  
  200. A client journal alone cannot resurrect a half-settled room, because the
  201. authoritative multi-party state — whose turn it is, what both sides have
  202. acknowledged — lives on the mediator. Recovery therefore requires mediator-side
  203. room persistence.
  204.  
  205. This is a genuine cost, not a free improvement. Memory-only mediator state is
  206. *accidentally* a privacy property: a seized or compromised mediator has nothing
  207. on disk about past rooms. Durable room state means durably storing the pair of
  208. receive addresses that links two counterparties — exactly the linkage the
  209. architecture exists to prevent.
  210.  
  211. The trade-off must be made explicitly. Options, in rough order of preference:
  212. persist the state machine but not addresses, re-soliciting them from clients on
  213. recovery; encrypt room state at rest under an operator-held key; delete
  214. aggressively on completion. Accepting the exposure silently is not an option.
  215.  
  216. ---
  217.  
  218. ## 6. Layer two — mediator-signed staged receipts
  219.  
  220. A receipt is an attestation signed by a party other than its holder. Unlike the
  221. journal, it carries weight to a third party.
  222.  
  223. A receipt binds: version, room identifier or privacy-preserving room
  224. commitment, terms commitment, the parties' ephemeral public keys or scoped
  225. pseudonyms, mediator public key, stage, completion state, timestamp, unique
  226. nonce, and the hash of the previous stage's receipt.
  227.  
  228. A bare assertion of the form *"key X traded successfully"* is prohibited. Such
  229. a statement is replayable into any context and attests to nothing checkable.
  230.  
  231. ### Staging
  232.  
  233. ```
  234. 1. terms accepted
  235. 2. round N acknowledged
  236. 3. all obligations except final settlement completed
  237. 4. settlement completed
  238. ```
  239.  
  240. Each stage commits to the hash of the previous, so a later receipt without a
  241. valid predecessor is rejected. A completion receipt may only be issued once the
  242. protocol's actual completion condition holds.
  243.  
  244. Where practical, receipts use two-party acknowledgement plus mediator
  245. countersignature rather than a mediator-only assertion, so that a hostile
  246. mediator cannot unilaterally fabricate an attestation neither party made.
  247.  
  248. ### The withholding problem
  249.  
  250. Staging alone is insufficient. If receipts are issued *after* a round
  251. completes, a defector simply declines to participate in the final receipt
  252. exchange. The honest party is left with nothing recorded for a trade they
  253. completed in good faith, and withholding costs the withholder nothing. Griefing
  254. is free, and reputation accrual becomes something a counterparty can veto after
  255. the fact.
  256.  
  257. The fix is timing, not structure. **The stage-3 receipt is a required
  258. settlement step that occurs before the final tranche is sent.** Withholding it
  259. therefore also withholds the withholder's own last leg. The cost of griefing
  260. becomes the value of one tranche, which is precisely the cost of defection —
  261. withholding stops being a free action and becomes just another form of
  262. abandonment, already handled by the fractional model.
  263.  
  264. This invariant is subtle and will regress silently if it is not covered by an
  265. explicit test that simulates refusal and asserts the protocol-level
  266. consequence.
  267.  
  268. ---
  269.  
  270. ## 7. Layer three — selective disclosure
  271.  
  272. Receipts are private by default. There is no publication path, no aggregation,
  273. no directory.
  274.  
  275. A holder may disclose specific receipts to a specific counterparty during a
  276. specific negotiation. Disclosures are bound to the intended recipient and are
  277. not broadcastable — a receipt shown to one party cannot be replayed by an
  278. interceptor as their own.
  279.  
  280. Linkage is thereby **scoped to whoever the holder chose to show, for the
  281. duration of one negotiation**, rather than global and permanent. This is the
  282. architecture's central move: reputation that exists without a public graph.
  283.  
  284. Selective disclosure is fully implementable with primitives already available.
  285. It is the realistic near-term deliverable.
  286.  
  287. ---
  288.  
  289. ## 8. Layer four — unlinkable aggregate credentials
  290.  
  291. Selective disclosure has a residual leak: the receipts a holder shows are
  292. individually identifiable, so a counterparty who is also a mediator, or who
  293. compares notes with one, can correlate them.
  294.  
  295. The mitigation is blind-signed completion tokens. The mediator signs a token
  296. per completed room without seeing which token it signed. The holder later
  297. proves possession of *N* tokens without revealing which rooms produced them.
  298.  
  299. **Implementation reality.** Naive blind Schnorr over Ed25519 is unsafe under
  300. concurrent signing sessions — the ROS attack makes parallel sessions forgeable.
  301. RSA blind signatures (RFC 9474) are the sound and practically available choice,
  302. implementable with the existing OpenSSL dependency at the cost of larger
  303. tokens. BBS+ would additionally permit disclosing attributes such as volume or
  304. age bands without revealing underlying receipts, but requires pairing-friendly
  305. curve support that this dependency set does not contain. BBS+ is therefore
  306. future work, and the receipt serialization is versioned so that an anonymous
  307. credential layer is an additive version rather than a replacement.
  308.  
  309. Blind tokens address **linkability only**. They contribute nothing to Sybil
  310. resistance and must not be presented as though they do.
  311.  
  312. ---
  313.  
  314. ## 9. Sybil resistance, and why this architecture does not achieve it
  315.  
  316. Keys are free. Two identities created in a second can complete a hundred rooms
  317. with each other, moving no value, and mint a spotless mutual history. Because
  318. acknowledgements are unverified claims (§1), a reputation built on completed
  319. rooms is a reputation about **claim-making**, not behavior — and claim-making
  320. costs nothing.
  321.  
  322. No cryptographic mechanism fixes this. Unforgeable, unlinkable, perfectly
  323. staged receipts attesting to a hundred fake trades are unforgeable, unlinkable,
  324. perfectly staged garbage. **The signature is sound; the referent is fiction.**
  325.  
  326. Approaches considered and rejected:
  327.  
  328. - **Proof of work** — a one-time amortizable tax. An attacker pays once and
  329. farms indefinitely.
  330. - **Social vouching** — imports a social graph, which is a deanonymization
  331. surface, directly contradicting the design's purpose.
  332. - **Mediator attestation of value movement** — the mediator cannot see the
  333. chains. This is the founding constraint, not an implementation gap.
  334.  
  335. ### Bond anchoring: a bounded, honest partial measure
  336.  
  337. A reputation key may publish a bond address. Reputation weight is a function of
  338. value visibly at risk in that address multiplied by the age of the bond.
  339. Verification is a balance check performed by the client, which keeps the
  340. mediator out of the trust computation and keeps the design chain-agnostic.
  341.  
  342. What this achieves: a fresh keypair cannot fake accumulated sunk cost, and cost
  343. scales linearly with the number of identities, so farming stops being free.
  344.  
  345. What it does not achieve: without smart contracts there is no slashing. A bond
  346. is a demonstration of stake, not a forfeitable deposit. It raises the cost of
  347. Sybil attacks; it does not prevent them. It also introduces a chain-visible
  348. artifact, which is a linkability cost that must be weighed against the Sybil
  349. benefit — and for many users that trade will not be worth making.
  350.  
  351. Bond anchoring is offered as an option with its costs stated, not as a
  352. solution.
  353.  
  354. ---
  355.  
  356. ## 10. What this architecture does not do
  357.  
  358. ### 10.1 It does not make trading anonymous
  359.  
  360. The cryptography does what it claims. Blind signatures are unlinkable; scoped
  361. keys do not correlate across mediators. But those guarantees cover **the
  362. contents of protocol messages**, and very little else about the situation.
  363.  
  364. Trades settle on public chains. The addresses exchanged at room formation are
  365. the linkage, and chain analysis is indifferent to how elegantly they were
  366. exchanged. Protocol-level unlinkability is upstream of the part where value
  367. actually moves.
  368.  
  369. The accurate claim is narrow: *this removes identity from the protocol's
  370. reputation mechanism.* It does not remove identity from the act of trading.
  371.  
  372. The reason the work is still worth doing is defensive rather than aspirational.
  373. A naive public reputation key would **manufacture** a new, permanent,
  374. cross-trade identifier that an observer did not previously have — on top of
  375. everything already inferable. Declining to create that is a real gain. It is
  376. not anonymity.
  377.  
  378. ### 10.2 It does not hide anything from the mediator
  379.  
  380. Ephemeral trade keys prevent correlation by other clients and by observers of
  381. the offer book. The mediator sees which connection joined which room in real
  382. time regardless of what key signs the messages inside it. Onion routing hides
  383. network location, not session timing. Round-by-round acknowledgement produces a
  384. distinctive traffic rhythm on a channel with fixed framing and a small payload
  385. cap.
  386.  
  387. Any documentation implying that ephemeral keys conceal activity from the
  388. mediator is overselling, and the wording is the bug.
  389.  
  390. ### 10.3 "Optional" is unstable
  391.  
  392. Once some offers carry reputation signals, unkeyed offers are deprioritized in
  393. practice, and the anonymity set collapses toward "participants with something
  394. to hide." Optionality that is nominal rather than real is worse than no
  395. optionality, because it produces a stigmatized minority while claiming
  396. neutrality.
  397.  
  398. The blind-credential route (§8) is the only variant where opting in does not
  399. cost unlinkability, and is therefore the only one where the two populations
  400. plausibly stay mixed. Any implementation that ends up requiring a persistent,
  401. always-visible identifier to participate in reputation at all is a regression
  402. against this framing and should be treated as a defect.
  403.  
  404. ### 10.4 It does not survive a hostile hosted client
  405.  
  406. A browser page cannot protect a private key from an operator who controls the
  407. JavaScript it serves. Key-based login in a hosted client protects against
  408. stored-credential compromise — leaked account databases, credential stuffing —
  409. and against nothing else. Native clients, external signers, or WebAuthn are the
  410. only paths where browser-context key handling means more than that.
  411.  
  412. ### 10.5 Key loss is total
  413.  
  414. There is no recovery authority, by construction. A lost keystore is a lost
  415. identity and a reset to zero standing. This is not a flaw to be engineered
  416. around; it is the Sybil cost surfacing honestly. Encrypted backup and export
  417. paths are required; a recovery service is not possible without reintroducing a
  418. trusted party.
  419.  
  420. ---
  421.  
  422. ## 11. Presentation: structured evidence, not a score
  423.  
  424. Clients present, separately and without aggregation:
  425.  
  426. ```
  427. key age
  428. receipt count
  429. distinct mediator count
  430. economic cost / bond age / bond value band
  431. prior interaction with this specific client
  432. locally blocked status
  433. ```
  434.  
  435. These must not collapse into a single number. A scalar invites the reader to
  436. stop thinking; separate axes let them weigh what matters for the trade in front
  437. of them. A counterparty with two receipts from a mediator you trust is not
  438. comparable to one with fifty from mediators you have never seen, and no
  439. weighting function should be permitted to decide that on the user's behalf.
  440.  
  441. A key confers no status. In any interface, possession of a key means exactly:
  442.  
  443. > This participant has demonstrated control of the same scoped key.
  444.  
  445. It does not mean trusted, verified, human, safe, or economically reputable. A
  446. key badge presented as a trust indicator is a design failure, because it
  447. communicates a Sybil-resistance property the system does not have.
  448.  
  449. Correspondingly, keyed participants are never ranked above unkeyed ones by
  450. default. This is client-side policy and unenforceable at the protocol level —
  451. a forked client may ignore it — and should be documented as an intention
  452. rather than a guarantee.
  453.  
  454. ---
  455.  
  456. ## 12. Deployment sequence
  457.  
  458. Ordered by value delivered and hard dependency, not by conceptual layering.
  459.  
  460. | Stage | Content | Rationale |
  461. |---|---|---|
  462. | 1 | Crypto primitives | Everything depends on it |
  463. | 2 | Encrypted local keystore | Nothing can store a key without it |
  464. | 3 | Journal, recovery, mediator persistence | Fixes a live state-loss risk independent of identity; requires the §5 privacy decision |
  465. | 4 | Local counterparty history | Nearly free once 2–3 exist; immediate user value |
  466. | 5 | Per-trade ephemeral identities | Receipts must bind to these, not to a long-term key |
  467. | 6 | Staged receipts | Depends on 5; requires the §6 withholding timing |
  468. | 7 | Service-scoped login | Lowest value; replaces stored passwords only |
  469. | 8 | Selective disclosure | Depends on 6 |
  470. | 9 | Hosted client integration | Touches the most surface; depends on everything |
  471.  
  472. Two dependencies fall outside this sequence and gate parts of it. Node
  473. registration is currently unauthenticated, and a keyed reputation system makes
  474. running a hostile mediator more profitable — that fix belongs before or
  475. alongside stage 6, since receipts are the first artifact a hostile mediator
  476. gains from forging. Separately, connection admission control gates stage 7,
  477. which adds pre-session cryptographic work to a path that currently has none.
  478.  
  479. ---
  480.  
  481. ## 13. Summary
  482.  
  483. The architecture provides:
  484.  
  485. - login continuity with one service
  486. - trade continuity inside one room
  487. - private history continuity on the user's own machine
  488. - optional evidence disclosure to a chosen counterparty
  489.  
  490. It deliberately does not provide:
  491.  
  492. - one public lifelong identifier
  493. - a public transaction graph
  494. - a Sybil-resistant reputation score
  495. - automatic global blocklists
  496. - a mandatory reputation class system
  497.  
  498. The central claim is modest and, stated plainly, defensible: reputation can be
  499. made to exist without a public graph, and evidence can be made to carry weight
  500. without becoming a permanent handle. The central limitation is equally plain:
  501. in a system where settlement is unverified and identity is free, no reputation
  502. mechanism distinguishes an honest participant from a patient one. Fractional
  503. settlement caps the damage. Nothing here removes it.
  504.  
  505. Designs that claim otherwise are describing a system that verifies value
  506. movement. This one does not, and says so.
Add Comment
Please, Sign In to add comment