fintech-engineer
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseFintech 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. 复式记账账本实现
- Define chart of accounts (assets, liabilities, equity, revenue, expenses)
- Create journal entry table with debit/credit columns
- Implement balance validation (sum of debits = sum of credits)
- Add audit trail with immutable transaction logs
- Build reconciliation queries
- 定义会计科目表(资产、负债、所有者权益、收入、费用)
- 创建包含借方/贷方列的日记账表
- 实现余额验证(借方总和等于贷方总和)
- 添加带有不可变交易日志的审计追踪
- 构建对账查询
2. Payment Processing Pipeline
2. 支付处理管道
- Validate payment request and idempotency key
- Create pending transaction record
- Call payment processor with retry logic
- Handle webhook for async confirmation
- Update ledger entries atomically
- Generate receipt and audit log
- 验证支付请求和幂等键
- 创建待处理交易记录
- 调用支付处理器并实现重试逻辑
- 处理异步确认的Webhook
- 原子化更新账本条目
- 生成收据和审计日志
3. Precision Calculation Setup
3. 高精度计算配置
- Choose appropriate numeric type (DECIMAL, NUMERIC, BigDecimal)
- Define scale (decimal places) based on currency
- Implement rounding rules per jurisdiction
- Create calculation helper functions
- Add validation for overflow/underflow
- 选择合适的数值类型(DECIMAL、NUMERIC、BigDecimal)
- 根据货币定义精度(小数位数)
- 根据司法管辖区实现舍入规则
- 创建计算辅助函数
- 添加溢出/下溢验证
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-Pattern | Problem | Correct Approach |
|---|---|---|
| Using floats for money | Precision errors accumulate | Use decimal types or integer cents |
| Mutable transaction records | Audit trail destroyed | Append-only logs, soft deletes |
| Missing idempotency | Duplicate charges possible | Idempotency keys on all mutations |
| Single-entry for auditable systems | Cannot reconcile or audit | Double-entry with balanced journals |
| Hardcoded tax rates | Compliance failures | Configuration-driven, versioned rules |
| 反模式 | 问题 | 正确做法 |
|---|---|---|
| 使用浮点数处理货币 | 精度误差累积 | 使用小数类型或整数美分形式 |
| 可修改的交易记录 | 审计追踪被破坏 | 仅追加日志,软删除 |
| 缺失幂等性 | 可能出现重复扣费 | 所有变更操作使用幂等键 |
| 审计系统使用单式记账 | 无法对账或审计 | 使用平衡日记账的复式记账 |
| 硬编码税率 | 合规性失效 | 配置驱动、版本化的规则 |