01 · The challenge
A financial services business needed to verify that trading accounts genuinely belonged to a given user - and to guarantee no account could be claimed by more than one person, even under simultaneous requests.
02 · What I built
An API that verifies accounts against two separate brokers and atomically links each verified account to exactly one user, blocking any duplicate or fraudulent claim.
03 · The hard part
The core risk is a race condition: two requests for the same user arriving at once could both pass a naive check-then-write. I used a single atomic lock operation as the gate, so only one request can ever win and the other is rejected instantly - with no inconsistent state in between.
04 · The outcome
Manages 24,000+ verified financial accounts across two brokers. Duplicate claims are structurally impossible under concurrent load. Verification on the hot path completes in around a millisecond.
05 · Stack