When to use this
- Long-lived identity DIDs that must survive key loss.
- Treasury controller DIDs where no single human should hold sole authority.
- Production validator DIDs where downtime from key loss is unacceptable.
Prerequisites
- A funded DID (the one being protected).
- 3–7 guardian DIDs whose owners you trust and can reach.
Recipe
Configure guardians and threshold
A threshold of M-of-N: The chain stores this policy keyed by
threshold guardians must co-sign the recovery to authorise a key change.protected_did. It can be changed later only with the current key or via a successful recovery.Initiate a recovery (when needed)
Any guardian initiates. The proposal locks in a candidate new public key and starts the timelock.
Collect guardian co-signatures
Each guardian inspects the proposal and signs.Track the running approval count:Once
approvals >= threshold and the timelock elapses, the proposal becomes finalisable.Cancelling a malicious recovery
The current key holder (or any guardian) may cancel an in-progress recovery before finalisation:RecoveryPropose events for your DID.
Common errors
| Symptom | Cause | Fix |
|---|---|---|
not enough guardians | guardians.length < threshold | Add more guardians |
guardian not in policy | Approval from a DID outside the configured set | Verify the guardian DID list |
timelock not elapsed | Tried to finalise too early | Wait for proposal.executable_at_height |
proposal cancelled | Cancelled by owner or guardian | Re-initiate if recovery is still needed |
lineage requirement unsatisfied | Guardian without human-root lineage when require_human_root_lineage: true | Use guardians with valid HMR lineage or relax the requirement |
Best practices
- Geographically and operationally diversify guardians — different jurisdictions, different organisations, different key custody methods.
- Keep
threshold≥ 3 even for small guardian sets to defend against a single compromise. - Set
timelock_blockslong enough to detect a malicious recovery (≥ 24h on testnet, ≥ 72h on mainnet). - Test the flow end-to-end on testnet before relying on it.
See also
- Primitive: recovery ceremony
- Cookbook: Issue a mandate — for time-bounded operational delegation that complements recovery.
- Concept: security model