Docs/Examples/Dao Executor

DAOExecutor (Governance Execution)

Autonomously executes queued governance proposals after their timelock expires — no VRF required.


Overview

DAOExecutor is a timelock executor for governance proposals. Anyone can queue a (target, calldata, eta) tuple, and AutoLoop autonomously executes it after the timelock passes. No DAO member needs to manually execute — and no member should be able to control when they do.

PropertyValue
Base contractAutoLoopCompatible (no VRF)
VRF usageNone
Gas per tick~85k (simple call)
Sourceautoloop/src/agents/DAOExecutor.sol
Tests18 passing (unit + fuzz)

Why AutoLoop Is Structurally Required

Whoever controls execution timing can front-run the proposal's on-chain effects. A treasury transfer proposal, for example, announces the recipient publicly. Whoever holds the trigger can execute it at exactly the moment they've positioned themselves in the mempool. AutoLoop executes at block cadence with no preferential timing.

Mechanics

  • Queue: queueProposal(target, callData, eta, description) stores the proposal and returns its id
  • shouldProgressLoop: scans the proposal queue for the first proposal whose ETA has passed and isn't executed or cancelled
  • Execute: progressLoop() calls target.call{value: 0}(callData). Failing calls set success: false in the ProposalExecuted event without reverting — the loop continues
  • Cancel: the admin can call cancelProposal(id) before execution

Revenue Model

  • AutoLoop gas fee per execution tick
  • No protocol rake on proposal execution

Deploy

forge create src/agents/DAOExecutor.sol:DAOExecutor \
  --constructor-args 3600 \
  --rpc-url $RPC_URL --private-key $PRIVATE_KEY --broadcast

Args: checkInterval (seconds between AutoLoop readiness checks).

Dashboard

View DAOExecutor on the AutoLoop Dashboard.