domain-fintech

Use when building fintech apps. Keywords: fintech, trading, decimal, currency, financial, money, transaction, ledger, payment, exchange rate, precision, rounding, accounting, 金融, 交易系统, 货币, 支付

By actionbook · 2,306 installs

npx skills add actionbook/rust-skills --skill domain-fintech

Source repository · Upstream listing

FinTech Domain Layer 3: Domain Constraints Domain Constraints → Design Implications Domain Rule Design Constraint Rust Implication Audit trail Immutable records Arc<T , 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 Audit Requirements Consistency Trace Down ↓ From constraints to design (Layer 2): Key Crates Purpose Crate Decimal math rust decimal Date/time chrono, time UUID uuid Serialization serde Validation validator Design Patterns Pattern Purpose Implementation Currency newtype Type safety struct Amount(Decimal); Transaction Atomic operations Event sourcing Audit log Traceability Structured logging with trace IDs Ledger Double entry Debit/credit balance Code Pattern: Currency Type Common Mistakes Mistake Domain Violation Fix Using f64 Precision loss rust decimal Mutable transaction Audit trail broken Immutable + events String for amount No validation Validated newtype Silent overflow Money disappears Checked arithmetic Trace to Layer 1 Constraint Layer 2 Pattern Layer 1 Implementation Immutable records Event sourcing Arc<T , Clone Transaction scope Aggregate Owned children Precision Value Object rust decimal newtype Thread safe sharing Shared immutable Arc (not Rc) Related Skills When See Value Object design m09 domain Ownership for immutable m01 ownership Arc for sharing m02 resource Error handling m13 domain error