Conservation
For every asset and every right kind:
- I1 — conservation: the units held by all accounts add up to the kind’s
supply. Supply changes only through the issuer’s
issueand a holder’sredeem. - I2 — locks: the units locked in a position add up to the position’s encumbered units, and a position never locks more than it holds.
Further invariants cover the modules built on top: encumbrance records match their locks, income pools match their balances, waterfall and redemption pools match their accounting, and each bridge route’s escrow matches what left minus what came back.
- The chain checks itself. A running sum per (asset, kind) is compared
against the supply every
invariant_check_periodblocks (100 on testnet-0), and a full scan of every position and lock runs everyfull_check_periodblocks (1 000). A broken invariant halts the chain rather than let it continue in a wrong state. - The indexer checks the chain. Every block, the indexer compares its
derived tables with the chain’s
InvariantStatusfor each (asset, kind). A disagreement is recorded, never corrected, and counted as drift. - The explorer shows it. The home page’s integrity cell and the Integrity page show the lag and the drift count; testnet-0 has run at drift 0 since genesis.
CLI
aevad query rights invariant <asset-id> # per kind: sum of positions, supply, ok
aevad invariants # every asset (on a node's own state)Last updated