Skip to main content

Timelock

The Timelock contract enforces a mandatory delay between the approval of a governance proposal and its execution. This delay provides the community with a window to review pending changes and take protective action if necessary.

Overview

All governance actions approved through GovernorBravo must pass through the Timelock before execution. The contract holds queued transactions and enforces a configurable delay period. Transactions that are not executed within the grace period after their delay expires are automatically invalidated. The Rheofi Protocol deploys multiple Timelocks with different delay durations to support varying levels of governance urgency.

Key Functions

queueTransaction

Queues a transaction for future execution after the delay period.

function queueTransaction(
address target,
uint256 value,
string memory signature,
bytes memory data,
uint256 eta
) public returns (bytes32);
  • eta: The earliest timestamp at which the transaction can be executed.

executeTransaction

Executes a previously queued transaction after the delay has elapsed.

function executeTransaction(
address target,
uint256 value,
string memory signature,
bytes memory data,
uint256 eta
) public returns (bytes memory);

cancelTransaction

Cancels a queued transaction, preventing its execution.

function cancelTransaction(
address target,
uint256 value,
string memory signature,
bytes memory data,
uint256 eta
) public;

setDelay

Updates the Timelock delay. Can only be called by the Timelock itself (via governance).

function setDelay(uint256 delay_) public;

Parameters

ParameterDescription
delayMinimum seconds between queuing and execution
GRACE_PERIODWindow after delay in which execution is allowed
MINIMUM_DELAYMinimum configurable delay
MAXIMUM_DELAYMaximum configurable delay

See Also