Lesson 0313 min
QUEUE · TIMELOCK · EXECUTION

Why Can’t a Passed Vote Execute Immediately?

Queue a passed proposal behind a timelock, wait until it becomes ready, and replay every event before execution.

ObjectivesAfter this lesson, you should be able to:
  • Separate passed, queued, ready, and executed
  • Explain how a timelock creates a reaction window
  • Identify which state changes require execution
COURSE POSITIONStep 3 of 4
  1. PREVIOUSHow Much Does One Vote Count?
  2. CURRENTWhy Can’t a Passed Vote Execute Immediately?

    Queue a passed proposal behind a timelock, wait until it becomes ready, and replay every event before execution.

  3. NEXTA Treasury Is Not an ATM
BEFORE YOU READ

Think about these questions first.

Choose an answer before opening the explanation. You can add anything unexpected to your review list.

Q01Does a two-day timelock guarantee a malicious proposal cannot hurt the protocol?
SHORT ANSWER

A timelock exposes danger for two days; it does not identify danger. Safety still depends on monitoring, appropriately scoped cancellation power, and users having a real chance to exit.

Compared with your prediction:

A passed vote is not the end. A timelock creates a public countdown between agreement and mutation, giving members, monitors, and integrators a chance to notice a bad operation and react.

Four states, four permissions

After success, a proposal is queued. After two days it becomes ready. Only ready proposals can execute. Each state makes a different action legal or illegal.

GOVERNANCE SIMULATIONVirtual tokens · no real voting
SECURITY 002 · PROPOSAL / VOTE / TIMELOCK / TREASURY

Who gets to change the protocol?

Follow one proposal from intention to executable state, then inspect voting power, delay, and treasury conservation.

ScenarioFee changePhase: Draft
Participation0quorum 600,000
Support0.0%of snapshot power
Treasury1,000,000virtual credits
Protocol fee0.30%active
Voting power1,000,0000 delegated
The authority pipelineDraft
  1. 01Draft
  2. 02Voting
  3. 03Succeeded
  4. 04Queued
  5. 05Ready
  6. 06Executed

Create a proposal to freeze a voting snapshot.

CONTROL CONSOLEMove the proposal one legal step
Delegation
Cast one vote
Alice420,000 power
Bob330,000 power
Carol250,000 power
Coach

Start by creating one proposal. Read the action before you read the vote count.

Governance event log2 EVENTS
  1. 02

    投票窗口 3 天,法定人数 60%,时间锁 2 天。

  2. 01

    治理模块创建:1,000,000 治理代币、1,000,000 积分金库,提案需要投票和时间锁。

ACTION HISTORYExperiment timeline
1 state snapshots

Use the slider to return to an earlier step. Continuing from there replaces the later history with a new sequence.

Initial state
View experiment records →

Try to execute immediately after the vote and read the error. Then queue, advance the clock, and execute the fee change. The timeline records approval, waiting, and the state write.

Expand: how this step works
succeeded → queue(operation, salt, eta)
eta reached → ready
executor calls target only when ready

Real systems hash the operation and enforce predecessor, timestamp, and caller rules. This lab models the same boundary as queuedAt + timelockDelay and records every event for replay.

KNOWLEDGE CHECK

What does a timelock directly provide?

LESSON RECAPComplete the exercise and knowledge check first