/ Docs / Edge-Case Catalog v1 Β· 2026
Reliability Β· Edge Cases

Edge-Case Catalog

The master, de-duplicated index of everything that can go wrong across every RideChain subsystem β€” each failure mode with its impact, its defined mitigation, and a link to the doc that owns it.

1. Overview β€” the failure philosophy

RideChain operates in the rural interior where the unhappy path is the common path: SMS drops, 2G flickers, GPS lies, gateways flake, webhooks vanish, operators step out, and a non-trivial slice of users actively try to game the gate. Every subsystem is therefore designed defensively around seven repeating principles. This page is the master catalog; each subsystem doc carries its own id="edge" section, and every row below links back to the doc that owns the fix.

πŸ“΄

Offline-first

Actions queue in a local outbox (Drift/SQLite) and replay on reconnect; a booking made in a no-signal village still "sticks". SMS/IVR fallbacks keep status flowing.

πŸ”

Idempotent everywhere

Every money- or state-touching call carries an idempotency key. A double-tap, a replay, or a re-delivered webhook maps to the same entry and changes nothing twice.

πŸͺ

Webhook-reconciled

The gateway/KYC webhook β€” never the client's "I paid" β€” is the source of truth, with a polling reconciliation job as the backstop when a webhook is lost.

πŸ“‰

Graceful degradation

When a sensor or service fails, the system steps down a notch (manual confirm, straight-line ETA, cached route, stale-while-revalidate) instead of blocking the delivery.

πŸ“ˆ

Graduated trust

New actors start with low caps and prepaid low-value parcels only; limits unlock as trust accrues. This is the #1 lever for bounding fraud exposure.

πŸ”

Dual-OTP + POD custody

Every handover gates on QR match β†’ two-sided OTP β†’ geofenced, time-stamped POD photo before any escrow releases. Four interlocking controls per leg.

🧾

Append-only ledger

Money is paise-integer and immutable; disputes post an ADJUSTMENT entry, never an edit. Any discrepancy is always traceable to one entry.

Failures cluster into seven domains. The map below is the mental index for the rest of this page β€” every subsystem table that follows is a slice of one or more of these domains.

flowchart TB
  ROOT["RideChain failure domains"]
  ROOT --> NET["🌐 Network & connectivity"]
  ROOT --> PAY["πŸ’° Payment & settlement"]
  ROOT --> IDF["πŸͺͺ Identity & fraud"]
  ROOT --> GEO["πŸ“ Geo & tracking"]
  ROOT --> CUS["πŸ“¦ Custody & physical"]
  ROOT --> OPS["πŸ› οΈ Operational"]
  ROOT --> SCL["⚑ Scale & infra"]
  NET --> NET1["Offline / 2G / dead zone"]
  NET --> NET2["SMS / OTP delivery fails"]
  NET --> NET3["Lost / duplicate webhook"]
  PAY --> PAY1["Both gateways down"]
  PAY --> PAY2["Double-pay / chargeback"]
  PAY --> PAY3["Ledger vs gateway mismatch"]
  IDF --> IDF1["Deepfake / duplicate Aadhaar"]
  IDF --> IDF2["Collusion / account farms"]
  IDF --> IDF3["GPS spoof / fake delivery"]
  GEO --> GEO1["GPS denied / drift / skew"]
  GEO --> GEO2["Mock-location / teleport"]
  CUS --> CUS1["Wrong / tampered parcel"]
  CUS --> CUS2["Lost / damaged / cold-chain"]
  CUS --> CUS3["Point closed / hub overflow"]
  OPS --> OPS1["Partner declines / drops"]
  OPS --> OPS2["No road / flood / breakdown"]
  SCL --> SCL1["Hot shard / cache stampede"]
  SCL --> SCL2["Festival 10Γ— / cost runaway"]
  classDef dom fill:#e8f0fb,stroke:#1f5fae,color:#143d6e;
  class NET,PAY,IDF,GEO,CUS,OPS,SCL dom;
        
The seven failure domains and representative modes in each. Sections 2–12 below catalog these by subsystem; section 13 maps the highest-severity classes to their primary controls.
How to read this page: each subsystem section is a Scenario β†’ Impact β†’ Mitigation β†’ Detail table. The Detail column links to the doc that owns the design. Rows are de-duplicated across the source docs β€” where two subsystems share a failure (e.g. GPS spoof at handover), it appears once under its primary owner and is cross-linked from the other.

