Democracy
Overview
On-chain governance is useful for controlling system parameters, authorizing trusted oracles and upgrading the core protocols. The architecture adopted by interBTC is modelled on Polkadot with some significant changes:
- Optimistic Governance
No Council, only public proposals from community
Community can elect a Technical Committee to fast-track proposals
Referenda are Super-Majority Against (Negative Turnout Bias) by default
- Stake-To-Vote (Escrow)
Adopted from Curve’s governance model
Users lock the native governance token
Longer lockups give more voting power
An important distinction is the negative turnout bias
(Super-Majority Against) voting threshold. This is best summarized by the Polkadot docs:
A heavy super-majority of nay votes is required to reject at low turnouts, but as turnout increases towards 100%, it becomes a simple majority-carries as below.
Terminology
Proposals are community-supported motions to perform system-level actions.
Referenda are accepted proposals undergoing voting.
Data Model
Constants
MinimumDeposit
The locktime is rounded to weeks to limit checkpoint iteration.
MaxProposals
The maximum number of proposals allowed in the queue.
Scalars
PublicPropCount
Stores the number of public proposals created so far.
PublicProps
Stores an array of the tuple (index, proposal_hash, who)
.
ReferendumCount
Stores the number of referendums created so far.
Maps
DepositOf
Stores the accounts and deposits backing a proposal by prop_index
.
VotingOf
Stores the votes for a particular account.
ReferendumInfoOf
Stores the status of a referendum by ref_index
.
External Functions
propose
Create a proposal for some system-level upgrade.
Specification
Function Signature
propose(who, proposal_hash, value)
Parameters
who
: The user’s address.proposal_hash
: The hash of the proposal preimage.value
: The amount of deposit.
Events
Preconditions
The function call MUST be signed by
who
.The
amount
MUST be greater than the MinimumDeposit.The number of public proposals MUST NOT exceed MaxProposals.
Postconditions
PublicPropCount MUST increase by one.
The deposit MUST be recorded in DepositOf.
A new proposal MUST be appended to PublicProps WHERE:
who
is the proposer.proposal_hash
is the hash of the proposal.index
is the PublicPropCount before increment.
second
Support a proposal with an additional deposit.
Specification
Function Signature
second(who, prop_index)
Parameters
who
: The user’s address.prop_index
: The index of the proposal.
Preconditions
The function call MUST be signed by
who
.The
prop_index
MUST exist in DepositOf.
Postconditions
The deposit MUST be recorded in DepositOf.
vote
Approve or reject an ongoing referendum.
Specification
Function Signature
vote(who, ref_index)
Parameters
who
: The user’s address.ref_index
: The index of the referendum.aye
: True or false.balance
: Amount to add to the vote.
Preconditions
The function call MUST be signed by
who
.The
ref_index
MUST exist in ReferendumInfoOf.The
balance
MUST be<=
the free balance.
Postconditions
The vote MUST be recorded in VotingOf.
fast_track
Fast track a proposal to a referendum and begin voting.
Specification
Function Signature
fast_track(who, prop_index)
Parameters
who
: The user’s address.prop_index
: The index of the proposal.
Events
Preconditions
The function call MUST be signed by
who
.The
prop_index
MUST exist in PublicProps.
Postconditions
ReferendumCount MUST increase by one.
The referendum MUST be recorded in ReferendumInfoOf.
Events
Proposed
Emit an event if a new proposal was created.
Event Signature
Proposed(prop_index, deposit)
Parameters
prop_index
: The index of a proposal.deposit
: The initial bond places for deposit.
Functions
FastTrack
Emit an event if a proposal was fast tracked.
Event Signature
FastTrack(ref_index)
Parameters
ref_index
: The index of a referendum.
Functions