Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Ledger Accounting?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/adityaaatiwari-ledger-accounting)
---
description: Implement accurate double-entry financial ledgers using integer minor units, immutable entries, and atomic transfers
profile: standard
tags: payments, architecture, database, fintech
---
# Ledger accounting
Use when building wallets, payouts, invoicing, marketplace splits, or internal credit balances.
## Data integrity
- Store monetary amounts strictly as signed integers in smallest currency units (cents/paise) alongside an explicit ISO-4217 currency code—never IEEE-754 floats.
- Model transfers as append-only balanced journal entries where every transaction's debits and credits sum strictly to zero per currency.
- Never overwrite historical ledger rows; correct errors solely via linked offsetting adjustment or reversal entries.
## Concurrency and transfers
- Prevent double-spending by executing balance checks + debits/credits inside database transactions using row locks (`SELECT ... FOR UPDATE`), optimistic versions, or serializable isolation.
- Order multi-account lock acquisitions deterministically (sorted by account ID) to avoid deadlocks under concurrent transfers.
- Require unique client idempotency keys on every transfer entry creation.
## Verify
Assert ledger-wide balance conservation (`SUM(amount) = 0`), concurrent withdrawal limits without negative drift, and idempotent retries.