Scenario:
You are designing a system for a bank, which allow the clients to deposit and withdraw money from their account.
For example, let's say this is a business checking account with $X of balance in the account.
The business account is shared among different employees across the world. So there could be multiple people depositing/withdrawing money from the account frequently from different places in the world.
How do you design this system so that you can have the minimal transaction latency of money deposits/withdrawals but always making sure you never accidently overdraw (withdrawing below 0 balance)?
Follow ups: