← Coinbase Interview Insights

Coinbase·Software Engineer·Onsite - System Design / Architecture·Senior

Senior
Jun 2026

Summary

System design round at Coinbase for a software engineer role, focused entirely on front-end architecture for a crypto trading platform. Pretty deep dive, way more breadth than I expected for a single session.

Questions Asked (6)

Q1

Walk through how you would design the front-end architecture for a retail cryptocurrency spot trading web app, covering the core screens: a market page with live order book and charting, portfolio and order management, and authentication with session handling.

System DesignTechnical Trade-offs
Author's notes

This is a big open-ended question and I spent probably too long on stack choices before getting to the actual architecture.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints (e.g., scale, latency, real-time data volume) before diving into architecture. Then, structure your answer around the core screens, explaining how you would design each component, the data flow, and the trade-offs involved. Emphasize modularity, performance, and security throughout.

Pro tip: Demonstrate awareness of real-time data challenges by discussing WebSocket management, efficient state updates, and fallback strategies. Also, highlight security best practices like token handling and session management, which are critical for a crypto trading app.

1. Clarify Requirements and Constraints

Ask questions to understand scale (users, order book updates per second), latency requirements, supported devices, and regulatory constraints. This shows you prioritize understanding the problem before designing.

2. High-Level Architecture Overview

Outline the overall front-end architecture: SPA vs MPA, choice of framework (e.g., React), state management, routing, and how real-time data will be handled. Mention separation of concerns and modular design.

3. Design Core Screens

For each screen (market page, portfolio/order management, authentication), describe the components, data requirements, and interactions. Explain how you would handle real-time updates for order book and charting, and how you would manage state for portfolio and orders.

4. Address Cross-Cutting Concerns

Discuss performance optimizations (e.g., virtualized lists, Web Workers for charting), security (e.g., token storage, CSRF protection), and error handling. Also cover testing and deployment strategies.

5. Discuss Trade-offs and Alternatives

Explain the trade-offs in your choices (e.g., using WebSockets vs polling, Redux vs Context API) and how you would validate and iterate on the architecture.

Key Points to Mention

  • Real-time data handling: WebSockets for order book and trades, with fallback to polling; efficient state updates using immutability and batching.
  • Charting library selection: Trade-offs between performance and features (e.g., TradingView, Highcharts, or custom WebGL-based solution).
  • State management: Centralized store (Redux, MobX) vs component state; handling high-frequency updates without blocking UI.
  • Authentication and session management: Secure token storage (httpOnly cookies vs localStorage), refresh token rotation, and session expiration handling.
  • Performance optimizations: Virtualized order book, Web Workers for heavy computations, code splitting, and lazy loading.
  • Security considerations: XSS prevention, CSRF protection, secure WebSocket connections (wss), and input validation.

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

Q2

How would you structure the WebSocket layer for real-time order book and trade feed updates, and how do you handle reconnections or degraded network conditions?

System DesignAPI & Integrations
Author's notes

This is where I felt most comfortable.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements (e.g., latency, throughput, consistency) and then propose a layered architecture: connection management, subscription handling, message serialization, and resilience mechanisms. Emphasize trade-offs between push vs. pull, state reconciliation, and client-side buffering to handle reconnections and degraded networks.

Pro tip: Demonstrate awareness of exchange-specific constraints like rate limits, sequence gaps, and the need for snapshot + delta synchronization. Mention that you'd design for idempotency and at-least-once delivery with client-side deduplication.

1. Clarify Requirements and Constraints

Ask about expected update frequency, number of concurrent connections, latency SLAs, and consistency requirements (e.g., must the order book be exactly correct?).

2. Design the Connection and Subscription Layer

Propose a WebSocket gateway that handles authentication, multiplexing multiple channels (order book, trades) over a single connection, and manages subscriptions with unique IDs.

3. Define Message Protocol and State Management

Use a compact binary format (e.g., Protobuf) for efficiency. For order books, send initial snapshot then incremental deltas with sequence numbers; for trades, stream individual events with timestamps.

4. Handle Reconnections and Degraded Networks

Implement exponential backoff with jitter for reconnects, client-side buffering of messages during disconnection, and a resync protocol that requests a new snapshot if sequence gaps are detected.

5. Monitor and Optimize

Discuss metrics (latency, message rate, error rates), alerting on disconnects, and strategies like heartbeat/ping-pong to detect dead connections and adaptive throttling under load.

