Revoke Inactive Accounts
RevokeInactiveAccounts is an electoral mandate that automatically revokes a role from accounts that have not participated in recent governance actions.
Overview
Section titled “Overview”This mandate enforces participation requirements for role holders. It analyzes the recent activity of a specific role by:
- Identifying all mandates that are restricted to that role.
- Sampling a configurable number of recent actions executed via those mandates.
- Checking if each role holder participated in those actions (either by initiating the action or voting on it).
- Revoking the role from any account that fails to meet a minimum participation threshold.
This ensures that governance roles are held by active and engaged members.
Configuration
Section titled “Configuration”When adopting a RevokeInactiveAccounts instance, the following parameters are required:
RoleId(uint256): The role ID to monitor and potentially revoke.minimumActionsNeeded(uint256): The minimum number of actions an account must have participated in (within the sample window) to keep their role.numberActionsToCheck(uint256): The total number of recent actions to sample and check participation against.
Proposing an Action
Section titled “Proposing an Action”This mandate does not require any input parameters. When called, it automatically performs the activity check and revocation logic.
Execution Flow
Section titled “Execution Flow”-
Scope Definition
- Scans the Powers contract to find all mandates where
allowedRolematches the configuredRoleId. - Calculates the total number of actions available across these relevant mandates.
- Scans the Powers contract to find all mandates where
-
Sampling
- Selects a sample of
numberActionsToCheckrecent actions from the relevant mandates. - Prioritizes the most recent actions.
- Selects a sample of
-
Activity Verification
- Iterates through every current holder of the
RoleId. - For each holder, checks if they participated in the sampled actions. Participation counts if:
- They were the
callerwho initiated the action. - They voted on the action (if voting tracking is available/applicable).
- They were the
- Iterates through every current holder of the
-
Revocation
- Compares each holder’s participation count against
minimumActionsNeeded. - Generates a
revokeRolecall for any account that falls below the threshold. - Returns the batch of revocation calls for execution.
- Compares each holder’s participation count against
Technical Specifications
Section titled “Technical Specifications”Functions
Section titled “Functions”initializeMandate
Section titled “initializeMandate”function initializeMandate( uint16 index, string memory nameDescription, bytes memory inputParams, bytes memory config) public override- Initializes the configuration parameters.
- Sets input parameters to empty (none required).
handleRequest
Section titled “handleRequest”function handleRequest(...) public view override returns (...)- Performs the complex logic of finding mandates, sampling actions, checking participation, and determining revocations.
Error Conditions
Section titled “Error Conditions”- No Action
- If no accounts are found to be inactive (or if there are no role holders), the mandate returns empty arrays.
Current Deployments
Section titled “Current Deployments”| Chain ID | Chain Name | Address |
|---|---|---|