Design a Crypto Lending Circle or ROSCA

Hard45 min
1 / 30
understanding11 min read

Problem Statement: A Rotating Savings Circle as a Smart Contract System

Frames the ROSCA as a custody, rotation, and enforcement problem on-chain, not a ledger CRUD app.

Problem statement

Design an on-chain Rotating Savings and Credit Association (ROSCA): the system known as sou-sou, tanda, esusu, ajo, chama, paluwagan, arisan, stokvel, or a regulated chit fund. N members commit to deposit a fixed stablecoin contribution C every cycle of length T. Each cycle, the pooled pot P = N × C is released to exactly one member, following a rotation order that is fixed, auctioned, or drawn. After N cycles every member has received the pot exactly once; early recipients are net borrowers, late recipients are net lenders, and the circle matures with all obligations settled.

The product must create circles with verified membership, collect deposits each cycle inside a bounded window, release the pot on-chain, handle missed deposits with penalties and overrides, support members joining or leaving mid-flight, track who has received the pot and who is next in a live UI, and remain compliant with jurisdiction-specific cooperative and chit-fund rules. Because deposits cross wallets and sometimes chains, the design must also define bridging semantics for stablecoin inflows.

Why this is distinctive

A普通 lending pool nets risk across strangers; a ROSCA concentrates risk in a known group and a known schedule. The core hazard is structural: the member who receives the pot in cycle 1 has an economic incentive to vanish before cycle 2. Off-chain, ROSCAs survive on social capital, shame, and repeated interaction. On-chain, social capital must be compiled into mechanics: slashable collateral, vouching stakes, insurance pools, rotation reordering, and jurisdiction policy. The second hazard is operational: every member deposits on the same deadline day, producing a correlated write storm, and every state change must be reconstructible by an indexer that serves the UI.

Public operating baseline versus design assumptions

Public evidence shows the category is enormous off-chain. South African stokvels are commonly reported at more than 11 million members across roughly 810,000-820,000 active groups, pooling an estimated R50 billion per year, with an average of about 34 members per stokvel [[2]]. India's chit funds are regulated by the Chit Funds Act 1982, which caps foreman commission at 5 percent and requires chit agreements to be filed with a state Registrar of Chits [[11]]. Digitized ROSCA-adjacent savings also scale: PiggyVest's app listing describes almost 6 million registered users in Nigeria [[24]]. These are cited public figures, not requirements for our fictional system.

For capacity planning this answer explicitly assumes: 60,000 active circles, average 14 members, 840,000 participants, monthly cycles for 70 percent and weekly for 30 percent of circles, roughly 1.05 million deposit events per month, 25 percent of deposits arriving cross-chain, and a 20x deadline-day peak multiplier. Unless tied to a citation, every number is a stated design assumption, target, or budget.

The four architectural planes

  1. Ledger plane: the circle contract is the only writer of membership, cycle, deposit, and payout state; everything else is a projection.
  2. Custody plane: stablecoin contributions, stakes, insurance reserves, and pots live in contract-controlled accounts; no human holds group funds.
  3. Rotation plane: rotation order, auction bids, reordering penalties, and maturity accounting.
  4. Compliance plane: jurisdiction policy bundles, KYC attestations, sanctions screening, and regulator-facing evidence.

A strong interview answer keeps these planes separate: the indexer may lag, the bridge may halt, and the UI may degrade, but the ledger and custody invariants must never bend.

Key Highlights

  • A ROSCA is a scheduled uncollateralized loan rotating through a known group; default risk is structural, not incidental.
  • The circle contract is the single writer of ledger truth; indexers, mirrors, and UIs are freshness-labeled projections.
  • Public scale is real: stokvels are commonly reported at 11M+ members and ~R50B yearly; chit funds are regulated with a 5% foreman cap.
  • Four planes: ledger, custody, rotation, compliance; each has its own failure semantics.
  • Deadline-day deposit correlation, not average QPS, is the dominant write workload.
Lead With the Custody Invariant
State in the first two minutes that group funds never touch a human-controlled wallet and that the circle contract is the only writer of ledger state. This instantly separates a blockchain design from a web2 savings app with a token veneer.
Do Not Build a Custodial CRUD Ledger
A design where a backend database decides who owns the pot and a contract merely mirrors it inverts the trust model: the database becomes the attack surface and the chain becomes theater. Ledger truth must live in contract storage.

Section Rescue Kit

Buzzwords to use:

Rotating Savings and Credit AssociationConservation Invariant

Safe statements:

  • "I will separate ledger truth on-chain from projections off-chain before choosing any infrastructure."
  • "Before drawing services, let me define who may move funds in each state and what breaks the accounting identity."
Design a Crypto Lending Circle or ROSCA - System Design | WinJob | WinJob