dtcpay
Apr 2024 – Present · SingaporeMAS-licensed payment institution (fiat + stablecoin). Owned the core flow of the consumer e-wallet app: top-up → withdrawal → daily reconciliation; every balance change is booked by the wallet service.
- Concurrency safety (no overdraft): a single conditional UPDATE checks and deducts the balance under a row lock, so concurrent debits queue up and never go negative.
- Idempotent APIs: one-time Redis tokens block duplicate submits; a unique index on the business order ID is the final guard.
- Lost-callback recovery: verify signature and amount on channel callbacks; scheduled jobs query the channel to recover missed notifications.
- Idempotent payouts: freeze funds before payout; on channel timeout only query, never resend; deduct on success, unfreeze on failure.
- Eventual consistency: debit and pending notification are written in one DB transaction, then delivered via Kafka with retries (local message table).