Skip to content

Migrate BalanceLedger.amount from Float to Decimal with running totals #261

Description

@kilodesodiq-arch

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.

Metadata

Metadata

Assignees

Labels

GrantFox OSSIssue tracked in GrantFox OSSMaybe RewardedIssue may be eligible for a GrantFox rewardOfficial Campaign | FWC26Campaign: Official Campaign | FWC26area:backendBackend (NestJS) areakind:dataBacklog label: kind:datakind:performancePerformance / scalability

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions