Digital Wallet 00:00:01 Send fifty dollars A customer sends fifty dollars. The phone loses its connection before the confirmation arrives, so the customer presses Send again. Which part of the wallet can prove this is one transfer instead of two? The app made one key for this payment and will repeat it with every retry. Two transfers today, a known device, a known receiver. If this key were known, we would return the first result now. Lee's balance goes up. Nobody else can see it yet. All of it becomes durable in two zones, and visible. The relay sends the event. If the notification fails it is tried again; the money has moved. In this example the debit and credit are balanced entries for one intent. A successful transfer changes both sides consistently and gives the caller a stable result it can retrieve later. 00:00:59 Read an earlier outcome after a timeout The answer is lost on the way back. Transfer committed. Asha has $150. The phone lost its network. Asha does not know. The app sends the same key. The unique row exists. This transaction is rolled back. Same receiver and amount. Otherwise it would be an error. The same answer as before. A repeat carrying the same key and equivalent payload can recover the recorded result. Treat the same key with conflicting payment details as a conflict rather than silently reusing the old receipt. 00:01:37 Withdraw to an external bank Asha has $800 and a verified bank account. Verified link, identity checked, within the daily limit. The app shows 202: on its way, with a date. The worker collects payouts for the next time window and writes SUBMITTED with the file id. Weekends and holidays may not count. The money is still in pending. The statement shows it. Pending goes down and the bank mirror up. The reconciler matches each line of the statement with one entry. The wallet and the bank do not share a local database transaction. Track money reserved for withdrawal and record the external reference that will let reconciliation decide which outcome occurred. 00:02:19 Cross a storage boundary Asha is on shard 1 and Lee on shard 2. Shard 1 moves 50 to its transit account and writes an event, in one transaction. The relay publishes transfer 9. Shard 2 moves 50 from its transit account to Lee. 50 and minus 50: the two transit accounts cancel. Kafka delivers transfer 9 twice. The key exists, so nothing moves. If shard 2 is down, the money waits in transit and arrives later. When debit and credit live on different shards, an in-transit balance can represent a deliberate intermediate business state. A delayed arrival should be visible in the ledger instead of looking like newly destroyed money. 00:03:02 Two phones spend one balance $100 in the wallet and two transfers of $80. Phone and laptop send at the same moment, with different keys. The first update locks Asha's row and leaves 20. The second waits. After the commit, the second looks at the new row: 20 is less than 80. No row changes. Insufficient funds. Nothing was written for it. Both devices may display the same starting balance. Enforce the sufficient-funds check and the debit at the authoritative update so the order of arriving taps determines a valid outcome. 00:03:37 Recover a worker after sending The payouts say SUBMITTED in file F-31 before anything is sent. The worker stops while sending. A new worker finds F-31 without an answer and asks the bank about it. The bank has it, so it is not sent again. Had the bank said no, the same file with the same id would be sent. Recover from the durable withdrawal state and from what the bank can confirm. A timeout changes what the worker knows, not necessarily whether a real transfer already happened. The ledger explains where the value went. The operation identity explains why a retry did not move it again. Both are required before the customer can trust a recovered balance.