Design a Rideshare Promo & Loyalty System

Hard45 min
1 / 30
System design answer

Design a Rideshare Promo & Loyalty System

Hard45 min30 sections
understanding•10 min read

Problem Statement: A Revenue-Critical Loyalty Engine

Frames the promo and loyalty system as a high-throughput event-processing platform that directly drives rider retention and unit economics.

Problem statement

Design a rideshare promo and loyalty system that awards points to riders and drivers for completed rides, tracks tier progression (Bronze → Silver → Gold → Platinum), processes referral codes for credit attribution, and executes configurable marketing campaigns such as "10 rides = 1 free ride" or "First ride free for referred friends." The system must integrate with the core ride-completion event stream, the payment platform for credit application, and analytics for campaign ROI measurement.

This is not a simple coupon table. A promo and loyalty system is a financially-sensitive, event-driven state machine where every point represents a future monetary obligation. Double-counting a single ride event across 25 million daily rides compounds into millions of dollars in leaked credits. Missing accruals erodes trust and drives churn. The design must guarantee exactly-once processing semantics for financial events while maintaining sub-second responsiveness for user-facing tier and balance queries.

Why this problem is distinctive

A core ride-matching system optimizes for latency and availability. A loyalty system optimizes for correctness under high throughput while maintaining the appearance of immediacy. The challenge is that ride completion events arrive from thousands of driver devices, pass through payment settlement, and must trigger point accrual, tier evaluation, referral credit, and campaign matching—potentially all four—within a single transactional boundary per ride.

The loyalty system also operates on a different consistency plane than the ride itself. A ride can tolerate eventual consistency in tracking (the rider sees the driver's position update in 2-3 seconds). But a points balance shown incorrectly—showing 950 points when the user actually has 1,000 and is 50 away from Gold tier—creates support tickets and erodes program trust. The balance must be strongly consistent per user, even if the underlying event processing is asynchronous.

The four functional pillars

  1. Points Accrual Engine: Consumes ride-completion events, applies earning rules (base points, multipliers, bonus campaigns), and writes balance mutations idempotently.
  2. Tier Progression Engine: Evaluates cumulative points or ride counts against tier thresholds, handles upgrades and downgrades with grace periods, and activates tier-specific benefits.
  3. Referral & Credit System: Generates unique referral codes, tracks attribution chains (who referred whom), applies credits to both referrer and referee, and detects fraud patterns.
  4. Campaign Management Engine: Allows marketing teams to define rules (N rides → reward), budgets, eligibility criteria, A/B test cohorts, and expiration. Campaigns compose with the accrual engine via a rule-evaluation pipeline.

Public operating baseline versus design assumptions

Uber reported 150 million monthly active platform consumers and approximately 25 million trips per day in its 2023 shareholder letter. Uber One, its subscription loyalty product, reached 25 million members by Q3 2023. Lyft Pink reported 2 million subscribers in 2022. GrabRewards processes points across 8 countries in Southeast Asia with a merchant-redemption ecosystem.

For capacity planning, this answer explicitly assumes a mature platform with 120 million registered riders, 20 million daily completed rides, and a 5× event peak. Unless a number is tied to a citation, it is a stated design assumption.

The architectural tension

The central tension is between throughput and correctness. At 20 million rides per day (approximately 230 rides/second average, 1,150 at 5× peak), the system cannot use synchronous distributed transactions across accrual, tier evaluation, and campaign matching. Yet it cannot tolerate the financial errors that loose eventual consistency produces. The resolution is a transactional outbox pattern combined with per-user ordered processing and idempotent event consumption, ensuring that each ride event produces exactly one set of loyalty mutations regardless of retries, partitions, or consumer failures.

Key Highlights

  • •A loyalty system is a financially-sensitive event processor: every point is a future monetary obligation.
  • •20 million daily rides produce ~230 accrual events/second average, 1,150 at 5× peak.
  • •Exactly-once semantics per user prevent double-counting and missed credits.
  • •The four pillars are accrual, tier progression, referral tracking, and campaign management.
  • •Balance must be strongly consistent per user even though event processing is asynchronous.
  • •Public figures from Uber (150M MAPC, 25M trips/day, 25M Uber One members) anchor the scale context.
Frame It as a Financial System
State in the first minute that every point is a monetary liability on the company balance sheet. This immediately elevates the conversation from 'coupon table' to 'financial-grade event processor' and distinguishes your answer.
Do Not Design a CRUD Coupon Table
A design that stores 'user_id, points, tier' in a single row updated per ride will fail at 1,150 events/second and cannot guarantee exactly-once semantics. The interviewer is probing for event-driven thinking.

Section Rescue Kit

Buzzwords to use:

Transactional OutboxIdempotent Event Consumption

Safe statements:

  • "I will separate the event-processing plane from the query plane: accrual is asynchronous and idempotent, while balance reads are strongly consistent per user."
  • "Before choosing databases, let me define which operations require exactly-once semantics and which tolerate at-least-once with idempotency."
Design a Rideshare Promo & Loyalty System - System Design | WinJob | WinJob