5D Library › Zero-Touch Multi-Site Fault Tolerance, Payment Anti-Fraud State Machines and Passive Cashflow Queuing · 中文
Preface: Unattended Is Not the Same as Unaccountable
Note
This is not business, legal or security advice and says nothing about whether any reading comes true; please read this first. The book studies the mathematics met by a digital service network of dozens of sites that share one program kernel and try to run without human work: how to stop bank-transfer screenshots from being reused, how self-referral commissions and “invite friends to unlock” offers are arbitraged, how an order state machine stays correct under retries and reordering, the queueing delay of a shared kernel under bursts of traffic, and the reserve its cash flow needs. Every traffic, price, fraud and failure parameter in it is a model parameter, not data from any business; all data are generated by the programs printed in the book. The book gives no method of attack: fraud appears only as an economic structure, used to compute the thresholds of defence.
“Zero touch” is the goal of many small digital businesses: a reader orders, uploads a transfer screenshot, and the system releases access by itself; 30 sites share one program; traffic queues by itself and cash flows in by itself. The author’s outline holds that such an architecture can deliver fraud defence, high availability and passive cash flow at once. This book writes each mechanism of the outline as a runnable program and asks under what conditions it holds.
Like the other books of 5D Library, it tries to refute first, then sets bounds, and reports negative results as they are.
What the book contains
Chapter 1 computes the reuse problem of transfer receipts: after how many orders checking only trailing digits collides, what an image hash can tell apart, and under what conditions “release first, audit later” makes a freeloader’s expected gain negative. Chapter 2 blocks self-referral with an association graph and computes the real net gain of “invite m friends to unlock level 2”. Chapter 3 model-checks an order state machine exhaustively and computes the lifetime of idempotency keys under message retries. Chapter 4 uses queueing theory to compute the tail latency of 30 sites on one kernel, the workers needed and load shedding. Chapter 5 compares availability architectures for a shared kernel and the drain time of a blue-green switch. Chapter 6 allocates paid traffic by Thompson sampling, gives a stopping rule for promoting a sub-site to its own domain, and computes a cash reserve with a compound Poisson process. Chapter 7 reads the matched tallies of Tang flying cash, the seals and issue cap of Song jiaozi, and the record of Liu Yan clearing the Bian River. Chapter 8 gives a nine-flag audit and a pre-registered experiment.
Claims corrected on checking
- Checking trailing digits does not stop reuse. Four trailing digits have an even chance of a collision by 119 orders; after 5,000 orders an honest new receipt is wrongly judged a “reuse” with probability 0.3935 (p01). The full reference number must be checked.
- “Release first, audit later” fails for instant goods unless the cheat loses something when caught. If a freeloader loses nothing when caught (), no audit share makes his expected gain negative; with a stake of 200 (such as credits and commissions that can be revoked in cascade), auditing 0.485 of orders suffices even when everything is available at once (p02).
- Linking accounts by IP subnet joins strangers together. Behind carrier-grade NAT, adding subnet edges creates a component of 4692 accounts, and 0.817 of honest referrals between strangers are wrongly blocked (p03).
- “Invite 3 friends to unlock level 2” is a deep discount. With self-referral, unlocking a level listed at 299 costs 67.50; even with self-referral commission blocked it costs 126.00 (p04).
- One worker cannot carry bursts. At a mean load of 0.80, Poisson arrivals need 2 workers to keep T99 below 500 ms, bursty arrivals 4 (p08).
- “Passive” cash flow needs a reserve. With a 7-day settlement delay, 12,600 of costs fall due before the first payout; under a shock that halves orders for three months, a reserve of 60,000 still sees a negative balance in 0.318 of years (p13).
How to read the boxes
The boxes separate published evidence, runnable Python calculations (16 programs, standard library only, fixed random seeds, each run at build time with its real output printed beneath it), historical sources, notes and the author’s hypotheses; every hypothesis states what result would show it wrong. So that code stays intact in print, programs and their output use ASCII characters only; order states and architectures carry English abbreviations, listed below.
Note
Code key: NEW, created; PEND, receipt uploaded; PROV, provisionally released; OK, verified; REJ, rejected; REV, revoked after a charge-back; dev, device fingerprint; pay, payment account; net, IP subnet; FCFS, first come first served; PS, processor sharing; SOLO, one shared node; EACH, one node per site; PAIR, active and standby nodes; HOLD, release after verification; OPTIMISTIC, release first, audit later.
Disclosure
The author uses the works of 5D Library, including this book, as the methodological basis of his community courses, the 5D Ascension Cards (Dimensional Shift Card Decks) and the Yafu AI knowledge base, and develops and runs paid online reading software on traditional divinatory and mind-body themes and a multi-site network (automated payment collection and verification, affiliate and invitation programmes, a shared program kernel and multi-domain sites); the models of this book apply directly to those systems, so he has a direct commercial interest in its subject. The book promotes no software, course, card deck or service, uses no user, transaction or operations data from the author’s businesses, and accepts no sponsorship. All its models are offered for mathematical study and teaching only and constitute no promise that any reading comes true and no investment, pricing, legal, security or other business advice. The experiment in Chapter 8 must be carried out with pre-registered code by an independent analyst who has no financial relationship with the author, and its results will be published whether positive or negative.
Fan, Y. (2026). Zero-Touch Multi-Site Fault Tolerance, Payment Anti-Fraud State Machines and Passive Cashflow Queuing: Receipt-Hash Deduplication, Self-Referral Blocking, Host-Header Routing and Availability Bounds [零人工多站点容错架构、支付防欺诈状态机与被动现金流排队论] (Version 1.0.0). 5D Library. https://doi.org/10.5281/zenodo.24090201 · Licensed under Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0).