Key Points to Mention

  • Use of WebSocket subprotocols or multiplexing to handle multiple data streams efficiently.
  • Sequence numbers and checksums to detect gaps or corruption in order book updates.
  • Client-side order book reconstruction with snapshot + delta and handling of out-of-order messages.
  • Reconnection strategy: exponential backoff with jitter, capped retries, and fallback to REST polling if needed.
  • Heartbeat mechanism (ping/pong) to detect stale connections and trigger reconnects.
  • Backpressure handling: buffering, dropping non-critical updates, or applying flow control to avoid overwhelming the client.

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

Q3

The order book can have hundreds of rows updating multiple times per second. How do you keep rendering performant without freezing the UI?

System DesignTechnical Trade-offs
Author's notes

Blanked for a second on the exact terminology and said something like 'virtualized list' before remembering react-virtual.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging the performance challenge and the need to decouple data updates from rendering. Then, propose a layered solution: efficient data handling (e.g., Web Workers, throttling), optimized rendering (e.g., virtualization, batching), and UI responsiveness techniques (e.g., requestAnimationFrame, time slicing). Finally, discuss trade-offs and how you would measure and iterate.

Pro tip: Mention that you would profile first to identify bottlenecks before optimizing, and consider using React's concurrent mode or similar time-slicing techniques to keep the UI responsive.

1. Clarify requirements and constraints

Ask about the expected update frequency, row count, and whether all rows need to be visible at once. This shows you think about the problem context before jumping to solutions.

2. Decouple data ingestion from rendering

Use Web Workers to process incoming data and throttle or batch updates to avoid overwhelming the main thread. Consider using a virtualized list to render only visible rows.

3. Optimize rendering with batching and scheduling

Batch DOM updates using requestAnimationFrame or libraries like React Virtualized. Use time slicing (e.g., React Concurrent Mode) to break rendering work into chunks.

4. Implement efficient data structures and diffing

Use immutable data structures and keys to help the framework efficiently diff and update only changed rows. Avoid unnecessary re-renders with memoization.

5. Measure, monitor, and iterate

Profile with browser dev tools to identify bottlenecks. Set performance budgets and continuously monitor in production to ensure smooth UX.

Key Points to Mention

  • Virtualization/windowing to render only visible rows
  • Web Workers for off-main-thread data processing
  • Throttling/debouncing updates and batching DOM writes
  • requestAnimationFrame and time slicing for smooth animations
  • Immutable data structures and memoization to minimize re-renders
  • Performance profiling and monitoring to validate optimizations

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

Q4

What reusable components would you build for a trading-specific design system, and how would you approach accessibility for something like an order book table or a price input field?

System DesignTechnical Trade-offs
Author's notes

Talked about a base component layer (buttons, inputs, modals) and then trading-specific ones on top like OrderBookRow, PriceDisplay with color-coded direction, and a PlaceOrderForm.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining the core reusable components needed for a trading interface, such as order book, price input, and trade form, emphasizing their unique requirements like real-time updates and precision. Then, discuss accessibility strategies for each, focusing on keyboard navigation, screen reader support, and ARIA roles, while balancing performance and usability.

Pro tip: Demonstrate awareness of the trade-offs between accessibility and performance in high-frequency trading UIs, and mention specific techniques like virtualized rendering with proper ARIA attributes to handle large datasets without sacrificing accessibility.

1. Identify Core Trading Components

List essential reusable components like order book, price input, order form, trade history, and depth chart, explaining their roles in a trading interface.

2. Define Component API and Behavior

For each component, describe key props, state management, and interactions, such as real-time data updates, precision handling, and validation.

3. Address Accessibility for Order Book

Explain how to make an order book table accessible: use semantic table markup, ARIA roles for dynamic updates, keyboard navigation, and screen reader announcements for price changes.

4. Address Accessibility for Price Input

Detail accessibility features for price input: proper labeling, input constraints, error handling, keyboard support, and ARIA attributes for validation and formatting.

5. Discuss Trade-offs and Testing

Highlight trade-offs between accessibility and performance, and mention testing strategies like automated a11y tests and manual screen reader testing.

Key Points to Mention

  • Real-time data updates and efficient rendering (e.g., virtual scrolling) for order book
  • Precision and formatting for price input (e.g., decimal handling, locale support)
  • Keyboard navigation and focus management for complex tables and inputs
  • ARIA live regions for announcing dynamic changes in order book
  • Semantic HTML and ARIA roles for accessibility
  • Performance considerations: debouncing, throttling, and avoiding excessive DOM updates

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

