
Domain Fintech
- 1.2k installs
- 1.3k repo stars
- Updated May 24, 2026
- actionbook/rust-skills
domain-fintech is an agent skill that encodes fintech domain constraints and idiomatic Rust patterns for developers building auditable trading, ledger, and payment systems without floating-point money bugs.
About
domain-fintech is a Layer 3 domain skill in actionbook/rust-skills for fintech apps in Rust. It translates financial rules—immutable audit trails, no floating-point currency, transaction boundaries, compliance logging, and reproducibility—into concrete Rust design choices such as rust_decimal, Arc immutability, clear ownership, and structured tracing. Developers reach for domain-fintech when implementing money, transactions, exchange rates, ledgers, or accounting logic where precision and auditability matter. The skill is user-invocable false, meant for automatic application when fintech keywords appear in backend Rust work.
- Enforces rust_decimal instead of f64 for all monetary values
- Requires immutable records using Arc<T> for audit trails
- Maps 5 core financial domain rules to concrete Rust design constraints
- Provides traceable decision tree from constraints to ownership and type-driven patterns
- Includes bilingual keyword support for global fintech projects
Domain Fintech by the numbers
- 1,190 all-time installs (skills.sh)
- +50 installs in the week ending Jul 28, 2026 (Skillselion tracking)
- Ranked #357 of 4,386 Backend & APIs skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/actionbook/rust-skills --skill domain-fintechAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1.2k |
|---|---|
| repo stars | ★ 1.3k |
| Security audit | 3 / 3 scanners passed |
| Last updated | May 24, 2026 |
| Repository | actionbook/rust-skills ↗ |
How do you handle money safely in Rust fintech apps?
Apply domain-specific financial constraints and Rust patterns when creating accurate, auditable fintech features.
Who is it for?
Rust backend engineers building trading, payment, ledger, or accounting services requiring auditability and decimal precision.
Skip if: Non-financial Rust apps or teams comfortable using f64 for currency without domain guardrails.
When should I use this skill?
User builds fintech, trading, payment, ledger, currency, or exchange-rate features in Rust.
What you get
Rust modules with decimal-safe types, immutable audit trails, transaction boundaries, and compliance logging patterns
- domain-constrained Rust modules
- ledger patterns
Files
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
RULE: Never use f64 for money
WHY: Floating point loses precision
RUST: Use rust_decimal::DecimalAudit Requirements
RULE: All transactions must be immutable and traceable
WHY: Regulatory compliance, dispute resolution
RUST: Arc<T> for sharing, event sourcing patternConsistency
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
"Need precise decimal math"
↓ m05-type-driven: Newtype for Currency/Amount
↓ rust_decimal: Use Decimal type
"Need transaction boundaries"
↓ m12-lifecycle: RAII for transaction scope
↓ m09-domain: Aggregate boundaries---
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
use rust_decimal::Decimal;
#[derive(Clone, Debug, PartialEq)]
pub struct Amount {
value: Decimal,
currency: Currency,
}
impl Amount {
pub fn new(value: Decimal, currency: Currency) -> Self {
Self { value, currency }
}
pub fn add(&self, other: &Amount) -> Result<Amount, CurrencyMismatch> {
if self.currency != other.currency {
return Err(CurrencyMismatch);
}
Ok(Amount::new(self.value + other.value, self.currency))
}
}---
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 |
Related skills
FAQ
Why does domain-fintech ban floating point?
domain-fintech enforces rust_decimal for currency because f64 rounding breaks financial accuracy. The skill maps precision domain rules directly to decimal types and explicit rounding policies in Rust services.
What Rust patterns does domain-fintech recommend?
domain-fintech recommends Arc<T> immutability for audit trails, clear ownership for transaction boundaries, rust_decimal for money, and structured tracing for compliance logging in fintech backends.
Is Domain Fintech safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.