Design a system that allows food-delivery consumers to post reviews on individual food items they have ordered and earn monetary rewards when their reviews meet certain quality thresholds. Users may up-vote or down-vote reviews. The platform must:
Accept review text and optional photos synchronously and return immediately to the user.
Compute a dynamic “quality score” asynchronously using factors such as text length, detail (mentions of specific dish aspects), photo inclusion, and community votes; the score is updated whenever new votes arrive.
Detect and prevent vote manipulation (fake accounts, ring voting) while still allowing any user to vote.
Disburse monetary rewards (cash, credit, or points) only after a cooling period (e.g., 7 days) so fraud checks can run; use an escrow/ledger so funds can be clawed back if abuse is discovered.
Scale to millions of daily reviews and tens of thousands of reward payouts per day with <200 ms p99 read latency for review feeds and <1 min end-to-end latency from vote arrival to score recalculation.
Provide APIs for submitting a review, voting, querying reviews for an item, and querying a user’s reward balance and history.
Discuss data models, microservices, event flows, fraud-detection techniques, payout ledger design, sharding & caching strategies, and how you would evolve the quality scoring algorithm (rule-based → ML).