<aside> 💡 This document gives an overview of the technical design of the proposals system for introducing, voting on and executing governance proposals.

</aside>

Proposals

Initiating a proposal requires the proposer to have more than a certain amount of GT staked in the system e.g. 5 GT. This is checked by consuming the UTXO representing the user's stake and locking it, so they can create no further proposals with that GT until the proposal finishes. Initiating a proposal creates a state thread, which will handle all interactions with that particular proposal. Proposals are tagged with their ID.

Voting

Voting stages

The life-cycle of a proposal is neatly represented by a state machine, with the 'draft' state being the initial state, and 'executed' and 'failed' being the terminating states.

Please note that this state-machine representation is purely conceptual and should not be expected to reflect technical implementation. This is because some transitions in the state machine representation don't need to happen on-chain, as a transaction. A key example of this is a proposal going from the "lock" phase to the "execution" phase. No on-chain transition takes place: it is simply that we have reached the time in the real-world, when the proposal is allowed to be executed.

To make the following diagram clear, we employ the following terminology:

state A 'state' in our conceptual FSM representation above. Useful for thinking about proposals. Does not necessarily reflect a change occurring on-chain.

period A segment of real-world, POSIX time. As we transition from one period to another, a proposal's status (see below) will not be updated.

status The 'status' of a proposal is stored in the proposal's datum and is thus always represented on-chain. Changing this requires a transaction to take place.

Untitled

Draft phase

During the draft phase, a new UTXO at the proposal script has been created. At this stage, only votes in favor of co-signing the draft are counted. For the proposal to transition to the voting phase, a threshold of GT will have to be staked backing the proposal. This threshold will be determined on a per-system basis and could itself be a 'governable' parameter. It's important to note that cosignatures are not locking votes. Cosignatures are more like a delegated approval to a proposal. The sum of all cosignatures must tally to the threshold, and all cosigner stake datums must fit into a single transaction to witness their size. (PlutusV2 note: Witnessing here ought to be a prime example of where to use a reference input!) A limit on the maximum amount of cosigners is placed in order to prevent a situation where the stake datums no longer fit in the transaction. The number doesn't matter and may be expressed in a parameterized way.

Voting phase

In the voting phase, users may utilise their stakes to vote in-favour or in-opposition to a proposal. This will add their vote to the relevant count. There is potential for contention within the system and therefore voting on proposals may have to be rate-limited. The method by which a user's stakes are weighted and the thresholds required for proposals to pass are determined on a per-protocol basis.

Lock phase

Upon completion of the voting phase, a proposal will either have been passed or failed. A delay between the passing of a proposal and execution of its effects will be enforced, to allow users to prepare for incoming changes to the system. It'll further give the system maintainers opportunity to intervene, in the case of a hostile action.

Execution phase

Failed proposals will not be interacted with further. The only value they will contain is their state thread tokens and the minimum ADA requirement, so little of worth is lost.