No double spend in a betting wallet

A architecture exercise of about 35 minutes: read the statement, solve «No double spend in a betting wallet» in the browser and get a review like in a real interview.

Architecture · 35 min
Loading…

Statement

A sports betting platform keeps each user's balance in a wallet: deposits, bets, winnings and withdrawals. Support gets complaints about bets charged twice when the app retries and about balances going negative. Design how you guarantee that no operation is charged twice and nobody spends money they don't have, without slowing the platform down during match peaks.