domain-fintech_skill

This skill helps you design and implement immutable, precise fintech transactions using rust_decimal, event sourcing, and audit trails for compliance.
  • Shell

565

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill zhanghandong/rust-skills --skill domain-fintech

  • SKILL.md3.6 KB

Overview

This skill captures FinTech domain constraints and concrete Rust design guidance for building secure, auditable financial systems. It focuses on precision, immutability, transaction boundaries, and reproducibility to meet regulatory and correctness requirements. The content maps rules to Rust patterns, crates, and coding patterns that enforce financial guarantees.

How this skill works

The skill inspects domain rules (precision, audit trail, consistency) and translates them into implementation constraints and idiomatic Rust choices. It recommends crates (rust_decimal, chrono, uuid, serde) and patterns (value objects, newtypes, event sourcing, RAII transaction scopes) to ensure deterministic, traceable behavior. It highlights common pitfalls and gives small code patterns for Amount and ledger design.

When to use it

  • Building payment, ledger, or trading systems that handle real money
  • Designing transaction processing with strict audit and traceability requirements
  • Enforcing exact monetary arithmetic and preventing precision loss
  • Sharing immutable transaction data across threads or services
  • Implementing double-entry accounting and validated balances

Best practices

  • Never use floating-point (f32/f64) for money—use rust_decimal::Decimal or a validated newtype
  • Model money as a typed value object (Amount/Currency) to prevent currency mixing
  • Keep transactions immutable and traceable—use event sourcing and share with Arc<T>
  • Use RAII or explicit transaction scope types to enforce atomic boundaries
  • Perform checked arithmetic and validation to avoid silent overflows and inconsistencies
  • Log structured events with trace IDs and serialize with serde for auditability

Example use cases

  • Implementing a settlement engine that must preserve cent-level precision and full audit logs
  • Designing a ledger with double-entry bookkeeping to guarantee money conservation
  • Creating thread-safe immutable transaction records shared across services via Arc
  • Building APIs that validate currency and amount types to avoid accidental currency mixing
  • Instrumenting financial flows with structured tracing for compliance and dispute resolution

FAQ

Floating point loses exactness and can introduce rounding errors; use rust_decimal or an integer-based scaled newtype for deterministic precision.

How do I ensure transactions are auditable?

Model state changes as immutable events, record structured logs with trace IDs, and store events in an append-only store or ledger; share read-only views with Arc<T> to avoid mutation.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
domain-fintech skill by zhanghandong/rust-skills | VeilStrat