Codex · Reference · Governance
REFERENCE

Governance

Liqua is governed at near-unanimity. Two powers — reverting the chain (rollback) and updating a parameter (change) — each require 98% agreement. To keep that from freezing the chain, the 98% is measured against attesting ve-weight in a rolling window, not all-time supply. This page explains the rule and how it runs.

Quorum
98%
Of
attesting ve-weight
Window
100,800 blocks
Powers
rollback · change

The rule

A proposal passes only if, over a continuous trailing window of recent blocks:

approvingWeight / attestingWeight(window)  0.98

// in Governor98.sol, exactly:
forWeight * BPS >= QUORUM_BPS * attestingWeight   // QUORUM_BPS = 9800, BPS = 10000

Two design choices make this work in practice:

Who feeds the denominator

Summing the online set on-chain every block would be unbounded gas, so the consensus layer publishes the rolling-window attesting total to the contract each block via setAttestingWeight() (onlyChain). Validators who co-sign the head are what populate that window — co-signing is how your stake earns a governance voice.

Two powers

PowerKindWhat it does · how it's enacted
ChangeCHANGEupdates a parameter. On execute, the contract does target.call(data) — e.g. calling VeLock.setBoostMaxBps(). Enacted entirely on-chain.
RollbackROLLBACKreverts the chain to a prior height (R9). On execute it emits Executed(ROLLBACK); the consensus layer watches for that and performs the revert.

Proposal lifecycle

Four steps, all in Governor98.sol:

  1. Propose

    propose(kind, payload)payload is abi-encoded: a target height for ROLLBACK, or (target, calldata) for CHANGE. Returns the proposal id and emits Proposed.

  2. Vote

    castVote(id) adds ve.veWeight(you) to the proposal's forWeight, once per address. Reverts if you have no weight or have already voted. Emits Voted.

  3. Check quorum

    quorumMet(id) is true once forWeight reaches 98% of the current attestingWeight.

  4. Execute

    execute(id) reverts BELOW_98 unless quorum is met; otherwise it performs the CHANGE call (or emits for a ROLLBACK) and marks the proposal executed. Emits Executed.

Worked example · retuning a parameter

The verified demo evm/gov-escrow-demo.mjs runs the whole path end to end: a CHANGE proposal raises VeLock.boostMaxBps from 50% → 80%, reaching 98% of attesting ve-weight, and executes the on-chain retune — then the now-higher boost is reflected in subsequent ve-weight reads. The same demo shows a RewardEscrow claim reverting before its confirmation gate and minting after.

node evm/gov-escrow-demo.mjs   # 98% CHANGE retunes VeLock.boostMaxBps 50%→80% on-chain

Governance & genesis

The parameters a proposal can change are exactly the ones committed at genesis — ve-lock bounds, emission shape, the confirmation gate, even the quorum window. Changing any committed param is, in effect, moving to a new genesis, which is precisely why it takes 98%: the chain should be very hard to re-constitute.

The liveness tradeoff — and what's missing
LIQUA · CODEX · Governance · part of Liqua Chain · 7SLF STUDIOS