Design Staking Rewards Accrual and Distribution

Last updated: November 29, 2026

Quick Overview

Design the system that tracks customers' staked balances across proof-of-stake networks, attributes on-chain rewards to each customer according to their share and timing, takes the commission, and pays rewards into their accounts.

Coinbase
System Design
Software Engineer
Coinbase
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the system that tracks customers' staked balances across proof-of-stake networks, attributes on-chain rewards to each customer according to their share and timing, takes the commission, and pays rewards into their accounts.

Coinbase staking pools customer assets into validators, so the platform must turn rewards earned per validator per epoch into per-customer credits that are fair and auditable. The interviewer probes time-weighted attribution, ledger integration and how you handle slashing and unbonding periods.

What the Interviewer Expects
  • Ingest per-validator rewards per epoch from chain data
  • Track time-weighted staked balances per customer
  • Allocate rewards proportionally with deterministic rounding
  • Apply commission and post to the ledger idempotently
  • Handle slashing, unbonding delays and chain-specific reward schedules
Key Topics to Cover
payments and ledgers
batch pipelines
proportional allocation
reconciliation
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you allocate rewards when a user stakes or unstakes mid-epoch?
  • How do you make sure the sum of allocations equals the on-chain reward to the last base unit?
  • How would you show an estimated APY before rewards arrive?
  • How do you handle a slashing event that reduces principal?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Support several networks with different reward cadence (Ethereum roughly per epoch, others daily). Credit rewards to customers at least daily, net of commission. Allocation must be exact and explainab...

High-Level Design

A stake-state service records customer stake events (stake, unstake request, unbond complete) from the ledger and produces per-customer stake balance per period. A chain rewards ingester records rewar...


Submit Your Answer
Markdown supported