Problem Statement. BalanceLedger.amount is Float. It's the canonical source of
locked-fund totals; corruption in this column breaks the entire claim workflow.
Technical Context. #29 also touches this.
Expected Outcome. Schema migration + a denormalised running total column
(BalanceLedgerRunning.totalLocked, last 24h snapshot) computed by a scheduled job.
Acceptance Criteria.
- An end-to-end test asserts that the running total matches
Σ BalanceLedger.amount for the last 24 h.
Files or modules likely to be affected.
prisma/schema.prisma,
prisma/migrations/*,
new src/jobs/balance-ledger-snapshot.job.ts.
Dependencies. #29.
Difficulty. Medium
Estimated effort. M
Backlog item #53 from `docs/maintainer-issue-backlog.md.
Problem Statement.
BalanceLedger.amountisFloat. It's the canonical source oflocked-fund totals; corruption in this column breaks the entire claim workflow.
Technical Context. #29 also touches this.
Expected Outcome. Schema migration + a denormalised running total column
(
BalanceLedgerRunning.totalLocked, last 24h snapshot) computed by a scheduled job.Acceptance Criteria.
Σ BalanceLedger.amountfor the last 24 h.Files or modules likely to be affected.
prisma/schema.prisma,prisma/migrations/*,new
src/jobs/balance-ledger-snapshot.job.ts.Dependencies. #29.
Difficulty. Medium
Estimated effort. M
Backlog item #53 from `docs/maintainer-issue-backlog.md.