Skip to content

Add time-lock mechanism for admin actions#174

Merged
Mosas2000 merged 1 commit intomainfrom
feature/admin-action-timelock
Feb 26, 2026
Merged

Add time-lock mechanism for admin actions#174
Mosas2000 merged 1 commit intomainfrom
feature/admin-action-timelock

Conversation

@Mosas2000
Copy link
Copy Markdown
Owner

Closes #61

Introduces a 144-block (~24 hour) time-lock for administrative changes to give users advance notice.

New functions:

  • propose-fee-change / execute-fee-change / cancel-fee-change
  • propose-pause-change / execute-pause-change
  • get-pending-fee-change / get-pending-pause-change (read-only)

How it works:

  1. Owner proposes a change (stores pending value + effective block height)
  2. After 144 blocks, owner can execute the change
  3. Owner can cancel a pending change at any time

Direct set-paused and set-fee-basis-points remain available for emergency use. All 23 existing tests continue to pass.

Introduce a 144-block (~24 hour) delay for admin actions. Changes must
be proposed first, then executed after the timelock expires. Includes
propose/execute/cancel functions for both fee changes and pause state.
Direct set-paused and set-fee-basis-points remain for emergency use.
Add read-only functions to query pending changes and their effective
block heights.
@Mosas2000 Mosas2000 merged commit 82bf4f2 into main Feb 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Smart contract has no time-lock or cooldown period for admin actions

1 participant