ClosureConservationCheck

Check that a conserved quantity balances over every holder, as an equality, not as a lower bound on the holders being watched

Infrastructure · Verification · bootstrap 0.11.0

Mechanism

A test of a conserved quantity, as in Conservation, names the closure, meaning every holder of the quantity, including system accounts, fee pools, stock or funds in transit, and rounding remainders, and asserts that the opening balance plus inflows across the boundary equals the outflows plus the closing balance, within a stated rounding bound. A one-sided check, such as asserting that each user gets back at least what they put in, is reported as a bound, not as conservation. The equality constrains totals only: a transfer between two holders inside the closure passes it, even to the wrong holder. The check is itself tested by injecting an unbalanced change, such as a movement recorded on one side only or a balance left out of the sum, as in DetectorSelfTest.

Invariants

Failure modes

Where this came from

—

Builds on

Related

Identity