Design Daily Interest Accrual for High-Yield Savings Accounts
Last updated: November 29, 2026
Quick Overview
Design the system that accrues interest daily on millions of high-yield savings balances at a variable APY, pays it out monthly, and stays correct when rates change mid-month, balances are backdated, and the batch job fails partway.
Onepay
November 29, 20260
0
0 solved
Design the system that accrues interest daily on millions of high-yield savings balances at a variable APY, pays it out monthly, and stays correct when rates change mid-month, balances are backdated, and the batch job fails partway.
High-yield savings is a headline OnePay product, and interest is money the company owes customers, so small rounding and timing bugs become regulatory problems at scale. The interviewer checks that you define the accrual formula precisely, keep the daily job idempotent, and handle rate changes and corrections cleanly.
What the Interviewer Expects
- State the daily accrual formula and the rounding policy
- Keep accruals at sub-cent precision and round only at payout
- Make the daily job idempotent per account per day
- Handle APY changes effective on a specific date
- Support backdated balance corrections with re-accrual
- Post monthly payouts through the ledger
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- A customer moves $10,000 in at 11:58 pm. Which day's balance counts?
- How do you handle a balance tier, for example a higher rate only up to $25,000?
- Marketing wants a promo rate for new users only. Where does that rule live?
- How do you show customers today's accrued interest in the app?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Daily accrual for every savings account using end-of-day balance, a monthly credit of the accrued total, variable APY that can change on any date, and support for backdated adjustments. Scale: around ...
High-Level Design
An end-of-day snapshot job writes each account's closing balance. A rate service stores effective-dated APY rows. The accrual job reads snapshots plus the applicable rate and writes `accruals(account_...