2. Booking & lifecycle

Owner: Booking & Delivery Flow. The lifecycle is a finite state machine whose every off-ramp (no partner, cancel, failed handover, dispute) is an explicit side state with defined money behaviour. ESCROW_HELD is the pivot: before it, cancels are clean refunds; after it, work done is paid for.

ScenarioImpactMitigationDetail
Double-tap / duplicate "place booking"Two orders, two chargesIdempotency-key on placement; the second request returns the existing booking β€” never a second order or capture.Booking Β· creation
Payment captured but matching exhausts the cascadeBooker charged, no serviceNO_PARTNER_FOUND β†’ REFUNDED: auto-refund the full held escrow; booker made whole.Booking Β· states
Cancel before ESCROW_HELD (DRAFT/QUOTED/PAYMENT_PENDING)None β€” no money committedFree cancel / void; full refund of any auth. Nothing captured yet.Booking Β· cancel
Cancel after assignment (ASSIGNED/EN_ROUTE_PICKUP)Partner already travellingSmall cancellation fee compensates partner travel; remainder refunded; shown up front.Booking Β· cancel
Partner cancels mid-legJourney stallsRe-dispatch from MATCHING; any completed prior leg stays paid; booker not penalised.Booking Β· cancel
Quote vs final-charge mismatchBooker feels cheatedQuote is locked at booking; re-quote only on a genuine parameter change and only with explicit booker consent.Commission
Network drop mid-bookingAction lost, double-book riskLocal outbox persists the action and replays on reconnect, deduped by idempotency-key; webhook reconciles payment.Booking Β· no-app
Sender absent / refuses at a DOOR pickupTrip wastedRetry, then AT_PICKUP β†’ FAILED_PICKUP; refund minus any travel fee.Booking Β· cancel
Receiver absent at a DOOR dropUndeliverable last mileAuto-fallback to nearest RideChain Point for collection; else FAILED_DELIVERY β†’ RETURNED reverse leg.Last-Mile
Booking OTP not received (SMS down / no signal)Can't confirm consentFallback channels: WhatsApp β†’ IVR voice readout β†’ in-app display β†’ operator-assisted re-send.Booking Β· OTP
Perishable / urgent parcel delayedSpoilage, SLA breachFlag tightens SLA + routing priority; breach triggers proactive notify + partial-refund / re-route policy.Last-Mile
Declared-value dispute on damage / lossContested liabilityDeclared value recorded at booking; claims reconcile against it via DELIVERED β†’ DISPUTED.Booking Β· cancel
Relay second-leg partner never picks up at hubParcel stuck mid-journeyHub holds custody; leg-2 re-dispatched after timeout; SLA clock paused; leg-1 already paid.Last-Mile

3. Onboarding, KYC & identity

Owner: Onboarding & KYC. Identity is the front door for fraud, so the gate is resumable, deepfake-resistant, and one-account-per-Aadhaar. A pending background check never blocks the head start β€” new partners simply start at the lowest trust tier.

