Skip to content

P6: Implement ledger-first credit grants and usage charges #26

@wauputr4

Description

@wauputr4

Goal

Implement immutable credit ledger operations for admin grants and gateway usage charges.

Acceptance Criteria

  • Credit grants always insert a ledger row.
  • Usage charges calculate input and output microcredits with integer math.
  • Wallet balance updates happen inside a database transaction.
  • No balance mutation is possible without a ledger row.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: meteringUsage events, token accounting, and credit chargesarea: walletCredit wallet, ledger, grants, and balance safetyenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions