Author: Markus @m.laeng
First publication date: 2025/01/13
Summary
Tezos bakers have voted to a accept the protocol change for the next Tezos upgrade Quebec (PsQuebecnLByd3JwTiGadoG4nGWi3HYiLXUjkibeFV8dCFeVMUg
), recently. This upgrade reduces the block time on Tezos from 10 seconds to 8 seconds.
The shorter block time impacts Youves governance votes because vote phase durations are currently defined in terms of block numbers. This YIP proposes reconfiguring the voting phases to reasonable durations under the Quebec protocol
Rationale
The DAO V2 contract (KT1T3BFEu9WSQyRuV9Fyd7SqTU4rW3ptJ3NN
) has parameters that define the lengths of voting periods in governance votes. When DAO V2 was established, Tezos had a block time of 15 seconds. Accordingly, the following durations were chosen for the voting periods:
- Vote delay: 1440 blocks (~6 hours)
- Vote length: 28,800 blocks (~5 days)
- Timelock execution delay: 11,520 blocks (~2 days)
- Timelock cancellation delay: 28,800 blocks (~5 days)
During the first votes, it became apparent that these durations were on the longer side and could be reduced. Subsequently, with the Paris protocol upgrade, block times were reduced from 15 seconds to 10 seconds, which naturally shortened the voting periods. Under the Paris protocol, the durations became:
- Vote delay: 1440 blocks (~4 hours)
- Vote length: 28,800 blocks (~3.333 days)
- Timelock execution delay: 11,520 blocks (~1.333 days)
- Timelock cancellation delay: 28,800 blocks (~3.333 days)
Although these periods were tighter, successful YIPs were concluded.
Now, with the Quebec protocol further reducing block times, voting period lengths will shrink again. If no changes are made, the durations would become:
- Vote delay: 1440 blocks (~3.2 hours)
- Vote length: 28,800 blocks (~2.666 days)
- Timelock execution delay: 11,520 blocks (~1.066 days)
- Timelock cancellation delay: 28,800 blocks (~2.666 days)
These shorter periods may make it difficult to meet quorum goals within the available time. Therefore, it is recommended to set new parameters to ensure reasonable voting period lengths under the Quebec protocol.
Methodology
This YIP proposes to set the following new voting period lenghts:
- vote delay: 2700 Blocks / (~6 hours)
- vote lenght: 43200 Blocks / (~4 days)
- timelock execution delay: 14400 / (~1.5 days)
- timelock cancelation delay: 37800 / (~3.5 days)
These parameters will be changed by calling the set_governance_params
entrypoint of the DAO_V2 KT1T3BFEu9WSQyRuV9Fyd7SqTU4rW3ptJ3NN
, with the new number of blocks per period. All other parameters will be the same as before.
Proposal
With this proposal, when executed, the DAO V2 will call the set_governance_params
entrypoint of the DAO_V2 KT1T3BFEu9WSQyRuV9Fyd7SqTU4rW3ptJ3NN
and set the following new values:
Parameter | old value | new value |
---|---|---|
super_majority_percentage |
80 | 80 |
quorum_cap:upper
|
3744000000000000000 | 3744000000000000000 |
quorum_cap:lower
|
800000000000000000 | 800000000000000000 |
timelock_cancelation_delay_blocks |
23040 | 37800 |
timelock_execution_delay_blocks |
11520 | 14400 |
min_yes_votes_percentage_for_escrow_return |
30 | 30 |
vote_lenght_blocks |
28800 | 43200 |
vote_delay_blocks |
1440 | 2700 |
escrow_amount |
1000000000000000 | 1000000000000000 |
Code
Source code in SmartPy
GitHub repo with the source code
import smartpy as sp
def yip7(unit):
sp.set_type(unit, sp.TUnit)
#############################
# DAO new governance params #
#############################
dao_entrypoint = sp.contract(
GOVERNANCE_PARAMS_TYPE,
sp.address('KT1T3BFEu9WSQyRuV9Fyd7SqTU4rW3ptJ3NN'), # youves DAO V2
entry_point="set_governance_params"
).open_some(message='DAO: Invalid entry point set_governance_params')
# new governance params for DAO
new_governance_params = sp.record(
escrow_amount = sp.nat(1_000_000_000_000_000), # 1000 YOUs
vote_delay_blocks = sp.nat(2700), # 6 hours
vote_length_blocks = sp.nat(43200), # 4 days
min_yes_votes_percentage_for_escrow_return = sp.nat(30), # 30% (remains unchanged)
timelock_execution_delay_blocks = sp.nat(14400), # 2 days (remains unchanged)
timelock_cancelation_delay_blocks = sp.nat(37800), # 3,5 days
super_majority_percentage = sp.nat(80), # 80% (remains unchanged)
quorum_cap = sp.record(
lower = sp.nat(800_000_000_000_000_000), # 0.8M (remains unchanged)
upper = sp.nat(3_744_000_000_000_000_000) # 3.744M (remains unchanged)
),
)
sp.set_type_expr(new_governance_params, GOVERNANCE_PARAMS_TYPE)
# DAO LAMBDA
sp.result(sp.list([
sp.transfer_operation(new_governance_params, sp.mutez(0), dao_entrypoint)
]))
Compiled Michelson code
GitHub repo with the compiled code
{ NIL operation; PUSH address "KT1T3BFEu9WSQyRuV9Fyd7SqTU4rW3ptJ3NN"; CONTRACT %set_governance_params (pair (nat %escrow_amount) (pair (nat %vote_delay_blocks) (pair (nat %vote_length_blocks) (pair (nat %min_yes_votes_percentage_for_escrow_return) (pair (nat %timelock_execution_delay_blocks) (pair (nat %timelock_cancelation_delay_blocks) (pair (nat %super_majority_percentage) (pair %quorum_cap (nat %lower) (nat %upper))))))))); IF_NONE { PUSH string "DAO: Invalid entry point set_governance_params"; FAILWITH } {}; PUSH mutez 0; PUSH (pair nat nat) (Pair 800000000000000000 3744000000000000000); PUSH nat 80; PUSH nat 37800; PUSH nat 14400; PUSH nat 30; PUSH nat 43200; PUSH nat 2700; PUSH nat 1000000000000000; PAIR 8; DIG 4; DROP; TRANSFER_TOKENS; CONS }
SHA256 Hash of the Michelson code
871c8d23b29b4b20441e240088689a491606e495079c75543999b764f014fd71