← Coinbase Interview Insights

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

SeniorPrefer not to say
May 2026

Summary

Coinbase system design round for a Software Engineer role, focused entirely on building a comment component in React. The scope was way broader than I expected, covering everything from pagination to optimistic UI to accessibility to live chat scenarios.

Questions Asked (7)

Q1

Design and implement a reusable React comment component that supports submitting new comments and deleting existing ones.

System DesignTechnical Trade-offs
Author's notes

Seemed like the easy warmup but they kept pushing on the interface design.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then outline a component architecture that separates presentational and container concerns. Discuss state management, API integration, and optimistic updates, and finally walk through the implementation of key parts like the comment list, form, and delete functionality.

Pro tip: Emphasize trade-offs between controlled vs uncontrolled components and local vs global state, and mention how you'd handle edge cases like optimistic UI and error rollback to demonstrate production readiness.

1. Clarify Requirements

Ask about expected features: nested comments, real-time updates, authentication, pagination, and error handling. Confirm the scope to avoid over-engineering.

2. Design Component Architecture

Propose a component tree: CommentSection (container), CommentList, CommentItem, and CommentForm. Decide on state ownership and whether to use Context or a state management library.

3. Define Data Flow and API Integration

Outline how comments are fetched, submitted, and deleted via API calls. Discuss state updates (e.g., optimistic updates) and error handling with rollback.

4. Implement Key Components

Walk through the implementation of CommentForm (controlled input, submit handler) and CommentItem (delete button, confirmation). Highlight reusability and prop interfaces.

5. Address Edge Cases and Trade-offs

Discuss handling loading states, errors, empty states, and accessibility. Compare trade-offs like optimistic vs pessimistic updates and local vs global state.

Key Points to Mention

  • Component reusability through props and composition
  • State management: local state vs Context vs Redux
  • Optimistic UI updates for better UX
  • Error handling and rollback on failed API calls
  • Accessibility (ARIA roles, keyboard navigation)
  • Performance considerations (memoization, virtualization for long lists)

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

Q2

How would you implement backend-driven pagination with infinite scroll? Walk through scroll detection, deduplication of requests, detecting end-of-list, and empty state handling.

System DesignAPI & Integrations
Author's notes

I talked through IntersectionObserver and felt okay there.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying requirements and constraints, then walk through the client-side implementation details for scroll detection, request deduplication, end-of-list detection, and empty state handling. Emphasize backend API design (cursor-based pagination) and how it integrates with the frontend to ensure a smooth infinite scroll experience.

Pro tip: Mention the importance of using a stable cursor (e.g., timestamp + ID) to avoid duplicates or missing items when data changes, and discuss how to handle race conditions and cancellation of in-flight requests.

1. Clarify requirements and constraints

Ask about expected data volume, update frequency, and whether the list is sorted. Confirm if the backend supports cursor-based pagination and what the response format looks like.

2. Design backend pagination API

Propose a cursor-based pagination API that returns a list of items and a next_cursor. Explain why cursor-based is preferred over offset-based for infinite scroll (consistency, performance).

3. Implement scroll detection and request triggering

Use IntersectionObserver or scroll event listeners with throttling to detect when the user nears the bottom. Trigger a fetch only if not already loading and if there is a next_cursor.

4. Handle deduplication and request management

Maintain a loading flag to prevent concurrent requests. Deduplicate items by unique ID when appending new data. Cancel or ignore stale requests using AbortController or request IDs.

5. Detect end-of-list and handle empty state

When next_cursor is null or empty, set a flag to stop further requests and show an end-of-list message. If the first request returns no items, display an empty state with appropriate messaging.

Key Points to Mention

  • Cursor-based pagination (e.g., using a unique, sequential field like created_at + id) to avoid duplicates and ensure stable ordering.
  • IntersectionObserver for efficient scroll detection with a sentinel element, and throttling/debouncing to avoid excessive requests.
  • Request deduplication via a loading state and ignoring responses from outdated requests (e.g., using AbortController).
  • End-of-list detection by checking for a null/empty next_cursor and disabling further fetches.
  • Empty state handling: differentiate between initial empty state and no more items, and provide user feedback.
  • Error handling and retry logic for failed requests, with exponential backoff.

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

Q3

How do you model and surface the different loading and error states in this component, such as initial load, loading more, submitting, and deleting?

System DesignTechnical Trade-offs
Author's notes

Pretty mechanical question but I overthought it.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by defining a clear state model that distinguishes each async operation (initial load, load more, submit, delete) and their possible statuses (idle, loading, success, error). Then explain how you surface those states in the UI using a combination of local component state and derived flags, ensuring each state is visually distinct and accessible. Finally, discuss trade-offs like granular vs. global state, optimistic updates, and error recovery strategies.

Pro tip: Emphasize that you avoid a single boolean like `isLoading` because it conflates different operations and leads to UI bugs; instead, use a state machine or separate status fields per operation to keep the UI predictable and testable.

1. Identify all async operations and their states

