rust-fintech

Domain Rule Design Constraint Rust Implication

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "rust-fintech" with this command: npx skills add peixotorms/odinlayer-skills/peixotorms-odinlayer-skills-rust-fintech

FinTech Development

Domain Constraints

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 Rules

  • Never use f64 for money — floating point loses precision. Use rust_decimal::Decimal .

  • All transactions must be immutable and traceable — regulatory compliance requires event sourcing.

  • Money can't disappear or appear — double-entry accounting with validated totals.

Key Crates

Purpose Crate

Decimal math rust_decimal

Date/time chrono, time

UUID uuid

Serialization serde

Validation validator

Currency Type Pattern

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))
}

}

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

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

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

elementor-hooks

No summary provided by upstream source.

Repository SourceNeeds Review
General

elementor-themes

No summary provided by upstream source.

Repository SourceNeeds Review
General

elementor-controls

No summary provided by upstream source.

Repository SourceNeeds Review
General

elementor-forms

No summary provided by upstream source.

Repository SourceNeeds Review