Preparing your design workspace

Loading the problem and your latest saved attempt…

Design a Peer-to-Peer Money Transfer System

Design a correct, retry-safe service that moves an internal balance between two registered users and exposes one durable transfer outcome.

Problem statement

For this exercise, assume registered users hold an available balance in one currency and can send part of that balance to another registered user. The recipient has already been resolved to a stable user identifier.

A committed transfer atomically debits the sender and credits the recipient, conserves value, and remains immutable. Concurrent sends must never make the sender's available balance negative. Clients may retry after a timeout, so one logical request must produce one durable transfer and one stable outcome.

Both participants can retrieve transfer status, current balance, and ordered transfer history.

The source identifies only a Venmo-like peer-to-peer money-transfer system and supplies no numeric workload or service-level targets. State and justify any traffic, latency, retention, availability, or geography assumptions before using them.

Funding and withdrawal rails, bank or card settlement, identity and contact discovery, social feeds, comments, fees, foreign exchange, disputes, chargebacks, merchant checkout, and compliance-policy design are outside scope.

What to build

  1. For this exercise, an authenticated user can idempotently send a positive amount from their available balance to another registered user and receive a stable transfer identifier and outcome.
  2. For this exercise, either participant can retrieve an authorized transfer's committed or rejected outcome after a retry, timeout, or reconnect.
  3. For this exercise, each participant can read an authoritative current balance and cursor-paginated ordered transfer history without observing a one-sided committed transfer.

At scale

  • For this exercise, assume concurrent transfer attempts and client retries may target the same sender; committed debits must never make the sender's available balance negative.
  • For this exercise, assume responses and internal delivery messages can be duplicated, delayed, or lost, while one logical send must expose one stable durable outcome.
  • The source supplies no numeric traffic, latency, retention, geography, or recovery targets; candidates should state and justify any such assumptions before sizing or partitioning the design.