Q5

How would you handle security concerns on the front end, specifically around XSS, CSRF, and token storage for an authenticated trading app?

System DesignTechnical Trade-offs
Author's notes

Short answer: httpOnly cookies for session tokens, not localStorage.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by acknowledging that front-end security is a shared responsibility with the backend, then systematically address XSS, CSRF, and token storage with concrete mitigations. Emphasize defense-in-depth and trade-offs, especially for a high-stakes trading app where security and user experience must be balanced.

Pro tip: Mention that you would use a combination of short-lived access tokens in memory and refresh tokens in HttpOnly cookies, and highlight the importance of Content Security Policy (CSP) as a strong second line of defense against XSS.

1. Acknowledge the threat model

Briefly state that for a trading app, the main risks are account takeover, data leakage, and unauthorized trades. This shows you understand the business impact.

2. Address XSS prevention

Explain output encoding, input sanitization, using frameworks like React that auto-escape, and enforcing a strict CSP. Mention avoiding dangerous APIs like innerHTML.

3. Address CSRF prevention

Describe using anti-CSRF tokens, SameSite cookies, and custom headers for state-changing requests. Note that CSRF is less of a concern if tokens are not stored in cookies.

4. Discuss token storage trade-offs

Compare localStorage (vulnerable to XSS) vs. HttpOnly cookies (vulnerable to CSRF) vs. in-memory (lost on refresh). Recommend a hybrid approach with short-lived access tokens in memory and refresh tokens in HttpOnly, Secure, SameSite cookies.

5. Summarize defense-in-depth

Conclude that no single measure is sufficient; combine secure coding, CSP, token handling, and monitoring. Mention the importance of regular security audits and staying updated on best practices.

Key Points to Mention

  • XSS: output encoding, input validation, CSP, framework protections (e.g., React's JSX escaping)
  • CSRF: anti-CSRF tokens, SameSite cookies, custom headers, double-submit cookie pattern
  • Token storage: trade-offs between localStorage, sessionStorage, HttpOnly cookies, and in-memory storage
  • Hybrid token approach: short-lived access tokens in memory, refresh tokens in HttpOnly cookies with rotation
  • Defense-in-depth: multiple layers (CSP, secure cookies, token binding, monitoring)
  • Backend collaboration: secure token issuance, validation, and revocation

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

Q6

How would you approach testing this application across unit, integration, and end-to-end layers?

System DesignTechnical Trade-offs
Author's notes

Unit tests for pure logic like order book diff functions and price formatters, component tests with something like Testing Library for the form and order book components, and e2e with Playwright covering the critical path of login, place order, see it in open orders.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the application's architecture and critical user flows, then describe a testing strategy that balances coverage and speed across the three layers. Emphasize how you'd prioritize tests based on risk and business impact, especially in a fintech context like Coinbase.

Pro tip: Mention the testing pyramid and how you'd avoid over-reliance on slow E2E tests by pushing coverage down to unit and integration layers. Also highlight the importance of test data management and environment parity for reliable integration and E2E tests.

1. Clarify scope and architecture

Ask about the application's components, dependencies, and critical user journeys to tailor the testing approach. Identify what can be tested in isolation versus what requires integration.

2. Define the testing pyramid strategy

Propose a balanced distribution: many fast unit tests, fewer integration tests, and a minimal set of E2E tests covering key flows. Explain how this optimizes feedback speed and maintenance cost.

3. Detail each layer's focus and tools

For unit: test individual functions/classes with mocks. For integration: test interactions between modules, databases, and external services. For E2E: test full user workflows through the UI or API.

4. Address trade-offs and practical concerns

Discuss trade-offs like test flakiness, execution time, and maintenance. Mention strategies for test data, environment consistency, and CI/CD integration.

5. Prioritize based on risk and business impact

Explain how you'd prioritize testing efforts on high-risk areas (e.g., payment processing, security) and use risk-based testing to allocate resources effectively.

Key Points to Mention

  • Testing pyramid: unit > integration > E2E in quantity
  • Mocking and stubbing for unit and integration tests
  • Contract testing for service boundaries
  • Test data management and environment parity
  • CI/CD pipeline integration and parallelization
  • Risk-based prioritization for critical paths

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