🎯

domain-fintech

🎯Skill

from actionbook/rust-skills

VibeIndex|
What it does

Enables precise financial calculations and modeling with strict type safety, decimal precision, and immutable transaction handling for fintech applications.

πŸ“¦

Part of

actionbook/rust-skills(35 items)

domain-fintech

Installation

Quick InstallInstall with npx
npx skills add ZhangHanDong/rust-skills
CargoRun with Cargo (Rust)
cargo install cowork
git cloneClone repository
git clone https://github.com/ZhangHanDong/rust-skills.git
Add MarketplaceAdd marketplace to Claude Code
/plugin marketplace add ZhangHanDong/rust-skills
πŸ“– Extracted from docs: actionbook/rust-skills
13Installs
-
AddedFeb 4, 2026

Skill Details

SKILL.md

"Use when building fintech apps. Keywords: fintech, trading, decimal, currency, financial, money, transaction, ledger, payment, exchange rate, precision, rounding, accounting, ι‡‘θž, δΊ€ζ˜“η³»η»Ÿ, 货币, ζ”―δ»˜"

Overview

# 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 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

"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

```rust

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 {

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, 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 |

More from this repository10

πŸͺ
actionbook-rust-skillsπŸͺMarketplace

Comprehensive Rust development assistant with meta-question routing, coding guidelines, version queries, and ecosystem support

🎯
coding-guidelines🎯Skill

Provides comprehensive Rust coding guidelines covering naming conventions, best practices, error handling, memory management, concurrency, and code style recommendations.

🎯
rust-refactor-helper🎯Skill

Performs safe Rust refactoring by analyzing symbol references, dependencies, and potential impacts using Language Server Protocol (LSP) operations.

🎯
m09-domain🎯Skill

Guides domain modeling in Rust by helping identify entities, value objects, aggregates, and their ownership patterns with domain-driven design principles.

🎯
m05-type-driven🎯Skill

Enforces compile-time type safety by preventing invalid states through type-level design techniques like newtypes, type states, and phantom types.

🎯
rust-learner🎯Skill

Retrieves and provides comprehensive Rust and crate information, including versions, features, documentation, and changelogs from authoritative sources.

🎯
m02-resource🎯Skill

Guides developers in selecting the right smart pointer and resource management strategy based on ownership, thread safety, and design constraints.

🎯
m11-ecosystem🎯Skill

Guides Rust developers in selecting, integrating, and managing ecosystem dependencies with best practices and strategic decision-making.

🎯
rust-trait-explorer🎯Skill

Explores Rust trait implementations, revealing which types implement specific traits and their implementation details using LSP.

🎯
m04-zero-cost🎯Skill

Guides developers in choosing zero-cost abstractions by analyzing type system errors and runtime polymorphism needs in Rust.