Skip to content

Implement two-step admin time-lock for protocol upgrades #13

Description

@Code-Paragon

Problem

The emergency_pause function contains a TODO for a time-lock mechanism. Instantly replacing an admin or upgrading protocol settings presents a centralization risk to LPs.

Expected behavior

The admin role logic is refactored into a two-step process: transfer_admin sets a pending admin, and accept_admin (callable only by the pending address) finalizes it.

Files to update

  • src/lib.rs
  • src/vault.rs
  • src/test.rs

Project relevance

This drastically improves the non-custodial trust model by preventing the current admin from instantly and unilaterally compromising the Vault's governance.

Acceptance criteria

  • Feature works as described
  • Tests are added or updated where needed
  • Documentation is updated where needed
  • DataKey::PendingAdmin is added and validated during the acceptance step
  • No TypeScript, lint, test, or build errors

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions