Governance

Write a proposal

The parameters governance can change, and how a parameter change is encoded.

Write a proposal

A parameter change is a call to GovHub.updateParam(key, value, target), wrapped in a proposal. The governance site builds that call for you, but it helps to know what it is building.

Anatomy of a proposal

targets     [ govHub ]
values      [ 0 ]
calldatas   [ updateParam("burnRatio", 0x...02ee, validatorSet) ]
description "# Raise the burn ratio\n\nBecause ..."

The title is the first heading of the description. Everything after it is the body that voters read.

What you can change

Six system contracts expose parameters to governance, and nothing outside them can be touched by a proposal: the validator set, the slash indicator, the stake hub, the system reward, the governor itself and the timelock.

What governance can change lists every one of them with what it does and the range it accepts, in plain language. The proposal form shows the same range next to the parameter while you fill it in.

Every parameter has a range enforced on-chain. A proposal that sets a value outside it will pass its vote and then revert on execution, so check the range before you write the description, not after.

Values are encoded, not typed

The value is passed as packed bytes, not as a number. An address is packed as an address, a uint256 as 32 bytes, a boolean as a uint256 of one or zero. The proposal form on the governance site does this for you and shows you the resulting call before you sign.

Writing a description people will vote on

State the change in the title. In the body, answer three questions: what breaks today, what this value fixes, and what the risk is if you are wrong. Proposals that skip the third question tend to lose, and they should.