Skip to content

Testing: Property/invariant tests for contract accounting (proptest) #801

Description

@joelpeace48-cell

Context

Financial invariants (sum of balances == credited - redeemed; reserve >= outstanding liabilities;
no negative balances) should be proven across randomized op sequences, not just example tests.

Scope

  • proptest/quickcheck sequences of credit/claim/redeem/withdraw/fund and assert invariants after each.
  • Shrinking to minimal failing sequences; run in CI.

Acceptance criteria

  • Invariants hold across thousands of randomized sequences; failures shrink to a minimal repro.

Verification

  • CI runs the proptest suite; a seeded accounting bug is caught and shrunk.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions