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
Problem
The
emergency_pausefunction contains aTODOfor 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_adminsets a pending admin, andaccept_admin(callable only by the pending address) finalizes it.Files to update
src/lib.rssrc/vault.rssrc/test.rsProject 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
DataKey::PendingAdminis added and validated during the acceptance step