Reference

Trading invariants

These conditions are required at every successful external state transition. Reverting calls leave the prior state unchanged. Protocol-wide invariants are catalogued separately in Protocol invariants.

Pair custody

Unsolicited YES or NO donations can make a balance greater than its stored reserve. Before reserve-dependent mutations, the pair synchronizes stored reserves upward to those effective balances. INVALID is never a trading asset and cannot be donated through an accepted ERC-1155 callback.

Router custody

Every successful router operation ends with the same INVALID, YES, and NO balances with which that operation began. This deliberately preserves any pre-existing balances while preventing the operation from accumulating new share residue.

Swaps

The product comparison starts from effective reserves so a donation cannot be mistaken for swap-created growth.

Lifecycle

Terminal lifecycle closure includes question end or resolution and a universe fork. It blocks initialization, liquidity addition, and both swap forms; it does not block proportional liquidity removal. Pending fork continuation and an inactive security pool also pause those trading operations, but they are temporary safety states rather than terminal closure.