FinTech Code Review
When to use this skill
- •Before finalizing any pull request or code block related to transactions, ledgers, or balances.
- •When implementing Cloud Functions that handle money.
- •When writing Firestore transactions.
- •When reviewing Flutter code that displays sensitive financial data.
How to use it
- •Review for Financial Correctness:
- •Ensure all monetary values are handled as integers (e.g., cents/micros) to avoid floating-point errors.
- •Verify that positive/negative signs are strictly enforced (e.g., debits are negative, credits are positive).
- •Check for Idempotency:
- •Verify that all transfer/transaction functions use an
eventIdoridempotencyKeyto prevent double-spending. - •Ensure Firestore writes are idempotent.
- •Verify that all transfer/transaction functions use an
- •Analyze Concurrency & Safety:
- •Confirm that all ledger updates happen within a Firestore Transaction.
- •Check for race conditions where two processes might read old balances simultaneously.
- •Security Audit:
- •Ensure service accounts are used for backend operations.
- •Verify that the client cannot spoof transaction results.