ScenarioImpactMitigationDetail
Aadhaar OTP not received (SMS down / Aadhaar phone unreachable)Onboarding stallsRetry + alternate-channel prompts; persistent fail routes to assisted mode at a Point; gate is resumable so no progress is lost.Onboarding Β· KYC
Face / liveness mismatch (deepfake / photo-replay)Spoofed identityActive liveness (blink/turn) + match-score threshold + deepfake-resistant model; repeated fails lock the attempt and flag the device fingerprint.Onboarding Β· KYC
Duplicate Aadhaar (same person, second account)Trust-laundering / multi-account abuseOne active account per Aadhaar token; the identity gate detects the existing token and blocks the duplicate at sign-up.Onboarding Β· KYC
RC / DL expired or owner-name mismatchIllegal / unsafe vehicle on roadVAHAN/Sarathi flags expiry/name mismatch; motorized eligibility withheld until a valid, name-matching document is provided.Onboarding Β· KYC
Penny-drop name mismatch with KYC namePayout to wrong accountPayouts stay disabled until the account holder name matches the KYC name, or it's resolved via manual review with evidence.Onboarding Β· KYC
KYC provider (Cashfree) downtimeOnboarding pipeline haltsQueue + retry the verification (idempotent, never double-verifies); proceed to non-blocking steps; fall back to manual review if downtime persists.Onboarding Β· KYC
Vouch fraud (collusion to inflate starting trust)Bad actor gets undeserved capsVouches raise starting trust only, never bypass KYC; voucher is liable on the abuse signal and can be demoted; graduated tiers cap exposure regardless.Onboarding Β· KYC
Account farms (one operator, many fake accounts)Incentive farming / collusion ringsDevice + SIM fingerprinting clusters related sign-ups; duplicate-Aadhaar block + graph review suppress the farm.Β§9 Fraud
Stolen / borrowed identity attemptImpersonationLiveness + face match must match the OKYC photo of the same person; mismatch blocks onboarding and flags the Aadhaar token.Onboarding Β· KYC
Background check still pendingSlow gate blocks revenuePartner starts at New tier with prepaid low-value parcels only; full limits unlock when the check clears.Onboarding Β· KYC
Partner sells / changes their vehicleMatching offers a non-existent capacityRe-verify the new vehicle (RC via VAHAN, DL still valid) before it can be matched; the old vehicle is retired from the capacity profile.Onboarding Β· KYC
No smartphone at allExcluded segmentPoint-assisted onboarding: operator runs the KYC flow on their own device (with on-device consent), then provisions a lightweight account.Onboarding Β· KYC
Low-literacy user stuck mid-flowDrop-off at the gateVoice-guided vernacular prompts at every step; one-tap escalation to assisted mode where a Point operator co-pilots.Onboarding Β· KYC

4. Payments & settlement

Owners: Payments & Integration and Split-Money Settlement. The platform holds no money (no RBI nodal/PA licence): funds sit in gateway escrow and split per leg via Razorpay Route β†’ Cashfree Easy Split. Everything is paise-integer and webhook-reconciled.

