Skip to content

Require a Timelock for Emergency Surplus Withdrawal #968

Description

@Cedarich

Complexity: Hard (200)

Description
withdraw_surplus at line ~1271 lets the admin move surplus funds immediately. A compromised
admin key can therefore extract funds with no observation window, and the two-step admin transfer
added previously does not help because withdrawal is a single step.

Acceptance Criteria

  • Surplus withdrawal is a propose-then-execute flow with a configurable delay
  • A pending withdrawal is queryable and cancellable by the admin
  • Executing before the delay elapses fails with a distinct error
  • Proposal, cancellation, and execution each emit events
  • Tests cover the full lifecycle including boundary timing

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions