Where moneygoes missing.
Every way a payment system loses money, as a game you can break and an article that shows the real fix.
- 01ConcurrencyLive
Double-Spend
You are the attacker. One $100 balance, up to 200 parallel debits, five defences to break. Three of them pay you. Two do not.
- 88
- Attacks
- $20,494.00
- Extracted from naive
- $0.00
- Extracted from defended
- 02ConcurrencyLive
Idempotency
A client retries one charge twenty times at once. No key: twenty charges. A key checked in code: still several. A key enforced by the database: one.
- 47
- Storms
- 806
- Duplicate charges refused
- 03DeliveryLive
Webhooks
Your own inbox with a signed endpoint. Replay an event five times in parallel, deliver captured before authorized, send a bad signature. Watch the handler stay correct.
- 219
- Deliveries
- 122
- Duplicates blocked
- 04StateLive
State Machine
A payment with five states. The unguarded version lets you refund a payment twice and capture a voided one. The guarded version has a transition table and a version column.
- 291
- Transitions
- 149
- Illegal transitions blocked
- 05StateLive
Ledger
Balances stored as numbers drift the first time a process dies between two updates. A double-entry ledger cannot drift: every transaction sums to zero or does not exist.
- 393
- Transactions
- $625.00
- Drift refused
- 06ArithmeticLive
Money Math
Floats, splits and minor units. Divide $100 by three and get the cent back. Runs in your browser, nothing to store.
Open