List each operation (initial load, load more, submit, delete) and define the possible states for each: idle, loading, success, error. Consider edge cases like partial success or cancellation.

2. Choose a state management approach

Decide between local component state (e.g., useState/useReducer) and global state (e.g., Redux, Context) based on scope and complexity. For multiple operations, use a reducer or state machine to manage transitions cleanly.

3. Map states to UI representations

For each state, define the visual feedback: spinners, skeleton screens, disabled buttons, inline error messages, toasts, or retry buttons. Ensure each operation's state is independently represented to avoid conflicting UI.

4. Handle error states and recovery

Describe how errors are surfaced (e.g., inline, toast) and how users can recover (retry, dismiss). Discuss whether to preserve previous data on error and how to avoid blocking the entire UI.

5. Discuss trade-offs and optimizations

Talk about optimistic updates for submit/delete, debouncing load more, and avoiding race conditions. Mention testing and accessibility considerations for each state.

Key Points to Mention

  • Use separate state variables or a state machine per operation to avoid conflating loading states.
  • Distinguish between initial load (full-page skeleton) and load more (inline spinner at bottom).
  • For submit and delete, consider optimistic updates with rollback on error for better UX.
  • Ensure error states are actionable: provide retry, dismiss, or fallback UI.
  • Avoid global loading overlays that block the entire UI; prefer localized feedback.
  • Mention accessibility: aria-busy, aria-live regions for errors, and disabled states.

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

Q4

What strategies would you use to prevent duplicate comment submissions, both on the client and server side?

System DesignTechnical Trade-offs
Author's notes

I covered disabling the submit button and tracking in-flight requests.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by framing the problem as a defense-in-depth strategy, covering both client-side UX improvements and server-side idempotency guarantees. Then walk through specific techniques for each layer, emphasizing trade-offs like latency, complexity, and user experience. Conclude by tying it back to Coinbase's need for reliability and data integrity in a high-scale financial system.

Pro tip: Mention that client-side prevention is for UX only and never a security guarantee; the server must be the ultimate source of truth. Also, highlight the importance of idempotency keys for handling retries in distributed systems, which is critical for financial transactions.

1. Clarify requirements and constraints

Ask about scale, latency requirements, and whether the system is distributed. This shows you consider context before diving into solutions.

2. Client-side strategies

Discuss disabling the submit button after click, debouncing, and optimistic UI updates. Emphasize these are for UX and not security.

3. Server-side strategies

Cover idempotency keys, unique constraints, deduplication windows, and rate limiting. Explain how each prevents duplicates at different levels.

4. Trade-offs and edge cases

Analyze trade-offs like added latency, storage overhead, and complexity. Discuss edge cases like network retries and race conditions.

5. Monitoring and iteration

Mention logging duplicate attempts, alerting, and iterating based on metrics. This shows a production mindset.

Key Points to Mention

  • Idempotency keys: client generates a unique key per submission, server uses it to deduplicate.
  • Database unique constraints: e.g., unique index on (user_id, comment_hash) or (user_id, timestamp) to prevent duplicates.
  • Client-side: disable button, debounce, and use optimistic UI to prevent accidental double-clicks.
  • Rate limiting: prevent abuse and accidental rapid submissions.
  • Trade-offs: idempotency keys add storage and lookup overhead; unique constraints may cause errors that need handling.
  • Distributed systems: consider eventual consistency and race conditions; use distributed locks or atomic operations.

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

Q5

Describe how you'd implement optimistic UI for posting and deleting comments, including rollback on failure and conflict resolution.

System DesignTechnical Trade-offs
Author's notes

This was the most interesting part of the whole interview for me.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by outlining the user experience goal: immediate feedback for posting and deleting comments, with seamless rollback on failure. Then describe the technical implementation: optimistic updates in the UI state, API calls with idempotency, and conflict resolution strategies like versioning or timestamps. Finally, discuss trade-offs such as complexity, consistency, and user perception.

Pro tip: Emphasize the importance of idempotency keys for retries and a robust conflict resolution strategy that prioritizes user intent, especially in a financial context like Coinbase where data integrity is critical.

1. Define the optimistic update flow

Explain how the UI immediately reflects the new comment or removal, while the actual API request happens asynchronously. Mention maintaining a temporary client-side ID for new comments.

2. Handle API call and rollback

Describe sending the request with idempotency keys, and on failure, reverting the UI state and showing an error message. For deletes, restore the comment if the deletion fails.

3. Implement conflict resolution

Discuss strategies like versioning (ETags), timestamps, or operational transforms to detect and resolve conflicts when the server state differs from the optimistic update.

4. Ensure consistency and error handling

Cover retry mechanisms, exponential backoff, and how to handle partial failures. Mention the importance of idempotency to avoid duplicate comments.

5. Discuss trade-offs and alternatives

Compare optimistic UI with pessimistic approaches, highlighting scenarios where optimistic UI is beneficial (e.g., low-latency, high user engagement) and where it might be risky (e.g., financial transactions).

