---
title: "Comment by Parsa Aftabi on \"Building a Financially Correct Wallet and Settlement System in Go\" | Hashnode"
description: "Great framing. \"what correct means\" is exactly the hard part. The mechanisms I'd want to see named. Idempotency keys on every transfer, so retries never double-"
url: "https://hashnode.com/posts/building-a-financially-correct-wallet-and-settlement-system-in-go/6ac38c9a1660a1707daf5671/comment/6ac964834f787159f5dfe22d"
---

[Discussion](https://hashnode.com/posts/building-a-financially-correct-wallet-and-settlement-system-in-go/6ac38c9a1660a1707daf5671)

Comment [Building a Financially Correct Wallet and Settlement System in Go](https://hashnode.com/posts/building-a-financially-correct-wallet-and-settlement-system-in-go/6ac38c9a1660a1707daf5671)

[Parsa Aftabi](https://hashnode.com/@parsaaftabi)

[Oct 9](https://hashnode.com/posts/building-a-financially-correct-wallet-and-settlement-system-in-go/6ac38c9a1660a1707daf5671/comment/6ac964834f787159f5dfe22d)

Great framing. "what correct means" is exactly the hard part. The mechanisms I'd want to see named. Idempotency keys on every transfer, so retries never double-move money. An immutable double-entry ledger: never update balances in place, balances are a derived projection over the entry log. Debit/credit pairs inside a single DB transaction with proper isolation. And settlement retries keyed off the transfer record's state machine, not blind re-submission. Get those right and most "ghost money" bugs disappear.
