Coinbase is a leading North American crypto exchange. Its engineering interviews test solid algorithms and data structures, but also lean hard on high-concurrency, strongly-consistent trading system design. Organized from an oavoservice student's Coinbase debrief, this piece lays out the full flow from CodeSignal OA through the technical phone screen to onsite system design, with high-frequency coding problems and design talking points—a practical reference for grinding problems and prepping interviews. If you need OA assist or VO live support, you can follow this same track.
1. Coinbase Interview Flow
| Stage | Format | Duration | Focus |
|---|---|---|---|
| Online Assessment (OA) | CodeSignal | 70–90 min | 3–4 algorithm problems, overall score |
| Technical Phone Screen | Coding | 45–60 min | LeetCode medium, communication and edge cases |
| Onsite VO | 4–5 rounds | Half day | Coding x2 + system design + behavioral + manager |
Coinbase uses the standard CodeSignal framework. The OA is medium to upper-medium difficulty, and problems are often wrapped in trading, wallet, or ledger scenarios. The onsite system design round carries heavy weight and often decides the offer.
2. OA Problem 1: Portfolio Valuation (Hash Aggregation)
Problem
Given a list of holdings (symbol, amount) and a live price table prices[symbol], compute the account's total value. The same symbol may appear multiple times, so merge first.
Approach
Use a hash map to accumulate holdings per symbol, then multiply by price and sum. One pass does it; skip or treat as zero any symbol missing from the price table.
from collections import defaultdict
def portfolio_value(holdings, prices):
totals = defaultdict(float)
for symbol, amount in holdings:
totals[symbol] += amount # merge holdings of the same symbol
value = 0.0
for symbol, amount in totals.items():
value += amount * prices.get(symbol, 0.0)
return value
Time complexity: O(n). Space complexity: O(k), where k is the number of distinct symbols. The point is hash aggregation and robust handling of missing keys.
3. OA Problem 2: Simplified Order Matching (Two Heaps)
Problem
Maintain a mini order book: buy orders queue from highest price to lowest, sell orders from lowest to highest. For each incoming order, if it can match a counterparty (buy price >= sell price), match it; return the number of trades.
Approach
Classic two heaps: buys in a max-heap, sells in a min-heap. When a new order arrives, repeatedly check whether the two tops can match; pop and count if so, otherwise push.
import heapq
def match_orders(orders):
buys, sells = [], [] # buys: max-heap (negated); sells: min-heap
trades = 0
for side, price in orders:
if side == "buy":
heapq.heappush(buys, -price)
else:
heapq.heappush(sells, price)
# top buy price >= top sell price means a trade can happen
while buys and sells and -buys[0] >= sells[0]:
heapq.heappop(buys)
heapq.heappop(sells)
trades += 1
return trades
Time complexity: O(n log n). Space complexity: O(n). The trick is realizing you need two heaps facing opposite directions, plus looping the match until the tops no longer cross.
4. OA Problem 3: API Rate Limiting (Sliding Window)
Problem
Given a stream of timestamped requests and a per-user per-window cap, decide whether each request is accepted or throttled. Coinbase's public API cares a lot about rate limiting, so this one is almost always present.
Approach
Keep a timestamp queue per user. When a request arrives, evict timestamps outside the window first, then check whether the queue length is below the cap.
from collections import defaultdict, deque
def rate_limit(requests, window, limit):
seen = defaultdict(deque)
result = []
for user, ts in requests:
q = seen[user]
while q and q[0] <= ts - window: # drop requests outside the window
q.popleft()
if len(q) < limit:
q.append(ts)
result.append(True) # accepted
else:
result.append(False) # throttled
return result
Time complexity: O(n)—each timestamp enters and leaves the queue at most once. Space complexity: O(users x limit).
5. Onsite System Design: Design a Crypto Wallet / Trading Service
The system design round is Coinbase's centerpiece. A common prompt is "design a wallet service that supports deposits, withdrawals, and placing orders." Main thread of the answer:
- Consistency first: balance changes must be strongly consistent—use database transactions plus optimistic or row locks to avoid double-spends.
- Idempotency: deposit callbacks and order endpoints need idempotency keys so network retries don't double-record.
- Ledger design: use an append-only double-entry ledger (debit/credit) for every flow; derive balances from the ledger for auditability and reconciliation.
- Async and reconciliation: on-chain confirmations go through an async queue; a scheduled job reconciles the internal ledger against on-chain state.
- Scaling: route read-heavy balance queries through a cache; shard hot accounts.
The interviewer will follow up with "what if the callback repeats" and "how do you prevent overselling," so nailing idempotency and consistency is key.
6. Prep Tips
- Algorithms: hashing, heaps, sliding window, and graphs are high frequency—drill them timed at CodeSignal's upper-medium pace.
- System design: focus on the trading-system mother problem: idempotency, consistency, ledger, reconciliation.
- Communication: narrate as you code, and proactively state complexity and edge cases.
FAQ
Q1: What platform does Coinbase use, and how many problems?
CodeSignal, 70–90 minutes, 3–4 algorithm problems scored overall. Medium to upper-medium difficulty, often wrapped in trading / wallet / ledger scenarios, testing hashing, heaps, sliding window, and graphs.
Q2: How important is system design at Coinbase?
Very. The onsite usually has a full system design round, often on wallet / trading / ledger systems, focused on consistency, idempotency, and reconciliation—it frequently decides the offer.
Q3: Do I need to know blockchain to interview at Coinbase?
You don't need deep protocol knowledge. Understanding the deposit/withdrawal flow, that on-chain confirmation is async, and idempotent callbacks is enough—the core is still algorithms and system design.
Q4: How do I prep efficiently for the Coinbase OA?
Drill hashing / heaps / sliding window / graphs in timed blocks, and focus system design on the trading mother problem. For timed mocks, live think-aloud practice, or OA assist / VO live support, contact oavoservice for a tailored Coinbase track.
Preparing for a Coinbase interview?
Coinbase runs a CodeSignal OA plus a design-heavy onsite, valuing consistency and engineering rigor. oavoservice offers full-flow Coinbase coaching: timed CodeSignal high-frequency mocks, a trading / wallet / ledger system design track, idempotency and consistency polishing, role-based question prediction, plus OA assist / VO live support and live think-aloud practice. Coaches include senior engineers with exchange and big-tech backgrounds to train your code and your delivery together.
Add WeChat Coding0201 now and get Coinbase real questions and coaching.
Contact
- WeChat: Coding0201
- Email: [email protected]
- Telegram: @OAVOProxy