Design (LLD) a cryptocurrency exchange platform - Machine CodingSubhahu JainΒ·Jul 15, 2023Β·7 min readTable of contentsIssues in above designπ₯ Problem 1: Wallet Uses double for Money (π¨ Critical)β What we Didβ Why This Is a Fatal MistakeSolutionπ₯ Problem 2: Wallet Mutates State Directly (No Ledger)β What we Didβ Why This Is DangerousSolutionπ₯ Problem 3: Orders Exist Without an Order Bookβ What we Didβ Whatβs MissingSolutionπ₯ Problem 4: No Order Lifecycleβ What we Didβ Real Orders Have StatesSolutionπ₯ Problem 5: Balance Updates Are Observer-Based (Wrong)β What we Didβ Why This Is UnsafeSolutionπ₯ Problem 6: Deposit & Withdrawal Are Local Operationsβ What we Didβ Real Crypto RealitySolutionπ₯ Problem 7: No Reservation of Funds During Order Placementβ What we MissedSolutionπ₯ Problem 8: Security Is Just Mentioned, Not Designedβ What we Claimedβ What ExistsSolutionπ₯ Problem 9: MVC Is a Red Herringβ Why MVC Is Misused HereSolutionPythonBeginner DevelopersJavaScriptProgramming BlogsNode.js