Skip to content

KeepTimelock

Deployable wrapper around snekmate's audited timelock_controller. Gates value-path MSV admin (DEFAULT_ADMIN_ROLE, STRATEGY_MANAGER_ROLE) behind schedule → delay → execute. Not used for EMERGENCY_ROLE (pause must stay instant).

Source: khomdev-keep/src/KeepTimelock.vy (Vyper 0.4.3)

Upstream: snekmate timelock_controller

Consumer: MultiStrategyVault — privileged strategy/allocator changes routed through timelock in production

Implementation overview

  • Thin init wrapper — no custom @external logic; re-exports full timelock + access-control surface
  • H-1 fix — depositors can exit during 24h delay before scheduled vault changes land
  • Self-administered — after bootstrap admin_ renounced, only timelocked ops change roles/delay
  • Emergency excludedEMERGENCY_ROLE held by hot wallet/multisig for pause/unpause
flowchart LR
    PROP[Proposer multisig] -->|schedule| TL[KeepTimelock]
    TL -->|after min delay| MSV[MultiStrategyVault]
    HOT[EMERGENCY_ROLE] -->|pause instant| MSV

Constructor

KeepTimelock.__init__(minimum_delay_, proposers_, executors_, admin_)

Param Description
minimum_delay_ Min seconds schedule → execute (86_400 = 24h prod)
proposers_ PROPOSER_ROLE + CANCELLER_ROLE
executors_ EXECUTOR_ROLE; sole address(0) = anyone may execute when ready
admin_ Bootstrap admin for initial grants; renounce after wiring (0x0 to skip)

Exported surface (snekmate)

Per-export API docs live in snekmate. Grouped by role:

Group Key functions
Scheduling schedule, schedule_batch, cancel
Execution execute, execute_batch
Views is_operation, is_operation_pending, is_operation_ready, is_operation_done, get_operation_state, get_timestamp, get_minimum_delay
Admin update_delay, grantRole, revokeRole, renounceRole
Roles PROPOSER_ROLE, EXECUTOR_ROLE, CANCELLER_ROLE, DEFAULT_ADMIN_ROLE

Typical MSV ops through timelock: add_strategy, set_max_debt, target-weight / queue edits, set_accountant, set_deposit_limit.

Trust model

Path Delayed? Rationale
Strategy / allocator / admin on MSV Yes (24h) Value-path changes; exit window for depositors
pause / unpause No Delayed emergency stop is a footgun