← Coinbase Interview Insights

Coinbase·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Coinbase software engineer interview with a coding round focused on building a small banking system from scratch. Pretty straightforward premise but the edge cases pile up fast if you're not careful about your return value contracts.

Questions Asked (1)

Q1

Design and implement a basic banking system with three operations: registering a new user, depositing funds, and transferring funds between users. Use a single hashmap to store balances and be precise about what each operation returns on success and on every failure case.

Algorithms & Data StructuresSystem DesignTechnical Trade-offs
Author's notes

The core structure clicked pretty fast, one map from user id to balance, done.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and defining the exact return values for each operation on success and failure. Then design a single hashmap to store user balances, and implement each operation with careful validation and atomicity. Finally, discuss trade-offs and potential extensions.

Pro tip: Demonstrate maturity by explicitly handling edge cases like insufficient funds, duplicate registration, and self-transfer, and by discussing how to ensure atomicity in a concurrent environment.

1. Clarify Requirements and Return Values

Ask clarifying questions about expected behavior, such as whether usernames are unique, minimum deposit amounts, and what each operation should return on success and failure. Define precise return types (e.g., boolean, error codes, or messages).

2. Design Data Structure

Choose a single hashmap (e.g., HashMap<String, Double> or HashMap<User, Balance>) to store user balances. Discuss why a single map is sufficient and how to handle concurrent access if needed.

3. Implement Operations with Validation

For each operation, outline the algorithm: register checks for duplicate user, deposit validates amount and user existence, transfer checks both users exist, sufficient funds, and prevents self-transfer. Specify return values for each case.

4. Handle Edge Cases and Errors

Enumerate all possible failure scenarios (e.g., negative deposit, non-existent user, insufficient balance) and define consistent error returns. Consider atomicity for transfer to avoid partial updates.

5. Discuss Trade-offs and Extensions

Talk about limitations of a single hashmap (e.g., no transaction history, scalability) and suggest improvements like using a database, adding locks, or supporting additional operations.

Key Points to Mention

  • Precise return values for each operation on success and failure (e.g., boolean, error codes, or messages).
  • Validation for duplicate user registration, non-existent users, negative amounts, and insufficient funds.
  • Atomicity of transfer operation to prevent partial updates (e.g., using locks or transactions).
  • Concurrency considerations if the system is multi-threaded (e.g., synchronized methods or concurrent hashmap).
  • Trade-offs of using a single hashmap: simplicity vs. lack of audit trail and scalability.
  • Potential extensions: transaction history, interest calculation, or integration with a database.

AI-generated suggestions, not part of the candidate's original notes. May be inaccurate — verify before relying on them.