Key Points to Mention

  • Idempotency keys to prevent duplicate submissions on retries
  • Temporary client-side IDs for new comments to map to server IDs
  • Rollback mechanisms: reverting UI state and notifying the user
  • Conflict resolution using versioning (ETags) or timestamps
  • Error handling with retries and exponential backoff
  • Trade-offs: complexity vs. user experience, consistency vs. responsiveness

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

Q6

How would you make this component work in two very different contexts: a standard video details page and a high-throughput live chat or danmaku feed? What changes in terms of architecture, state management, and performance?

System DesignTechnical Trade-offsAdaptability & Ambiguity
Author's notes

Biggest question of the session and I felt like I only got halfway there.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the two contexts and their distinct requirements, then propose a component architecture that separates core logic from context-specific rendering and state management. Discuss trade-offs between reusability and performance, and outline how you would adapt state management and optimize for high throughput in the live chat scenario.

Pro tip: Emphasize that you would first build a headless, context-agnostic core with a clear API, then create context-specific wrappers. This demonstrates architectural maturity and avoids premature optimization.

1. Clarify Requirements and Constraints

Ask questions to understand expected scale, latency requirements, and differences in user interactions for each context. Identify what 'work' means in both scenarios (e.g., rendering, data fetching, real-time updates).

2. Design a Headless Core Component

Propose a core component that encapsulates shared logic (e.g., data formatting, basic interactions) without any context-specific rendering or state. Expose a clear API for context-specific wrappers to consume.

3. Adapt State Management per Context

For the video details page, use local component state or a simple store; for the live chat, use a centralized, high-performance store (e.g., Redux with normalized state, or a custom event-driven system) to handle rapid updates and avoid unnecessary re-renders.

4. Optimize Performance for High Throughput

In the live chat context, implement virtualization, batching, and throttling; use WebSockets or SSE for real-time data; and consider offloading heavy processing to web workers. For the video page, focus on initial load and SEO.

5. Discuss Trade-offs and Extensibility

Summarize the trade-offs made (e.g., complexity vs. performance) and how the architecture allows future contexts to be added with minimal changes. Highlight testing and monitoring strategies for each context.

Key Points to Mention

  • Separation of concerns: headless core vs. context-specific UI
  • State management strategies: local vs. centralized, normalized state, immutability
  • Performance optimizations: virtualization, batching, throttling, memoization
  • Real-time data handling: WebSockets, SSE, backpressure management
  • Trade-offs: reusability vs. performance, complexity vs. maintainability
  • Scalability and extensibility: designing for future contexts

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

Q7

What accessibility considerations apply to this component, and how would you approach testing it across unit, integration, and mocked network layers?

System DesignAPI & Integrations
Author's notes

Ran out of time here so this felt rushed.

Create a free account to read the full note

AI HintsAI Generated

Suggested Approach

Start by clarifying the component's purpose and user interactions, then systematically address accessibility requirements (semantic HTML, ARIA, keyboard navigation, screen reader support) and testing strategies across unit, integration, and mocked network layers. Emphasize how accessibility and testing intertwine, especially in a financial app where reliability and inclusivity are critical.

Pro tip: Mention automated accessibility testing tools (e.g., axe-core) integrated into your test suite, and highlight the importance of manual testing with screen readers and keyboard-only navigation—this shows you understand both efficiency and real-world usability.

1. Clarify component and accessibility requirements

Ask clarifying questions about the component's functionality, target users, and any specific accessibility standards (e.g., WCAG 2.1 AA) the company follows. Identify key accessibility considerations such as semantic HTML, ARIA roles, focus management, and color contrast.

2. Outline accessibility implementation

Describe how you would implement accessibility: use native elements where possible, add ARIA attributes only when necessary, ensure keyboard navigability, provide text alternatives, and manage focus for dynamic content.

3. Design unit tests for accessibility

Explain unit tests that verify individual accessibility features: e.g., testing that buttons have accessible names, form inputs have labels, and ARIA attributes are correctly set. Use tools like jest-axe for automated checks.

4. Plan integration tests for user flows

Describe integration tests that simulate real user interactions: keyboard navigation through the component, screen reader announcements (using testing-library with user-event), and ensuring focus order is logical.

5. Incorporate mocked network layers and error states

Explain how to test accessibility when data is loading, errors occur, or network requests fail. Mock API responses to ensure that loading indicators, error messages, and retry actions are accessible and announced to assistive technologies.

Key Points to Mention

  • Semantic HTML and ARIA best practices (e.g., use native elements, avoid redundant ARIA)
  • Keyboard navigation and focus management (tab order, focus trapping in modals)
  • Screen reader compatibility and testing with tools like NVDA/JAWS/VoiceOver
  • Automated accessibility testing (axe-core, jest-axe) and manual testing
  • Testing loading, error, and empty states for accessibility (e.g., aria-live regions)
  • Mocking network requests to simulate various states and ensure accessibility is maintained

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