Building a PSB or MMO product: KYC tiers, USSD and wallets at mass-market scale
Half the customers sit on the lowest tier, so the lowest tier is the product. Its limits, the channel that signs people up and the first resource to run out decide whether a launch works
In the lab's week, the PSB S01 (Lumora Mobile's PSB) has 602 customer wallets spread across three KYC tiers, where tier 1 is the least verified and the most limited. Roughly what share are on tier 1?
A PSB and a mobile money operator (MMO) hold customers’ money in wallets, and both are built for people a bank branch does not reach. Licences in Nigeria set out what each licence allows. The sibling chapters in this module cover the PSB and the MMO as institutions (payment service banks and mobile money operators) and USSD, the telco and the bank, which this chapter does not repeat. It builds on wallets and stored value for the limit mechanics and agent banking and PoS for agent float. This chapter is about the product built on top of them, and its subject is four decisions that interlock: who may open what (the tier), how people arrive (the channel), what they may do (the limit), and what must exist behind them (agents, cash and settlement).
The lab is rails.py: one invented week, with S01 as Lumora Mobile’s PSB and M01 as an unnamed MMO. Every limit, fee, cut-off and capacity in it is illustrative, and none of it is the CBN’s, NIBSS’s or any operator’s. Where a real rule matters, it sits in a dated note, and where the sources could not settle it, the chapter says so.
What the licence lets you build
Start from the activities, because a product feature that needs a forbidden activity is a feature you cannot ship. Law-firm and press summaries of the CBN’s revised Guidelines for Licensing and Regulation of Payment Service Banks (27 August 2020) say a PSB may accept deposits from individuals and small businesses, covered by the deposit insurance scheme, execute payments through channels within Nigeria and invest in federal government and CBN securities, and that the list is open to further activities the CBN prescribes. The same summaries say a PSB may not grant loans, advances or guarantees, directly or indirectly, and may not accept foreign currency deposits, and press headlines give a 75% minimum of deposits in government securities, a ₦5 billion minimum capital and not less than 25% of touchpoints rural (one news report says 50%)as of 2026-11. The search found no cap on a PSB customer’s balance or single deposit, and the CBN’s PDF itself was not opened for this chapter, so read the prohibited-activities section before you design a feature near its edge. One consequence for product is plain: a PSB wallet cannot carry an overdraft or a “borrow against your balance” button.
The product questions that follow from this chapter’s scope are less about what the licence forbids than about what it leaves to you. Nothing in a licence says how a customer is onboarded in a village with no data signal. That is design.
A tier is a promise with a limit attached
A KYC tier, a level of identity verification, attaches limits to a wallet: how much it may hold and how much may leave it in a day. The wallets chapter taught the mechanics and warned that sources disagree about the figures, so this chapter does not re-teach limits. It asks what the tier does to a product.
Summaries of a CBN circular of 1 December 2023 (PSM/DIR/PUB/CIR/001/053), addressed to banks, payment service banks, other financial institutions and mobile money operators, say it made a BVN (bank verification number) or NIN (national identification number) mandatory for tier 1 accounts and wallets: no new tier 1 wallet may be opened without one, and the process starts by retrieving the BVN or NIN data electronically from the NIBSS or NIMC databases. Tiers 2 and 3 already required both, and the circular did not change that. Summaries say unfunded tier 1 accounts without one were restricted at once and funded ones from 1 March 2024, and one press report gave April 2024, so check the dates in the textas of 2026-11. That rests on news summaries of the circular and a regulatory database’s copy of the text, and the CBN’s own copy was not found. It changes what tier 1 means for a product. A wallet with no identity at all is not a tier 1 wallet; it is not allowed.
The CBN’s Supervisory Framework for Payment Service Banks (July 2021) is described in search results as providing three-tier KYC requirements for PSBs, with simpler account opening for low-value and medium-value accounts that are subject to caps and restrictions. The results gave its cover and contents but not its KYC sectionas of 2026-11. So the tiers exist for PSBs, and this chapter could not read their limits from the CBN. The figures turned up in search are in conflict: summaries of a September 2017 circular to mobile money operators, listed in a regulatory database, give tier 1 as ₦50,000 a day with a ₦300,000 cumulative balance, and tier 3 as ₦5,000,000 a day with no balance limit, although the tier 3 figure is unclear in the extracted text; a 2022 vendor post gives tier 2 as ₦200,000 and ₦500,000; and a 2026 vendor post gives a tier 1 daily limit of ₦30,000 that the search could not tie to any circularas of 2026-11. Two search results quote the same numbers as different measures, one as a single-deposit cap and one as a daily total. Press and vendor posts are not the rule.
The lab therefore treats one set as a design input: ₦50,000 out a day and ₦300,000 held for tier 1; ₦200,000 and ₦500,000 for tier 2; ₦5,000,000 and no cap for tier 3. These are the figures the wallets chapter used. They let you build and test the machinery, and they are not a statement of what applies to Lumora’s PSB. The machinery matters more than the numbers: when the real table is read, it replaces three lines of code and a test run shows what changes. If instead the limits are scattered through the app, the USSD menu and the support scripts, a rule change is a project.
The mix in the lab’s data
Product planning starts from who the customers are. Step 2 counts S01’s and M01’s customers by tier from the accounts table. The result in this run: S01 has 305 customers on tier 1, 189 on tier 2 and 108 on tier 3. That is 50.7%, 31.4% and 17.9%. M01 has 178, 109 and 63, or 50.9%, 31.1% and 18.0%.
Read the numbers carefully before repeating “most customers are on tier 1”. Tier 1 is the largest group, but at both institutions it is only a little over half. Three counting choices move the share. First, closed, dormant, frozen and post-no-debit wallets are in the table. Counting only active customers moves S01’s tier 1 share to 49.8%, slightly under half. Second, S01’s 60 agents are in the same accounts table with kind = 'agent', and all are tier 3. Count them as customers and tier 1 drops to 46.1% of 662 accounts. Third, a mix is a stock, not a flow. The share of new sign-ups that reach tier 1 is the number that sets next month’s support load, and the week’s table cannot give it because it holds one snapshot. Write the denominator beside every share.
The mix also says why the product cannot be built for tier 3 and hoped for the rest. A customer on tier 1 has the least room, so she meets the limit first, and she is the customer an agent or a USSD menu will explain the limit to.
Replaying the week against the limits
A limit is a function of the posting and the state it would create, so it can be tested by replay. The lab’s refusals function takes a wallet’s tier, the balance after a posting and the day’s outflow after it, and returns the reasons the posting breaks the design set. The daily outflow counts the fee, as the wallets chapter’s rule does, and a day is a West Africa Time date, which is what the ledger’s timestamps carry.
The generator never enforced any limit on S01’s wallet. Its table of tier limits caps the amount of each transfer from a tier’s sender and keeps no daily total and no balance cap, and cash-in and cash-out postings are not capped by tier at all. So the replay finds what a real policy layer would have refused. Take a tier 1 customer who sends ₦50,000 by NIP: the generator allows it, and the fee for an amount up to ₦50,000 is ₦25. 5,000,000 kobo plus 2,500 kobo of fee is 5,002,500, which is above the 5,000,000 daily limit, so the posting is refused even though the amount alone is exactly at the ceiling. The lab’s data has eight such transfers from eight tier 1 customers.
The replay’s totals are small, and that is the finding. No wallet goes over a balance cap, and 11 tier 1 wallets go over ₦50,000 in a day (14 postings). No tier 2 or tier 3 wallet breaks its limit, and the tier 1 balance cap of ₦300,000 never binds this week. The week is small and the generator draws amounts from one distribution, so a real PSB’s numbers will differ. What carries over is the shape: refusals fall on tier 1, in a small number of wallets, and each of them is a customer with a reason to be annoyed.
A refusal is a customer experience, not an error code. Note what the replay does not do. It reports breaches without refusing them, so every balance after a breach is the generator’s, not the one a real policy layer would have produced. A refusal changes later balances, which is why enforcing in code and replaying again would give a different, smaller count.
Channels: what each can collect
A channel is how the customer reaches the product. Three matter here, and they differ in what they can collect as evidence, which is what a tier needs.
The diagram is the lab’s design, and the next step in the lab writes it as code. It is not a rule. Whether a USSD session may open a tier 2 wallet is the regulator’s decision and the PSB’s own risk policy, and the lab has no data on it. What the diagram does show is a general point: a channel has a ceiling set by what it can collect, and the tier above the ceiling needs a second channel.
USSD. USSD (Unstructured Supplementary Service Data) is the phone-network menu described in the module 1 chapter on rails: a short-lived text session with a timer on every screen. Search results describing the CBN’s USSD Regulatory Framework of 2018 say it caps USSD transactions at ₦100,000 per customer per day, with higher limits only under a documented indemnity signed with the customer’s bank or MMO, makes a PIN the first-level authentication and requires a second factor above ₦20,000, and bars the second factor from being displayed on the USSD menu or sent to the customer’s registered number. Sources disagree on the date it took effect, 1 June or 1 October 2018, and the results were news and legal commentary from 2018 and 2019, so later amendments are uncheckedas of 2026-11. For product design that gives USSD a second ceiling: whatever the tier allows, a USSD session carries its own limit and its own authentication, and the PSB’s design has to say which wins.
Agents. An agent is a shop that does cash-in and cash-out for a principal; the agent banking chapter covers the two floats. The CBN issued Guidelines for the Operations of Agent Banking in Nigeria on 6 October 2025 (PSP/DIR/CON/CWO/001/049). Law-firm and press summaries of them give per-customer limits for cash-in and cash-out of ₦100,000 a day and ₦500,000 a week, a daily agent cash-out ceiling of ₦1.2 million (one report says ₦1 million), and agent exclusivity with one principal, in force from 1 April 2026. The results did not show what an agent may collect for onboardingas of 2026-11. Read that last line twice. A design that has agents collect identity documents rests on a rule that the summaries did not confirm, and the CBN’s text decides it. Until then, treat “the agent upgrades the customer” as an assumption in the design and name who confirmed it.
Tier 1 over USSD, upgrades through an agent is the design the lab builds. It fits a product for people with a phone and no branch nearby. It also carries a cost the data shows: of S01’s 108 USSD sessions in the week, 28 (about a quarter) ended without completing. The USSD chapter in this module covers why.
What runs out first
A wallet product fails at a bottleneck, and which one depends on the numbers. The lab asks, for three resources: how many times today’s busiest load can the resource carry? That multiple, the load at which it is exhausted divided by today’s load, makes the resources comparable even when they are measured in sessions, kobo and people.
USSD gateway. The load is the number of sessions open at once. Little’s law gives the average: the number open equals the arrival rate times the average time each stays. The week’s busiest hour, 12:00 on Wednesday 17 June, had 61 sessions across the whole network, and the average session lasted 51.88 seconds. 61 divided by 3,600 seconds, times 51.88 seconds, is 0.88 sessions open on average. A sweep over the real start and end times found 5 open at the peak, so the lab’s burst factor is 5 divided by 0.88, about 5.7. Averages hide bursts, so the plan uses the average times the measured factor. At a design population of 1,000,000 wallets the lab estimates about 105 sessions open at once on the busiest telco.
Agent float. An agent’s e-float falls when customers pay cash in, as the agent chapter showed. Replaying S01’s cash-in and cash-out gives each agent’s deepest drawdown from the opening float. The largest is ₦219,500. If the agent network does not grow while customers do, that need scales with the customers, and the lab’s assumed ₦1,000,000 of float an agent can fund lasts until about five times today’s load.
Settlement collateral. In the lab, S01 settles its net position in each session against a collateral of ₦60,000,000, an invented figure. Its largest net debit in the week is ₦191,644 (session 20260619-2). That is 313.1 times smaller than the collateral, so it lasts to about 313 times. The model says nothing about what a real PSB must post. It shows how to find the multiple once you have the real figure from your settlement arrangement.
Put the three side by side, and a million wallets, about 1,661 times S01’s 602 customers, runs past two of them. That is the finding: the first thing to break is not the phone network. It is agent float, which is a cash logistics problem, and then the money behind settlement, which is a treasury problem. Both sit with people who are not in the engineering room. If you change an assumption the order changes, as the break step shows, and that is correct. The capacities come from contracts and business choices that the week cannot supply.
Where this goes wrong
- The tier as a boolean. A wallet’s limit is not a property of the wallet; it is the policy in force when each posting happened. Store which table decided a refusal, as the wallets chapter says.
- Fees outside the limit. A daily limit that ignores the fee lets a customer exceed it by the fee, and one that counts it refuses a transfer at exactly the limit. Either is a decision, and the lab found eight transfers on the boundary.
- A nudge nobody tested. The lab’s rule invites a customer to upgrade at 80% of a limit, and it finds 18 of 305 tier 1 customers in the week. A rule like that needs a number from your own data and a person who owns the threshold. The 80% is a design input.
- The channel ceiling forgotten. If only an agent can raise a tier, every upgrade is an agent visit, with the agent’s time and float. A product that grows tier 1 through USSD without growing agents grows a queue.
- Capacity numbers copied from a vendor. A gateway capacity in a brochure is a vendor claim. Ask the telco for the contracted figure and test it.
- Forgetting the unhappy path. About a quarter of S01’s USSD sessions in the week were incomplete. A customer who times out at step five has spent the session’s charge and still has no transfer.
What the data cannot tell you
The week holds 602 S01 customers and 108 S01 USSD sessions, so every S01 rate is a few events. Agents’ opening floats were sized by the generator to cover the week with at most ₦50,000 to spare, so the agent float headroom in the data is built in, which is why the lab uses the week’s drawdown and an assumed capacity and not the opening balance. The data has no sign-up flow, no document checks and no complaint, so the onboarding design is a design and not a measurement. It cannot show which regulation binds a real PSB’s USSD sign-up, what the real tier limits are for a PSB wallet, or what a real settlement arrangement requires. Those are for the CBN’s text, your sponsor and your lawyer.
This is a desk lab in labs/finance. You create four files there: tiers.py, limits.py, onboarding.py and capacity.py. Each opens data/rails.sqlite read-only through Python’s sqlite3 module, so nothing is written. The limits, collateral and capacities in the scripts are illustrative design inputs, not the CBN’s, NIBSS’s or any operator’s. Money is integer kobo throughout; the scripts print naira for reading only.
1. Generate the week and check it. It takes about a second.
cd labs/finance
python3 rails.py
python3 check.py --rails-onlyrails.py prints three lines. The ones that matter here are the first and the last:
32 participants, 22,835 accounts, 17,998 transfers, 12,158 name enquiries, 136 status queries
21 settlement sessions, 125 batch files, 193 RTGS payments, 3,412 USSD sessions, 3,453 PSB postings
planted (answers/rails_truth.csv): credited_without_settlement 4, customer_fee_not_charged 6, customer_reversed_twice 3, levy_not_charged 5, mmo_trust_shortfall 1, participant_limit 4, participant_outage 1, psb_cash_out_fee_not_posted 1, psb_cash_out_posted_twice 1, reversed_after_late_success 4, same_number_two_banks 8, switch_incident 1, telco_record_missing 12check.py prints:
rails week: 17,998 transfers, 21 settlement sessions, 22,835 accounts; checks 21-25 run
OK: all invariants holdSeed 42 gives the same numbers each time. Do not open data/answers/ in this chapter.
2. Count the tier mix. Save this as tiers.py and run python3 tiers.py.
"""Step 2: the tier mix of S01 (a PSB) and M01 (an MMO), straight from `accounts`."""
import sqlite3
db = sqlite3.connect("file:data/rails.sqlite?mode=ro", uri=True)
for inst in ("S01", "M01"):
print(f"{inst}")
print(f" {'tier':<5} {'customers':>9} {'share':>7} {'active':>7} {'share':>7}")
rows = db.execute("""SELECT tier, COUNT(*), SUM(status = 'active') FROM accounts
WHERE institution = ? AND kind = 'customer' GROUP BY tier ORDER BY tier""", (inst,)).fetchall()
total = sum(r[1] for r in rows)
active = sum(r[2] for r in rows)
for tier, n, a in rows:
print(f" {tier:<5} {n:>9,} {100 * n / total:>6.1f}% {a:>7,} {100 * a / active:>6.1f}%")
print(f" {'all':<5} {total:>9,} {'':>7} {active:>7,}")
agents = db.execute("SELECT COUNT(*), MIN(tier), MAX(tier) FROM accounts WHERE institution = ? AND kind = 'agent'",
(inst,)).fetchone()
print(f" agents: {agents[0]} (tier {agents[1]} to {agents[2]})")
print("\nwhere S01's customers' mobile lines are (the telco decides who can reach the USSD menu)")
for telco, n in db.execute("""SELECT telco, COUNT(*) FROM accounts WHERE institution = 'S01' AND kind = 'customer'
GROUP BY telco ORDER BY telco"""):
print(f" {telco}: {n:,}")S01
tier customers share active share
1 305 50.7% 285 49.8%
2 189 31.4% 182 31.8%
3 108 17.9% 105 18.4%
all 602 572
agents: 60 (tier 3 to 3)
M01
tier customers share active share
1 178 50.9% 172 51.5%
2 109 31.1% 101 30.2%
3 63 18.0% 61 18.3%
all 350 334
agents: 0 (tier None to None)
where S01's customers' mobile lines are (the telco decides who can reach the USSD menu)
T1: 244
T2: 168
T3: 136
T4: 54Tier 1 is the largest group in both, a little over half of all customers at each, though 49.8% of S01’s active ones. The 60 agents are tier 3 and are not in the customer rows: 305 of 662 accounts is 46.1%, which is why the query filters on kind. M01 has no agent rows in this lab. T1 is the largest line group at S01, with 244 of 602 customers.
3. Write the limits as code and replay S01’s week. Save this as limits.py and run python3 limits.py. DESIGN is the exercise input from the chapter, so change it if you read a different table in the CBN’s text.
"""Step 3: a tier-limit policy as code, replayed over S01's week. All money is integer kobo.
DESIGN is an exercise input, the set the wallets chapter used (a 2017 circular as summaries
report it). It is not what applies to any real wallet or account today: read the current text.
"""
import sqlite3
from collections import defaultdict
NAIRA = 100
# tier: (most that may leave a wallet in a calendar day, fees included; most it may hold or None)
DESIGN = {1: (50_000 * NAIRA, 300_000 * NAIRA),
2: (200_000 * NAIRA, 500_000 * NAIRA),
3: (5_000_000 * NAIRA, None)}
SIGN = {"nip_in": 1, "nip_out": -1, "nip_out_reversal": 1, "cash_in": 1, "cash_out": -1}
def refusals(tier, balance_after, day_out_after):
"""The reasons a posting would be refused under DESIGN, given the state it would create."""
daily, cap = DESIGN[tier]
why = []
if day_out_after > daily:
why.append("daily_limit")
if cap is not None and balance_after > cap:
why.append("balance_cap")
return why
db = sqlite3.connect("file:data/rails.sqlite?mode=ro", uri=True)
wallets = {w: (kind, tier, opening) for w, kind, tier, opening in db.execute("SELECT * FROM psb_wallets")}
balance = {w: v[2] for w, v in wallets.items()}
day_out = defaultdict(int)
hits = defaultdict(set) # (tier, reason) -> wallets
events = defaultdict(int) # (tier, reason) -> postings
for _id, at, kind, wallet, counter, amount, fee, _ref in db.execute("SELECT * FROM psb_ledger ORDER BY at, id"):
sign = SIGN[kind]
balance[wallet] += sign * amount - fee
if sign < 0:
day_out[(wallet, at[:10])] += amount + fee # at[:10] is the West Africa Time date
if counter:
balance[counter] -= sign * amount # the agent's float moves the other way
k, tier, _ = wallets[wallet]
if k == "customer":
for r in refusals(tier, balance[wallet], day_out[(wallet, at[:10])]):
hits[(tier, r)].add(wallet)
events[(tier, r)] += 1
print(f"{'tier':<5} {'reason':<12} {'wallets':>8} {'postings':>9}")
for (tier, reason) in sorted(hits):
print(f"{tier:<5} {reason:<12} {len(hits[(tier, reason)]):>8} {events[(tier, reason)]:>9}")
print("\nthe week's largest outflow in a day, by tier (limit in brackets)")
for tier in (1, 2, 3):
top = max((v, w) for (w, d), v in day_out.items() if wallets[w][0] == "customer" and wallets[w][1] == tier)
print(f" tier {tier}: N{top[0] // NAIRA:,}.{top[0] % NAIRA:02d} (N{DESIGN[tier][0] // NAIRA:,})")
print("\ntier 1 customers who sent a transfer at the generator's own ceiling of N50,000")
n_t1, n_cap = db.execute("""SELECT COUNT(DISTINCT t.debit_account), COUNT(*) FROM transfers t
JOIN accounts a ON a.account_no = t.debit_account AND a.institution = t.src
WHERE t.src = 'S01' AND a.tier = 1 AND t.amount_kobo = ?""", (DESIGN[1][0],)).fetchone()
print(f" {n_t1} customers, {n_cap} transfers")tier reason wallets postings
1 daily_limit 11 14
the week's largest outflow in a day, by tier (limit in brackets)
tier 1: N64,425.00 (N50,000)
tier 2: N66,655.00 (N200,000)
tier 3: N249,185.00 (N5,000,000)
tier 1 customers who sent a transfer at the generator's own ceiling of N50,000
8 customers, 8 transfersEleven tier 1 wallets spend more than ₦50,000 in a day, the worst ₦64,425.00, and none holds more than ₦300,000, so the balance cap never fires this week. Tier 2 and tier 3 never come close to their limits. Check one boundary by hand: a ₦50,000 transfer plus its ₦25 fee is 5,002,500 kobo, over 5,000,000, so the eight ceiling transfers all breach. The replay reports breaches and does not refuse them, so later balances are the generator’s.
4. Write the onboarding rule and test it. Save this as onboarding.py and run python3 onboarding.py. TIER_NEEDS and CAN_COLLECT are design inputs: edit them when you have read the CBN’s text.
"""Step 4: onboarding by tier and channel, as a function you can test. DESIGN INPUT, not a rule.
What each tier asks for is policy. The CBN's own text decides it, so read the current circulars
and change TIER_NEEDS where they differ. The chapter says what its sources could and could not show.
"""
import sqlite3
from collections import defaultdict
NAIRA = 100
# each tier needs everything the tier below needs, plus this
TIER_NEEDS = {1: {"phone_verified", "bvn_or_nin_verified"},
2: {"id_document_checked"},
3: {"address_verified"}}
# what each channel can collect on its own (a USSD menu cannot photograph a document)
CAN_COLLECT = {"ussd": {"phone_verified", "bvn_or_nin_verified"},
"agent": {"phone_verified", "bvn_or_nin_verified", "id_document_checked", "address_verified"}}
def tier_for(evidence):
"""The highest tier the evidence supports; 0 means open nothing."""
need, tier = set(), 0
for t in (1, 2, 3):
need |= TIER_NEEDS[t]
if need <= evidence:
tier = t
else:
break
return tier
def max_tier(channel):
return tier_for(CAN_COLLECT[channel])
assert tier_for(set()) == 0
assert tier_for({"phone_verified"}) == 0 # a phone alone opens nothing
assert tier_for({"phone_verified", "bvn_or_nin_verified"}) == 1
assert tier_for({"phone_verified", "bvn_or_nin_verified", "address_verified"}) == 1 # a gap stops the climb
assert max_tier("ussd") == 1 and max_tier("agent") == 3
print("onboarding rules: 5 checks pass; USSD reaches tier", max_tier("ussd"), "and an agent reaches tier", max_tier("agent"))
# Who in S01's week is close enough to a tier 1 limit that you would invite them to upgrade?
DAILY, CAP, NUDGE = 50_000 * NAIRA, 300_000 * NAIRA, 0.8
SIGN = {"nip_in": 1, "nip_out": -1, "nip_out_reversal": 1, "cash_in": 1, "cash_out": -1}
db = sqlite3.connect("file:data/rails.sqlite?mode=ro", uri=True)
tier1 = {w: o for w, k, t, o in db.execute("SELECT * FROM psb_wallets WHERE tier = 1 AND kind = 'customer'")}
bal, peak, out = dict(tier1), dict(tier1), defaultdict(int)
for _i, at, kind, w, _c, amount, fee, _r in db.execute("SELECT * FROM psb_ledger ORDER BY at, id"):
if w in tier1:
bal[w] += SIGN[kind] * amount - fee
peak[w] = max(peak[w], bal[w])
if SIGN[kind] < 0:
out[(w, at[:10])] += amount + fee
near = {w for w in tier1 if peak[w] >= NUDGE * CAP} | {w for (w, d), v in out.items() if v >= NUDGE * DAILY}
print(f"tier 1 customers: {len(tier1)}; within {int(NUDGE * 100)}% of a limit at some point in the week: {len(near)}")
route = "agent" if max_tier("ussd") < 2 else "ussd"
print(f"the tier they would move to needs {sorted(TIER_NEEDS[2])}; the channel that can collect it: {route}")onboarding rules: 5 checks pass; USSD reaches tier 1 and an agent reaches tier 3
tier 1 customers: 305; within 80% of a limit at some point in the week: 18
the tier they would move to needs ['id_document_checked']; the channel that can collect it: agentThe assert lines are the tests: they pass silently, and the first print says so. Eighteen of 305 tier 1 customers (5.9%) come within 80% of a design limit, and every one needs an agent to move up, because the design’s USSD menu cannot collect a document. The 18 includes every wallet from step 3, because a breach is also within 80%: the nudge comes earlier than the refusal.
5. Measure the load and find what runs out first. Save this as capacity.py and run python3 capacity.py. The CAPACITIES are assumptions: replace them with figures from your telco and your agents.
"""Step 5: sessions per hour, Little's law, and what runs out first. Money in integer kobo.
The CAPACITIES are assumptions you set from contracts. The week supplies only the loads.
"""
import sqlite3
from collections import Counter, defaultdict
from datetime import datetime
NAIRA = 100
WALLETS_TARGET = 1_000_000 # design input: the population you plan for
CAPACITIES = { # ASSUMED, not measured
"ussd_concurrent_per_telco": 200, # sessions one telco gateway lets this product hold open
"agent_float_kobo": 1_000_000 * NAIRA, # most e-float one agent can fund
}
db = sqlite3.connect("file:data/rails.sqlite?mode=ro", uri=True)
sessions = db.execute("SELECT started_at, duration_s, institution, telco, outcome FROM ussd_sessions").fetchall()
def peak_concurrent(rows):
"""Sweep line: +1 at each start, -1 at each end; the highest running count."""
ev = []
for started, dur, *_ in rows:
t = datetime.fromisoformat(started).timestamp()
ev += [(t, 1), (t + dur, -1)]
cur = best = 0
for _, d in sorted(ev):
cur += d
best = max(best, cur)
return best
hours = Counter(s[0][:13] for s in sessions)
busiest, n_busiest = hours.most_common(1)[0]
print(f"network: {len(sessions):,} sessions in {len(hours)} hours; busiest hour {busiest}h with {n_busiest}")
s01 = [s for s in sessions if s[2] == "S01"]
print(f"S01: {len(s01)} sessions, {sum(s[4] == 'completed' for s in s01)} completed; "
f"busiest S01 hour had {max(Counter(s[0][:13] for s in s01).values())}")
# Little's law: average sessions open = arrival rate x time in the system
in_hour = [s for s in sessions if s[0][:13] == busiest]
mean_s = sum(s[1] for s in sessions) / len(sessions)
little = (len(in_hour) / 3600) * mean_s
seen = peak_concurrent(in_hour)
burst = seen / little
print(f"busiest hour: Little says {little:.2f} open on average; the sweep found a peak of {seen}; burst factor {burst:.1f}")
# scale S01's per-customer behaviour to the target population
customers = db.execute("SELECT COUNT(*) FROM accounts WHERE institution = 'S01' AND kind = 'customer'").fetchone()[0]
m = WALLETS_TARGET / customers
per_cust = len(s01) / customers
peak_share = n_busiest / len(sessions)
telco_share = max(Counter(s[3] for s in s01).values()) / len(s01)
def concurrent_at(mult):
per_hour = per_cust * customers * mult * peak_share
return per_hour / 3600 * mean_s * burst * telco_share
print(f"\nat {WALLETS_TARGET:,} wallets (x{m:,.0f}): {per_cust * WALLETS_TARGET * peak_share:,.0f} S01 sessions in the peak hour, "
f"about {concurrent_at(m):.0f} open at once on the busiest telco")
# what runs out first, as the multiple of today's load at which each resource is exhausted
agents = {a: o for a, o in db.execute("SELECT float_account, float_open_kobo FROM psb_agents")}
run, need = dict(agents), defaultdict(int)
for _i, _at, kind, _w, agent, amount, _f, _r in db.execute("SELECT * FROM psb_ledger WHERE kind IN ('cash_in', 'cash_out') ORDER BY at, id"):
run[agent] += -amount if kind == "cash_in" else amount
need[agent] = max(need[agent], agents[agent] - run[agent])
worst_float = max(need.values())
collateral = db.execute("SELECT collateral_kobo FROM participants WHERE code = 'S01'").fetchone()[0]
worst_debit = -db.execute("SELECT MIN(net_kobo) FROM settlement_positions WHERE participant = 'S01'").fetchone()[0]
rows = [("agent float (agents do not grow)", CAPACITIES["agent_float_kobo"] / worst_float,
f"largest drawdown N{worst_float / NAIRA:,.0f} vs N{CAPACITIES['agent_float_kobo'] / NAIRA:,.0f}"),
("settlement collateral", collateral / worst_debit,
f"largest net debit N{worst_debit / NAIRA:,.0f} vs N{collateral / NAIRA:,.0f}"),
("USSD gateway on the busiest telco", CAPACITIES["ussd_concurrent_per_telco"] / concurrent_at(1),
f"{concurrent_at(1):.2f} open at once vs {CAPACITIES['ussd_concurrent_per_telco']}")]
print(f"\n{'resource':<36} {'runs out at':>12} load against capacity")
for name, mult, note in sorted(rows, key=lambda r: r[1]):
print(f"{name:<36} {'x' + format(mult, ',.0f'):>12} {note}")
print(f"\nplanned population is x{m:,.0f} today's")network: 3,412 sessions in 166 hours; busiest hour 2026-06-17T12h with 61
S01: 108 sessions, 80 completed; busiest S01 hour had 5
busiest hour: Little says 0.88 open on average; the sweep found a peak of 5; burst factor 5.7
at 1,000,000 wallets (x1,661): 3,207 S01 sessions in the peak hour, about 105 open at once on the busiest telco
resource runs out at load against capacity
agent float (agents do not grow) x5 largest drawdown N219,500 vs N1,000,000
settlement collateral x313 largest net debit N191,644 vs N60,000,000
USSD gateway on the busiest telco x3,174 0.06 open at once vs 200
planned population is x1,661 today'sCheck the middle numbers with a calculator. Little’s law: 61 / 3,600 × 51.88 s = 0.88. The multiple for collateral: 6,000,000,000 kobo / 19,164,400 kobo = 313.1. For float: 100,000,000 / 21,950,000 = 4.6. The population multiple: 1,000,000 / 602 = 1,661. The USSD row is the least trustworthy: it uses one hour’s burst factor and 108 S01 sessions. In the lab’s model the gateway has plenty of room, and the agents’ float and the settlement collateral each run out before the planned population arrives. S01 completed 80 of 108 sessions, so a quarter did not complete.
Make the agents’ float generous and watch the order change. Copy the script, cp capacity.py cap_break.py, and in the copy change the agent_float_kobo line to 100_000_000 * NAIRA. Run python3 cap_break.py. Settlement collateral now comes first, at x313, then agent float at x456. Nothing in the week changed, only an assumption, and the finding “the first thing to break is agent cash” flipped to “the first thing to break is the treasury’s collateral”. Now decide who owns each of those two numbers in a PSB, and what you would ask them for before a launch date was set.
Template
# Tier and onboarding design: <product>
Author · Approver (compliance) · Date · Status: draft / approved · Review date
## Decision needed
<What must be approved, by whom, by when.>
## Tiers and limits
| Tier | Out per day (fees in or out?) | Balance cap | Design input or confirmed rule | Confirmed by, date |
|---|---|---|---|---|
Day boundary: <which time zone>. Channel limits that sit on top: <e.g. USSD>, and which wins.
Mix today: <customers per tier, denominator, snapshot or flow>.
## Onboarding by tier and channel
| Tier | Evidence asked | USSD | App | Agent |
|---|---|---|---|---|
Unconfirmed assumptions: <who may collect what, who is asked, by when>.
## When a customer reaches a limit
- At the nudge (<threshold>): <message, channel, who owns the threshold>
- At the refusal: <what the screen says, which limit, what is left today, where to go>
- On the boundary: <fee treatment and the message>
- Who can lift a limit, and how it is recorded.
## Measures
| Measure | Denominator | Baseline (source) | Target | Owner | Looked at | What it would change |
|---|---|---|---|---|---|---|
## How this could be wrong
<One way, and the number that would show it.>
## Out of scope
<What this spec does not decide.> WORKED EXAMPLE
At a real company the product lead writes this spec and the head of compliance signs the limits and evidence rules. This one is Obioma’s for Lumora Mobile’s PSB, with Ogochukwu confirming that the policy function matches the table.
Decision needed. Approve tier 1 sign-up by USSD with upgrades through agents, and the refusal wording, before agent training dates are fixed. Draft, reviewed after the first month.
Tiers and limits. All are the lab’s design inputs, not confirmed rules: tier 1 ₦50,000 out a day and ₦300,000 held; tier 2 ₦200,000 and ₦500,000; tier 3 ₦5,000,000 and no cap. The fee counts towards the daily limit, and a day is a West Africa Time date. Mix: 305 of 602 customers (50.7%) are on tier 1, a snapshot of one week.
Onboarding. Tier 1 asks for a verified phone and a BVN or NIN, by USSD or app. Tier 2 adds an identity document check and tier 3 a verified address, so USSD stops at tier 1. Whether agents may collect documents is unconfirmed; Obioma asks compliance before training starts.
At a limit. At 80% of a limit, an SMS invites the customer to an agent: 18 of 305 tier 1 customers (5.9%) reached that in the week. Over the limit, the posting is refused, and the message names the limit, what is left today and the agent route. A ₦50,000 transfer with its ₦25 fee is refused; the lab found 8 such transfers. Only compliance lifts a limit, and the ledger records who and why.
Measures. Postings the design would refuse: 14 on 11 wallets in the replay, worst day ₦64,425.00; owner Ogochukwu, weekly. USSD completion: 80 of 108 sessions, owner Obioma, weekly. Share of refused customers who upgrade within a week: no baseline, target set after month one.
Could be wrong. The replay reports breaches without refusing them, so real refusal counts will differ; the first month’s count would show by how much.
Out of scope. The real tier limits, which compliance confirms from the CBN’s text, and the USSD channel’s own limit.
Now you
A mobile money operator, unnamed here and called M01 in the lab, is about to open sign-up by USSD and its app, and you are its product manager. The lab’s tiers.py shows 350 customers: 178 on tier 1 (50.9%), 109 on tier 2 and 63 on tier 3, with 172 of the 178 active. Use the chapter’s design limits and onboarding.py rules as design inputs, and mark them so. The app can photograph an identity document and USSD cannot. You do not know whether the operator’s agents may collect documents. limits.py replays S01’s week, not M01’s, so if you borrow its refusal figures, say they come from another institution. Write the spec that the chief executive and the head of compliance will read. It supports one decision: whether to launch tier 1 sign-up by USSD, and what agent and app capacity to commit before launch.
Self-check
Obioma's launch has tier 1 sign-up by USSD and upgrades through the PSB's agents. In the lab's week, 18 of 305 tier 1 customers came within 80% of a limit, and eight sent a transfer that the design would refuse for the fee alone. Ogochukwu says the first month's refusals will arrive before the agents have been trained to upgrade anyone. What does the product do about customers who reach a tier 1 limit?
- DOC Guidelines for Licensing and Regulation of Payment Service Banks in Nigeria (CBN, revised 27 August 2020) Central Bank of Nigeria, 2020
The regulator's own list of what a PSB may and may not do. Read the permitted and prohibited activities against any feature on your roadmap. This chapter rests on search summaries of it, so check each section yourself.
- DOC Supervisory Framework for Payment Service Banks (CBN, July 2021) Central Bank of Nigeria, 2021
Search results say it sets out three-tier KYC for PSBs. Read the KYC section for the tier requirements and limits this chapter could not confirm, and compare them with the lab's design set.
- DOC Circular PSM/DIR/PUB/CIR/001/053, Tier 1 wallets and accounts: BVN or NIN (CBN, 1 December 2023), regulatory database copy Central Bank of Nigeria, via a regulatory database, 2023
A third-party regulatory database's copy of the circular that makes a BVN or NIN mandatory at tier 1. Read it for the exact wording and the dates, which the news reports gave differently. The CBN's own copy was not found.
- DOC USSD Regulatory Framework (CBN, 2018) Central Bank of Nigeria, 2018
The controls on USSD financial services: authentication, what may not appear on the menu and the daily cap. Read it beside your own sign-up flow, and check for later amendments, as the results did not.
- DOC Guidelines for the Operations of Agent Banking in Nigeria (CBN, 6 October 2025) Central Bank of Nigeria, via a regulatory database, 2025
A regulatory database's copy of the circular and guidelines on what an agent may do, the cash limits and exclusivity. Read what an agent may collect for onboarding, which the summaries did not settle, and compare with the CBN's own copy.
- POST Mobile money agents: sustainability in a digital era (GSMA) GSMA
An industry body's view of what keeps agent networks working, with liquidity as a recurring theme. Read it as industry commentary, not a rule, and skim the programme-specific parts.
All companies and people in these examples are fictional. Any resemblance to a real business or person is unintended.