Reconciliation
Reconciliation verifies that wallet balances match ledger entries, ensuring data integrity and detecting discrepancies.
What is Reconciliation?
Compares two sources of truth:
| Source | Description |
|---|---|
| Wallet Balance | Denormalized field on User/Vendor model |
| Ledger Balance | Sum of posted ledger entries (source of truth) |
Goal: Wallet Balance = Ledger Balance
Why Reconcile?
| Purpose | Benefit |
|---|---|
| Data Integrity | Detect database corruption or tampering |
| Audit Compliance | Meet regulatory verification requirements |
| Bug Detection | Catch programming errors |
| Fraud Detection | Identify unauthorized balance modifications |
Reconciliation Types
| Type | Description |
|---|---|
| User Balance | Verify single user wallet vs ledger |
| Vendor Balance | Verify single vendor wallet vs ledger |
| All Users | Reconcile all user balances |
| All Vendors | Reconcile all vendor balances |
| Trial Balance | Verify total debits = total credits |
Daily Automated Reconciliation
Runs automatically at 2 AM daily.
Tasks Performed:
- Auto-post pending entries > 30 minutes old
- Verify all user balances
- Verify all vendor balances
- Generate and verify trial balance
- Create reconciliation record
- Alert on critical discrepancies
Discrepancy Severity Levels
| Severity | Difference | Action |
|---|---|---|
| LOW | E0.01 - E1.00 | Log only, auto-correct |
| MEDIUM | E1.01 - E10.00 | Alert admin, review |
| HIGH | E10.01 - E100.00 | Alert admin, freeze account |
| CRITICAL | > E100.00 | Alert, freeze, escalate |
Handling Discrepancies
Auto-Correct (< E1.00)
For small rounding errors:
- Find discrepancies < E1.00
- Create manual adjustment journal entry
- Update wallet balance to match ledger
- Log correction in audit trail
Manual Correction (E1.00 - E100.00)
For larger discrepancies:
- Calculate difference
- Investigate cause
- Create manual adjustment with approval
- Update wallet balance
- Notify admin of correction
Investigation Required (> E100.00)
For critical discrepancies:
- Freeze account - Prevent further transactions
- Review audit log - Find cause
- Check ledger entries - Verify all entries posted
- Check wallet transactions - Find orphaned transactions
- Manual correction - After investigation complete
Trial Balance
Lists all accounts with their debit/credit totals.
| Account Code | Account Name | Debit | Credit |
|---|---|---|---|
| 1110 | User Wallets | E50,000 | - |
| 1120 | Vendor Wallets | E25,000 | - |
| 4110 | Fee Revenue | - | E2,500 |
| ... | ... | ... | ... |
| TOTAL | E75,000 | E75,000 |
If debits ≠ credits, there's a fundamental accounting error.
Reconciliation Records
Each run is recorded:
| Field | Description |
|---|---|
reconciliationId | Unique identifier (REC-XXXXXX) |
startedAt | Start timestamp |
completedAt | End timestamp |
status | IN_PROGRESS, COMPLETED, FAILED |
scope | USER, VENDOR, TRIAL_BALANCE, FULL |
results | Counts, discrepancies, trial balance |
Account Statements
Generate detailed transaction history for users/vendors:
Fields Included:
- Opening balance
- Closing balance
- Transaction entries with descriptions
- Running balance
- Counterparty names
Export Formats: CSV, HTML
Monitoring and Alerts
| Severity | Alert Method |
|---|---|
| LOW | Log only |
| MEDIUM | Email to admin |
| HIGH | Email + Slack |
| CRITICAL | Email + Slack + Phone |
Best Practices
- Run daily reconciliation at 2 AM (low traffic time)
- Auto-correct small discrepancies (< E1.00) to reduce noise
- Alert on medium/high discrepancies immediately
- Freeze accounts with critical discrepancies
- Investigate thoroughly before manual corrections
- Document corrections in audit trail with reasons