ScenarioImpactMitigationDetail
Both gateways downNo pay-ins possibleQueue the payment intent, retry with backoff across both rails, circuit-break degraded rails, notify booker; nothing matches until a real capture lands.Payments
Webhook never arrives after captureOrder stuck in AUTHORIZEDPolling reconciliation job fetches gateway status and applies the same idempotent ESCROW_HELD transition; stuck orders are swept.Payments
Double / replayed webhookDouble-processing riskDedupe by gateway event-id; append-only ledger keys to one entry, so a duplicate event changes nothing twice.Payments
User pays twice (double-tap)Two captures into escrowShared idempotency key on the order; the second pay is detected and the duplicate auto-refunded.Payments
UPI timeout / pending statusAmbiguous payment statePoll the gateway for the true status before any retry; re-charge only on confirmed failure, always with the same idempotency key.Payments
Partial relay then failure (leg 2 never completes)Mixed delivered/undeliveredPay completed legs (their drop-OTP fired); partial-refund the undelivered remainder; per-leg ledger releases make this exact.Split-Settlement
Chargeback after deliveryRevenue clawed back fraudulentlyDefend with the POD photo + drop-OTP + QR-scan evidence bundle; the custody chain is the proof of delivery.Payments
Split target (partner / Point) KYC incomplete at releaseCan't legally pay the sliceHold that slice in gateway escrow until Cashfree Easy KYC + penny-drop clears; the rest of the split still releases; held slice settles on completion.Split-Settlement
Payout to a closed / invalid UPI handleFunds bounce mid-airRetry, then fall back to the alternate rail or the payee's RideChain Wallet; notify the payee; persistent failure β†’ manual ops with the exact ledger entry.Split-Settlement
COD shortfall at reconciliationNegative partner balanceDebit the partner's wallet for the gap via an ADJUSTMENT; apply a trust-tier hit; repeated shortfalls lower the COD ceiling.Payments
Double-release of the same slicePays a payee twiceIdempotency-key on every ledger entry; a replayed release maps to the same entry and transfers nothing twice.Split-Settlement
Ledger vs gateway mismatch at reconciliationBooks don't tie outFlag the booking and freeze further releases until ops reconciles; the immutable ledger makes the discrepancy traceable to one entry.Split-Settlement
Currency rounding (paise don't divide evenly)Splits drift from the totalAll math in paise integers; remainder paise deterministically allocated to the platform slice, so Ξ£ slices always equals the captured fare.Split-Settlement
Tax-reserve shortfall (under-withheld)Reserve can't cover liabilityTop up from the platform's net margin via an ADJUSTMENT; partners/Points are never clawed back β€” the platform slice absorbs the gap.Split-Settlement
Gateway split API downSettlement can't fireQueue the split instruction and retry with backoff; success-rate router fails over Route β†’ Easy Split; nothing settles until a real transfer confirms.Split-Settlement

5. Last-mile & custody

Owner: Last-Mile Delivery. The last mile is where things physically go wrong most. Custody never transfers without the two-sided gate, so a stranded parcel simply waits in custody rather than going astray. The custody log pinpoints exactly where any chain broke.

ScenarioImpactMitigationDetail
Point closed / operator absent at a scheduled handoverHandover can't happenRun reschedules to the next stop and retries on the return leg; backup nearby Point offered; parcel waits in custody, never handed over without the gate.Last-Mile
Parcel sits too long at a Point (storage limit hit)Operator burdened, parcel staleStorage clock fires a final receiver reminder, then triggers return-to-sender as a reverse leg; operator never bears indefinite storage.Last-Mile
Relay second-leg partner never arrives at the hubParcel stuck, leg-1 already paidHub retains custody; leg 2 re-dispatched from MATCHING after timeout; SLA clock pauses; Partner A keeps the leg-1 slice regardless.Last-Mile
Wrong parcel scanned at handover (QR mismatch)Wrong item deliveredScan must match the assigned parcel-ID or the app blocks the handover β€” no OTP prompt, no custody transfer, no release.Last-Mile
QR seal tampered / openedTheft / contamination en routeTamper-evident seal flags the handover; photo evidence captured; parcel held, escalated to dispute; downstream-leg money gated until resolved.Last-Mile
Block Hub overflow (volume exceeds capacity)Bottleneck, delays cascadeIntake throttling + spillover to a sibling hub; bundling-first dispatch smooths peaks; oversized/perishable get priority slots.Last-Mile
Milk-run vehicle breaks down mid-routeStranded sweep of parcelsRemaining stops re-dispatched to a backup / on-demand partners; already-swept parcels stay in custody until rescued; bookers notified.Routing
Cold-chain break detectedPerishable contents spoilFlag the consignment, re-route to the fastest leg, record the break in the custody log, apply damage/declared-value policy if compromised.Last-Mile
Parcel lost or damaged in transitBooker out a parcel + valueCustody log pinpoints the leg/partner where the chain broke; insurance covers up to the declared-value cap; resolved via the dispute flow.Last-Mile
Receiver cannot reach the PointLast-mile gapHome-drop fallback: convert the final leg to a DOOR delivery (small fee) using landmark addressing; else hold or return-to-sender.Last-Mile
GPS / geofence fails at a remote rural PointAuto-confirm can't fireFall back to operator manual confirm (still two-sided OTP + photo); the geofence check degrades but the other three custody checks hold; logged for audit.Geolocation
Perishable spoilage risk in transitSLA breach, refundPerishable flag forces priority routing + fastest viable leg, Point-storage exclusion, and a spoilage flag triggering proactive notify + partial-refund.Last-Mile

6. Geo & tracking

Owner: Geolocation. Geolocation in the interior is unreliable by default. The rule: degrade gracefully rather than block, but never let a fraud-flagged or stale fix satisfy a custody check. The server timestamp is always authoritative β€” the device clock never is.

ScenarioImpactMitigationDetail
GPS denied / location permission revokedNo auto-confirm at geofenceBlock GPS-based auto-confirm and fall back to operator manual confirm at a Point; prompt to re-grant.Geolocation
No signal / 2G-only areaFixes can't stream liveBuffer fixes in the local outbox and replay on reconnect; SMS-fallback status updates keep the booker informed.Geolocation
GPS drift / low-accuracy fixFalse geofence pass/failEnforce an accuracy threshold before any geofence pass; anchor to the surveyed Point coordinate instead of a drifting fix.Geolocation
Mock-location / GPS spoofFake arrival, early releaseDetect via the OS mock flag + sensor/speed plausibility, flag the fix, and block escrow release until manual confirm.Geolocation
Impossible-speed "teleport" between fixesSpoofed trackSpeed-plausibility check between consecutive fixes flags physically impossible jumps; the fix is rejected and the partner flagged.Geolocation
Battery low on partner deviceTracking gaps mid-jobReduce sampling cadence everywhere to protect the ability to finish the job; warn ops if it risks the SLA.Geolocation
Device clock skewMis-ordered custody eventsUse the trusted server timestamp for all custody and ordering β€” the device clock is never authoritative.Geolocation
Geofence too small at a rural PointLegit arrivals held foreverRadii are tunable per Point; widen the fence where GPS is poor so legitimate arrivals are not blocked.Geolocation
Landmark address ambiguousPartner can't find the spotOperator- or voice-assisted clarification narrows it; otherwise route to the nearest Point anchor as the deliverable point.Geolocation
Tunnel / forest dead zoneStale dot looks "live"Freeze to last-known position with a staleness flag and hold the ETA rather than showing a stale dot as live; resume on reacquire.Geolocation
Partner leaves the geofence before OTPHandover outside custodyBlock the handover and require re-confirmation inside the fence β€” the geofence check must hold at the moment of the OTP.Geolocation
Offline during handoverGeofence/OTP/POD can't postQueue the events locally and reconcile on reconnect, deduped by timestamp; custody holds until confirmed.Geolocation

7. Matching & dispatch

Owner: Nearest-Partner Matching. Matching assumes partners decline, go offline and try to game offers. A single-offer lock prevents thundering herds; a graduated trust gate keeps high-value jobs away from new partners.

ScenarioImpactMitigationDetail
No eligible partner onlineJob can't be served nowWiden the radius progressively β†’ check the milk-run schedule for a later bundle β†’ if still none, NO_PARTNER_FOUND + auto-refund escrow.Matching
All ranked partners declineNo taker for the offerCascade the full ranked list; apply a surge bump to make the job attractive; notify a wider pool before declaring no-partner.Matching
Partner goes offline after acceptingAccepted job goes deadAuto re-dispatch from MATCHING to the next candidate; apply a reliability penalty; booker not charged for the drop.Matching
Thundering herd β€” one job offered to manyDuplicate accepts, racesSingle-offer model with an assignment lock in Redis; only one partner holds the offer at a time.Matching
Over-capacity partner accepts too muchVehicle can't carry the loadCapacity check at accept time (current load + this parcel vs vehicle limit); reject the accept and cascade if it would overflow.Matching
Stale GPS makes "nearest" wrongSub-optimal assignmentEnforce a location-accuracy / freshness threshold; ignore stale fixes and recompute the nearest set on a fresh ping.Geolocation
Spoofed location to grab nearby jobsUnfair / fraudulent offersMock-location / fraud flag on the partner; offers suppressed pending review; cross-checked against geo accuracy signals.Matching
New partner offered a high-value jobOutsized fraud exposureTrust gate blocks it β€” new partners are eligible only for low-value, short, prepaid jobs until graduated.KYC tiers
Relay leg-2 unmatched at hubParcel stalls at hubHold in hub custody, pause the leg SLA clock, re-match leg 2 on a timer; leg 1 stays paid.Matching
Bundling time-window conflictA parcel's SLA can't be met in-batchSplit the batch and re-seed a faster bundle or an on-demand offer.Matching
Vehicle mismatch discovered at pickupUnsafe load riskRe-match to an eligible larger class (or upcharge per policy) rather than forcing an unsafe load; original offer voided.Matching
Fairness vs efficiency tradeoffEither unfair or inefficientFairness boost is bounded β€” it only reorders among already-eligible near-tie candidates and never forces an unsafe or wildly-detoured assignment.Matching

8. Routing

Owner: Fastest-Route Finding. Missing roads, stale maps, floods and broken-down trucks are the norm. The engine never silently drops a parcel: it splits, upgrades, reroutes, or falls back to straight-line + landmark + Point anchor.

ScenarioImpactMitigationDetail
OSRM has no road for a remote hamletNo route, no ETAFall back to straight-line distance + nearest landmark + a manually-placed Point anchor so the partner still gets a destination and a sane ETA buffer.Routing
Stale OSM data (road exists, map doesn't)Detours / unroutableManual road overrides in PostGIS + partner-reported new roads, applied on top of the OSM extract until the next refresh.Routing
Monsoon-flooded routeImpassable edgeSeasonal/monsoon weighting marks the edge impassable; the engine reroutes around it and recomputes ETA conservatively.Routing
Vehicle class can't traverse a planned edgePlan a Bolero down a footpathVehicle-class graph marks the edge impassable for that class, so the route is never planned down it in the first place.Routing
VRP infeasible (capacity / time windows can't fit)Can't service the batch as-isSplit the batch into two runs or upgrade to a higher-capacity vehicle; never silently drop a parcel from a run.Routing
Breakdown mid-routeRun strandedFreeze custody at the current point and re-dispatch the remaining stops to a new partner/vehicle.Last-Mile
GPS reports off-road / jitterBad route inputMap-matching snaps the fix to the nearest plausible road segment using the recent track before any routing happens.Routing
Ferry / river crossing closed (hours / weather)Corridor cutCrossing edge becomes impassable outside operating hours; reroute via an alternate crossing or hold the run for the next window.Routing
Route cache stale after a real-world changeStale route servedTTL bounds staleness; a road-block/flood/closure event invalidates affected keys immediately so the next query re-solves.Routing
ETA comes out wildly off actualBooker mistrustRecompute from the live position with a conservative buffer band; persistent miss feeds back into the corridor's weighting factors.Routing
OSRM & maps provider both downRouting service outageServe last-known cached routes and degrade to straight-line + landmark guidance; Dispatch is alerted to assist manually.Routing
Very large VRP (too many stops for the budget)Solver hangs / spikes CPUCap stops per run and time-box the solver; the heuristic returns the best route found within the budget rather than chasing optimality.Scale

9. Fraud & trust

Cross-cutting across KYC, Geo, Custody and Payments. Graduated trust is the #1 lever β€” it bounds the financial exposure of any single bad actor before any other control even fires. Layered on top are dual-OTP + tamper-evident QR + POD, geofence proof, and graph ML for collusion.

ScenarioImpactMitigationDetail
Fake identity / deepfake at onboardingBad actor inside the gateActive liveness + face match against the OKYC photo + deepfake-resistant model; fail locks the attempt and flags the device.Onboarding Β· KYC
Parcel theft / tampering in custodyLost goods, broken trustDual-OTP + tamper-evident QR seal + geo-stamped POD; the custody log pinpoints the breaking leg; downstream money gated.Last-Mile
Fake delivery (partner marks delivered without handing over)Money released for nothingDrop-OTP from the receiver + geofence proof + POD photo must all line up before escrow releases; no proof, no release.Geolocation
GPS spoof to fake arrival / grab jobsEarly release / unfair offersOS mock flag + speed plausibility + accuracy gate; a flagged fix can't satisfy custody, escrow stays held, offers suppressed.Geolocation
Collusion ring (sender ↔ partner ↔ Point)Coordinated multi-party fraudGraph ML over device/SIM/UPI/route overlaps surfaces clusters; flagged rings reviewed and demoted; graduated trust caps the damage.Β§9 Fraud
Rating manipulation (fake reviews / coordinated downvotes)Skewed trust scoresWeight ratings by verified completed jobs; anomaly-detect coordinated bursts; ratings inform but never solely set the trust tier.KYC tiers
Incentive / referral farmingPromo budget drainedDevice + SIM fingerprinting + duplicate-Aadhaar block cluster fake accounts; bounded, time-boxed promos cap the bleed.Commission
Cash leakage at a PUDO Point (COD)Collected cash not remittedCOD reconciled into the ledger as an ADJUSTMENT; shortfall debits the wallet + trust-tier hit; repeated shortfalls lower the COD ceiling.Split-Settlement
Account farms (one operator, many fake accounts)Trust-laundering at scaleOne-account-per-Aadhaar + device/SIM fingerprint clustering + graph review suppress the farm before it can transact.Onboarding Β· KYC
Social engineering of villagers (impersonating RideChain)Tricked into handing over a parcel / OTPMasked calling (no real numbers exchanged) + IVR awareness messaging; OTP is never asked for by a "support call"; operator-assisted verification.Β§12 Usability
Stolen device with an active sessionHijacked partner accountRe-auth on sensitive actions; remote session revoke; anomaly detection on sudden geo/behaviour change flags the session.Onboarding Β· KYC
Chargeback fraud after a real deliveryRevenue clawed backPOD + drop-OTP + QR-scan evidence bundle defends the chargeback; the custody chain proves the parcel was delivered.Payments

10. Scale & infra

Owner: Scale & Low-Cost. Scale optimisations create their own failure modes β€” a shard gets hot, a queue stampedes, the bill runs away. The edge (Cloudflare) absorbs read load; Redis is a cache (never a source of truth); the ledger is partitioned; budgets cap cost.

ScenarioImpactMitigationDetail
Hot region / block overloads one shardOne shard saturates, others idleDetect skew; split / re-shard the block; route reads to replicas; cap that shard's heavy work.Scale
Thundering herd on surge / festival openStampede at the doorRate-limit at the Cloudflare edge; queue dispatch; serve cached quotes; shed non-urgent work first.Scale
DB write hotspot on the money ledgerLedger write contentionAppend-only writes partitioned by month + region; batch + queue settlement writes off the hot path.Scale
Redis eviction loses live stateLive offer/lock state vanishesTreat Redis as a cache, not a source of truth; rebuild from Postgres; tune TTLs and the maxmemory policy.Scale
Cache stampede on an expired hot keyPile-up of identical rebuildsPer-key lock (single-flight) + stale-while-revalidate so only one rebuild runs while others serve stale.Scale
Webhook storm (PG / KYC re-deliveries)Duplicate-event floodIdempotency keys + a bounded queue absorb duplicates; the reconciliation job is the backstop.Scale
OSRM CPU spike on a big VRPSolver pegs the CPUCap stops per run, time-box the solve, fall back to a greedy route; cache hot route geometry.Scale
Cost runaway (autoscale gone wild)Bill spikes uncontrolledBudgets + billing alerts; hard autoscale caps; backpressure sheds load before the bill spikes.Scale
Festival 10Γ— spikeDemand swamps supplySurge prices demand down; the edge absorbs read load; async queues defer non-urgent work; shards scale per region.Scale
Cross-region latency for a far userSlow responsesEdge terminates close to the user; reads hit the nearest regional DB / replica; keep writes within the shard.Scale
Cold-start a brand-new regionDemand with no supplySeed Points + partners first, then open bookings; a region with no supply never accepts demand it can't serve.Scale
Low-connectivity clients drop mid-actionLost action, double-submit riskOffline outbox persists the action and replays on reconnect, deduped by idempotency key.Scale

11. Compliance & data

Cross-cutting across KYC and Payments. The platform holds no money (no PA/nodal licence), stores no card data (PCI scope minimised), and tokenizes raw Aadhaar. Consent, retention and prohibited-goods screening are first-class.

ScenarioImpactMitigationDetail
DPDP consent / retention obligationRegulatory non-complianceExplicit on-device consent at capture; purpose-bound storage with retention windows; user can withdraw consent and request erasure.Onboarding Β· KYC
Raw-Aadhaar number leak riskSensitive-data breachTokenize via OKYC; never store the raw number; mask in all UI/logs; access is least-privilege and audited.Onboarding Β· KYC
PCI scope from handling card dataHeavy compliance burdenNo card data ever touches RideChain β€” the gateway tokenizes and stores it; we hold only a reference.Payments
GST / TDS edge cases on splitsMis-collected taxA tax reserve is withheld per booking into the platform slice; shortfalls top up from net margin via an ADJUSTMENT, never a clawback.Split-Settlement
Gig-worker norm complianceLabour-law exposureTransparent statements, fair cancellation/surge sharing, and graduated tiers documented; partners see every paise via the ledger.Commission
e-way bill for high-value B2B consignmentsGoods movement non-compliantHigh-value B2B legs require an e-way-bill reference at booking; the parcel can't move without it where the threshold applies.Booking
Prohibited / illegal goods shippedLegal liability, safetyT&C prohibition + category screening at booking + operator visual check at a Point; flagged consignments are held and escalated.Booking
Declared-value cap exceeded on a claimOver-exposure on lossLiability is capped at the declared value recorded at booking; claims reconcile against it; insurance covers up to the cap.Last-Mile

12. Usability, low-literacy & connectivity

Cross-cutting across Booking (no-app) and KYC. Rural reach means many users can't read, have no smartphone, speak the wrong default language, or sit offline. The flow degrades across channels and reading levels.

ScenarioImpactMitigationDetail
User can't read textCan't complete the flowVoice + icon/photo-led UI so size/category are chosen without reading; OTPs read aloud where needed.Booking Β· no-app
No smartphoneExcluded from self-servePoint-assisted booking by the operator + WhatsApp bot + IVR / missed-call callback; same DRAFT β†’ … β†’ SETTLED booking.Booking Β· no-app
Wrong / unsupported language shownConfusion, drop-offHindi-first vernacular UI with language selection; audio prompts in the chosen language across the flow.Booking Β· no-app
Offline at booking / handover timeAction and status lostLocal outbox queues the action and replays on reconnect; SMS-fallback status keeps the booker informed.Booking Β· no-app
Elderly / first-time user overwhelmedAbandoned before completingSimplified assisted screens at a Point; one-tap escalation to a co-piloting operator; minimal steps with confirmations.Onboarding Β· KYC
Fat-finger errors (wrong digit / wrong tap)Wrong booking / wrong OTPConfirmation steps before commit; OTP audio readback; re-quote only on consented change so a mis-tap can't silently overcharge.Booking Β· OTP
SMS OTP not deliveredStuck at a gateFallback channels: WhatsApp β†’ IVR voice readout β†’ in-app display β†’ operator-assisted re-send.Booking Β· OTP
User mistrusts a "support" call asking for OTPSocial-engineering exposureMasked calling means RideChain never needs the real OTP; IVR awareness messaging teaches users never to share it.Β§9 Fraud

13. Severity & priority β€” highest-risk classes

Not every edge case is equal. The four classes below are where a failure costs money, goods, identity integrity or safety β€” so their controls are layered and non-bypassable. The consistent theme: graduated trust bounds the blast radius first, then idempotency, the append-only ledger, and the dual-OTP + POD custody chain make the remaining failures recoverable and provable.

Risk classSeverityPrimary controlsOwner docs
Money loss β€” double-pay, double-release, chargeback, COD leakage, ledger mismatchCriticalIdempotency keys Β· append-only paise ledger Β· webhook + polling reconciliation Β· escrow-held pivot Β· graduated COD ceilingsPayments Β· Split-Settlement
Parcel loss β€” theft, wrong handover, tampering, damage, lost in transitCriticalQR match β†’ dual-OTP β†’ geofenced POD custody gate Β· tamper-evident seal Β· custody log Β· declared-value cap + insuranceLast-Mile Β· Booking
Identity fraud β€” deepfake, duplicate Aadhaar, account farms, collusion, GPS spoofCriticalGraduated trust (#1 lever) Β· liveness + face match Β· one-account-per-Aadhaar Β· device/SIM fingerprint Β· graph MLKYC Β· Β§9 Fraud
Safety β€” unsafe load, social engineering, prohibited goodsHighVehicle-class capacity gate Β· masked calling + IVR awareness Β· prohibited-goods screening Β· operator visual checkMatching Β· Β§12 Usability
Availability / reliability β€” gateway down, hot shard, festival 10Γ—, OSRM downHighDual-gateway failover Β· edge rate-limit + queues Β· cache SWR + single-flight Β· graceful degradation everywhereScale Β· Routing
Inclusion / access β€” no smartphone, low literacy, offline, wrong languageMaterialPoint-assisted flows Β· WhatsApp + IVR Β· voice + icon UI Β· offline outbox Β· SMS-fallback statusBooking Β· KYC
The single most important control is graduated trust. Before any cryptographic, ledger or custody control even runs, a new actor simply cannot touch a high-value parcel or a large COD float. That cap on exposure is what makes every other mitigation a recoverable nuisance rather than a catastrophe.