← Coinbase Interview InsightsSoftware Engineer

Coinbase·Software Engineer·Technical Phone Screen·Intermediate

Intermediate
Jun 2026

Summary

Coinbase software engineer interview with a coding round focused on building a small in-memory banking system. Pretty straightforward on the surface but the follow-up on concurrency is where things got real.

Questions Asked (2)

Q1

Design and implement an in-memory bank system with addAccount, deposit, and transfer operations. Handle invalid inputs and accounts that don't exist.

Algorithms & Data StructuresSystem Design
Author's notes

Started with a plain hashmap mapping account IDs to balances, which felt obvious enough.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then design a simple in-memory data model with accounts and balances. Implement operations with proper error handling, and discuss trade-offs like concurrency and scalability.

Pro tip: Demonstrate awareness of concurrency and atomicity, especially for transfers, and mention how you would handle race conditions in a real system.

1. Clarify Requirements

Ask about expected operations, error handling, concurrency needs, and any constraints like account ID format or balance limits.

2. Design Data Model

Propose a simple structure, e.g., a hash map from account ID to balance, and discuss why it's suitable for in-memory operations.

3. Implement Core Operations

Write pseudocode or actual code for addAccount, deposit, and transfer, ensuring input validation and existence checks.

4. Handle Errors and Edge Cases

Define error types for invalid inputs, non-existent accounts, insufficient funds, and discuss how to return meaningful errors.

5. Discuss Concurrency and Scalability

Explain how to make operations thread-safe (e.g., locks, atomic operations) and potential improvements for scale.

Key Points to Mention

  • Use of appropriate data structures (e.g., hash map) for O(1) average-time operations.
  • Input validation: check for null/empty account IDs, negative amounts, and self-transfers.
  • Error handling: define custom exceptions or error codes for invalid inputs and non-existent accounts.
  • Atomicity of transfer: ensure both debit and credit happen or neither, especially under concurrency.
  • Concurrency control: use locks or synchronized methods to prevent race conditions.
  • Testing: mention unit tests for normal and edge cases.

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

Q2

How would transfer behave under concurrent access, and what data structure choices support that?

System DesignTechnical Trade-offs
Author's notes

This is where I fumbled.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the concurrency model and consistency requirements for transfers, then discuss how different data structures (e.g., locks, queues, MVCC) support atomicity and isolation. Emphasize trade-offs between performance, scalability, and correctness, and relate to real-world systems like Coinbase's ledger.

Pro tip: Mention that transfers often involve multiple accounts, so you need to consider deadlock avoidance and idempotency. Also, highlight that using immutable data structures or append-only logs can simplify concurrency control.

1. Clarify requirements and assumptions

Ask about the expected concurrency level, consistency guarantees (e.g., ACID), and whether transfers are within a single database or across services. This sets the scope for your answer.

2. Identify concurrency challenges

Discuss issues like race conditions, lost updates, deadlocks, and phantom reads that can occur when multiple transfers access shared accounts concurrently.

3. Choose data structures and concurrency control mechanisms

Explain how structures like locks (fine-grained vs. coarse), queues (for serialization), MVCC, or CRDTs can be used to manage concurrent transfers. Mention specific implementations (e.g., database transactions, optimistic locking).

4. Analyze trade-offs

Compare approaches in terms of throughput, latency, complexity, and fault tolerance. For example, pessimistic locking ensures consistency but reduces concurrency; optimistic locking improves performance but may cause retries.

5. Relate to real-world systems

Tie your answer to how Coinbase or similar financial systems handle transfers, such as using a ledger with double-entry accounting and distributed transactions.

Key Points to Mention

  • ACID properties and isolation levels (e.g., serializable, snapshot isolation)
  • Locking strategies: pessimistic vs. optimistic, and deadlock prevention (e.g., ordering locks)
  • Data structures: concurrent queues, atomic variables, MVCC, append-only logs
  • Idempotency and exactly-once semantics for transfers
  • Scalability considerations: sharding, partitioning, and distributed consensus (e.g., Raft, Paxos)
  • Real-world examples: database transactions, event sourcing, and two-phase commit

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