
Domain Fintech
This is your checklist for building anything that touches money. It pushes you away from f64 (precision loss) toward rust_decimal, shows you how to model immutable transactions with Arc for audit trails, and maps fintech domain rules (double-entry accounting, regulatory compliance) directly to Rust patterns. The trace-down tables connect constraints like "money can't disappear" to specific designs like newtypes and RAII transaction scopes. Most valuable if you're building payment systems, trading platforms, or ledgers where getting the money math wrong isn't just a bug, it's a legal problem. Covers currency types, event sourcing for transactions, and the common mistakes that break audit requirements.
- skills.sh installs
- 581
- GitHub stars
- 1.3K
- last updated
- Jul 14, 2026
Install
$ npx -y skills add zhanghandong/rust-skills --skill domain-fintech --agent claude-codeInstalls into .claude/skills of the current project.
Files
FinTech Domain
Layer 3: Domain Constraints
Domain Constraints → Design Implications
| Domain Rule | Design Constraint | Rust Implication |
|---|---|---|
| Audit trail | Immutable records | Arc, no mutation |
| Precision | No floating point | rust_decimal |
| Consistency | Transaction boundaries | Clear ownership |
| Compliance | Complete logging | Structured tracing |
| Reproducibility | Deterministic execution | No race conditions |
Critical Constraints
Financial Precision
RULE: Never use f64 for money
WHY: Floating point loses precision
RUST: Use rust_decimal::Decimal
Audit Requirements
RULE: All transactions must be immutable and traceable
WHY: Regulatory compliance, dispute resolution
RUST: Arc<T> for sharing, event sourcing pattern
Consistency
RULE: Money can't disappear or appear
WHY: Double-entry accounting principles
RUST: Transaction types with validated totals
Trace Down ↓
From constraints to design (Layer 2):
"Need immutable transaction records"
↓ m09-domain: Model as Value Objects
↓ m01-ownership: Use Arc for shared immutable data
Sponsors
Details
- Repository
- github.com/zhanghandong/rust-skills
- Category
- Rust
- First seen
- Jun 3, 2026
More from zhanghandong/rust-skills
All 34- Domain Ml573
- Domain Iot568
- M15 Anti Pattern5.6K
- Coding Guidelines1.2K
- M10 Performance895
- M07 Concurrency844
- M06 Error Handling827
- Rust Refactor Helper821
- M01 Ownership809
- M04 Zero Cost789
- M05 Type Driven786
- M02 Resource783
- M03 Mutability773
- M12 Lifecycle764
- M14 Mental Model751
- M09 Domain750
- M11 Ecosystem747
- M13 Domain Error738
- Rust Trait Explorer731
- Rust Code Navigator728
- Unsafe Checker726
- Domain Cli709
- Rust Symbol Analyzer702
- Rust Call Graph699