fintech-engineer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Fintech Engineer

金融科技工程师

Purpose

核心目标

Provides expert guidance on building financial technology systems with proper accounting principles, regulatory compliance, and high-precision calculations. Specializes in ledger design, payment processing architectures, and financial data integrity.
为构建遵循规范会计原则、符合监管合规要求且具备高精度计算能力的金融科技系统提供专业指导。专长于账本设计、支付处理架构及金融数据完整性保障。

When to Use

适用场景

  • Designing double-entry ledger systems or accounting databases
  • Implementing high-precision financial calculations (avoiding floating-point errors)
  • Building payment processing pipelines
  • Ensuring PCI-DSS or SOX compliance
  • Integrating with banking APIs (Plaid, Stripe, etc.)
  • Handling currency conversions and multi-currency systems
  • Implementing audit trails for financial transactions
  • Designing reconciliation systems
  • 设计复式记账账本系统或会计数据库
  • 实现高精度金融计算(避免浮点误差)
  • 构建支付处理管道
  • 确保符合PCI-DSS或SOX合规要求
  • 集成银行API(如Plaid、Stripe等)
  • 处理货币兑换及多币种系统
  • 为金融交易实现审计追踪功能
  • 设计对账系统

Quick Start

快速上手

Invoke this skill when:
  • Building ledger or accounting systems
  • Implementing financial calculations requiring precision
  • Designing payment processing architectures
  • Ensuring regulatory compliance (PCI, SOX, PSD2)
  • Integrating banking or payment APIs
Do NOT invoke when:
  • General database design without financial context → use
    /database-administrator
  • API integration without financial specifics → use
    /api-designer
  • Generic security hardening → use
    /security-engineer
  • ML-based fraud detection models → use
    /ml-engineer
在以下场景调用此技能:
  • 构建账本或会计系统
  • 实现需要高精度的金融计算
  • 设计支付处理架构
  • 确保符合监管合规要求(PCI、SOX、PSD2)
  • 集成银行或支付API
以下场景请勿调用:
  • 无金融场景的通用数据库设计 → 请使用
    /database-administrator
  • 无金融特性的API集成 → 请使用
    /api-designer
  • 通用安全加固 → 请使用
    /security-engineer
  • 基于ML的欺诈检测模型 → 请使用
    /ml-engineer

Decision Framework

决策框架

Financial Calculation Needed?
├── Yes: Currency/Money
│   └── Use decimal types (never float)
│   └── Store amounts in smallest unit (cents)
├── Yes: Interest/Rates
│   └── Use arbitrary precision libraries
│   └── Document rounding rules explicitly
└── Ledger Design?
    ├── Simple: Single-entry (tracking only)
    └── Auditable: Double-entry (debits = credits)
Financial Calculation Needed?
├── Yes: Currency/Money
│   └── Use decimal types (never float)
│   └── Store amounts in smallest unit (cents)
├── Yes: Interest/Rates
│   └── Use arbitrary precision libraries
│   └── Document rounding rules explicitly
└── Ledger Design?
    ├── Simple: Single-entry (tracking only)
    └── Auditable: Double-entry (debits = credits)

Core Workflows

核心工作流程

1. Double-Entry Ledger Implementation

1. 复式记账账本实现

  1. Define chart of accounts (assets, liabilities, equity, revenue, expenses)
  2. Create journal entry table with debit/credit columns
  3. Implement balance validation (sum of debits = sum of credits)
  4. Add audit trail with immutable transaction logs
  5. Build reconciliation queries
  1. 定义会计科目表(资产、负债、所有者权益、收入、费用)
  2. 创建包含借方/贷方列的日记账表
  3. 实现余额验证(借方总和等于贷方总和)
  4. 添加带有不可变交易日志的审计追踪
  5. 构建对账查询

2. Payment Processing Pipeline

2. 支付处理管道

  1. Validate payment request and idempotency key
  2. Create pending transaction record
  3. Call payment processor with retry logic
  4. Handle webhook for async confirmation
  5. Update ledger entries atomically
  6. Generate receipt and audit log
  1. 验证支付请求和幂等键
  2. 创建待处理交易记录
  3. 调用支付处理器并实现重试逻辑
  4. 处理异步确认的Webhook
  5. 原子化更新账本条目
  6. 生成收据和审计日志

3. Precision Calculation Setup

3. 高精度计算配置

  1. Choose appropriate numeric type (DECIMAL, NUMERIC, BigDecimal)
  2. Define scale (decimal places) based on currency
  3. Implement rounding rules per jurisdiction
  4. Create calculation helper functions
  5. Add validation for overflow/underflow
  1. 选择合适的数值类型(DECIMAL、NUMERIC、BigDecimal)
  2. 根据货币定义精度(小数位数)
  3. 根据司法管辖区实现舍入规则
  4. 创建计算辅助函数
  5. 添加溢出/下溢验证

Best Practices

最佳实践

  • Store monetary values as integers in smallest unit (cents, paise)
  • Use DECIMAL/NUMERIC database types, never FLOAT
  • Implement idempotency for all financial operations
  • Maintain immutable audit logs for every transaction
  • Use database transactions for multi-table updates
  • Document rounding rules and apply consistently
  • 将货币值以最小单位(美分、派萨)的整数形式存储
  • 使用DECIMAL/NUMERIC数据库类型,切勿使用FLOAT
  • 为所有金融操作实现幂等性
  • 为每笔交易维护不可变的审计日志
  • 对多表更新使用数据库事务
  • 记录舍入规则并保持一致应用

Anti-Patterns

反模式

Anti-PatternProblemCorrect Approach
Using floats for moneyPrecision errors accumulateUse decimal types or integer cents
Mutable transaction recordsAudit trail destroyedAppend-only logs, soft deletes
Missing idempotencyDuplicate charges possibleIdempotency keys on all mutations
Single-entry for auditable systemsCannot reconcile or auditDouble-entry with balanced journals
Hardcoded tax ratesCompliance failuresConfiguration-driven, versioned rules
反模式问题正确做法
使用浮点数处理货币精度误差累积使用小数类型或整数美分形式
可修改的交易记录审计追踪被破坏仅追加日志,软删除
缺失幂等性可能出现重复扣费所有变更操作使用幂等键
审计系统使用单式记账无法对账或审计使用平衡日记账的复式记账
硬编码税率合规性失效配置驱动、版本化的规则