π Week 4 - Emergency Protocols
Goal: Test emergency scenarios like vault locking, unlocking, and recovery procedures.
Quest 1: Lock Your Vault (Emergency Freeze) (10 minutes)
What you're doing: Using the emergency lock feature to freeze your vault.
The Scenario: You think your wallet might be compromised. You want to freeze everything immediately.
Understanding Lock
FREEZES all deposits and withdrawals
Requires guardian approval to execute (creates a guardian transaction)
Prevents anyone from moving assets once locked
Can only be unlocked with guardian approval
Trigger the Lock
Go to your vault dashboard
Look at the right panel (Settings section) - below the vault name and total asset value
Click the "Lock Vault" button (outlined button with lock icon)
A confirmation modal appears with warning:
"This will prevent all transactions until unlocked"
"Requires guardian approval to complete"
"This action cannot be undone without guardian consensus"
Click "Lock Vault" in the confirmation modal
This creates a guardian transaction that requires approval
Switch to your guardian wallets to approve the lock request
Once guardians approve (meeting threshold), your vault is LOCKED π
What Happened
All pending withdrawal/transfer requests stay pending but can't execute
No new deposits allowed (Deposit button is disabled)
No new withdrawals allowed (Withdraw button is disabled)
No transfers allowed (Transfer button is disabled)
You'll see "Vault Locked" badge displayed prominently (red badge below vault name)
Try These (they should fail)
Try to deposit tokens β β Blocked - "Vault is locked"
Try to request withdrawal β β Blocked - "Cannot submit while locked"
Try to transfer assets β β Blocked
Good! Your assets are frozen and safe.
β Quest Complete! You've successfully locked your vault.
Quest 2: Unlock Your Vault (15 minutes)
What you're doing: Unfreezing your vault after the emergency is over.
The Scenario: You've secured your wallet and confirmed there's no threat. Now you want to unlock your vault.
Request Unlock
Still on vault dashboard (with "Vault Locked" badge showing in red)
Look at the right panel (Settings section)
The button now says "Unlock Vault" (same location as Lock button)
Click "Unlock Vault"
A confirmation modal appears
Click "Unlock Vault" in the confirmation modal
This creates an UNLOCK REQUEST that requires guardian approval
Why guardian approval? If a hacker got your wallet, you don't want them to be able to unlock your vault immediately. Guardians provide protection.
Get Guardian Approvals
Switch to Guardian 1 wallet
Go to the vault dashboard
Click the "Pending Transactions" tab (should be selected by default)
You'll see the unlock request in the list
Click "Approve" button on the unlock transaction
Confirm the transaction in your wallet
Switch to Guardian 2 wallet
Go to the vault dashboard
Click "Pending Transactions" tab
Click "Approve" on the unlock request
Confirm the transaction
On the second approval (meeting threshold), the unlock executes automatically
Verify Vault is Unlocked
Switch back to your main wallet
Go to the vault dashboard
Check vault status β β "Vault Locked" badge is gone (no red badge)
Try depositing tokens β β Deposit button is enabled - Works again!
Try requesting withdrawal β β Withdraw button is enabled - Works again!
What you learned
Lock requires guardian approval (creates a guardian transaction)
Unlock also requires guardian approval (security layer)
The vault owner can't bypass guardians for locking or unlocking
β Quest Complete! You've successfully unlocked your vault.
Quest 3: Vault Recovery - Guardian Initiated (25 minutes)
What you're doing: Testing what happens if a vault owner loses access and guardians need to transfer the vault to a new owner.
The Scenario: Your main wallet is permanently compromised or lost. Guardians need to move your vault to your new wallet address.
Important Distinction
Transfer = Owner wants to move vault (owner initiates, guardians approve)
Recovery = Owner is locked out (guardian initiates, other guardians approve)
Setup
Identify your "new owner" address (another wallet you control, or a friend's address for testing)
Make sure you can access this wallet
Note your current vault owner address
Initiate Recovery (As a Guardian)
Switch to Guardian 1 wallet
Go to the vault dashboard
Look at the right panel (Settings section) - below the vault name
You'll see a "Recover Vault" button (orange/amber colored button)
Click "Recover Vault"
A recovery modal opens
Enter the NEW OWNER ADDRESS (your recovery wallet) in the input field
The modal validates:
Address must be valid (starts with 0x, 42 characters)
Must be different from current owner
Must be different from your current wallet address
Click "Initiate Recovery" or "Continue" button
This creates a guardian transaction that requires other guardians' approval
Important: This creates TWO things:
A guardian-protected request (needs approvals from other guardians)
A 7-day delay period for safety
Other Guardians Approve
Switch to Guardian 2 wallet
Go to the vault dashboard
Click the "Pending Transactions" tab
You'll see a "Recover Vault" request in the list
Click "Details" to see full information:
Shows current owner address
Shows proposed new owner address
Shows recovery initiation details
Click "Approve" button on the recovery request
Confirm the transaction in your wallet
If you need more approvals (e.g., 3/3 threshold):
Switch to Guardian 3 wallet
Go to vault dashboard β "Pending Transactions" tab
Click "Approve" on the recovery request
Confirm transaction
Wait for Delay Period
For testing purposes, you won't wait 7 days, but understand:
After guardians approve, there's a 7-day waiting period
This gives the real owner time to intervene if this was a mistake
After 7 days, anyone can execute the recovery
Execute Recovery (After 7 Days)
Note: In production, you would wait 7 days. For testing, understand this step:
After guardians approve and 7 days pass, the recovery can be executed
Go to the vault dashboard as a guardian
You'll see the vault is in "Recovery Mode" (orange badge)
The "Recover Vault" button changes to "Execute Recovery" (green button)
Click "Execute Recovery"
A recovery modal opens showing the pending recovery details
Click "Execute Recovery" or "Confirm" button
Confirm the transaction
The vault NFT transfers to the new owner
The new owner has full control
All assets remain safely in the vault
Verify (If you complete the full cycle)
Switch to the NEW owner wallet
Check your NFT balance - you should see the vault NFT
You can now control the vault
All assets are safe inside
Old owner can no longer access the vault
What you learned
Recovery is a multi-step process with built-in delays
Guardian consensus is required
The 7-day delay provides safety against mistakes
Assets remain secure throughout the process
β Quest Complete! You understand the recovery mechanism.
Quest 4: Lock Cancels Recovery (Security Test) (15 minutes)
What you're doing: Testing a security feature where locking a vault can stop an unauthorized recovery attempt.
The Scenario: Guardians mistakenly started a recovery, but you (the owner) still have access. You want to stop it!
Setup
Have guardians initiate a recovery (like in Quest 3)
Get guardian approvals
DON'T wait the 7 days - leave it pending
You (vault owner) notice this unauthorized recovery request
Stop the Recovery
As the vault owner, quickly LOCK the vault
Go to vault dashboard
Look at the right panel (Settings section)
Click "Lock Vault" button
Click "Lock Vault" in the confirmation modal
This creates a lock request that requires guardian approval
Get guardian approvals for the lock (same as Quest 1)
Once locked, the recovery request gets AUTOMATICALLY CANCELLED β
The vault enters locked state and recovery cannot proceed
Unlock and Verify
Now request to unlock the vault (requires guardian approval)
Get guardian approvals
Vault unlocks
Go check pending requests
The recovery request should be gone - it was cancelled by the lock
What you learned
Lock is a powerful defensive tool
It can stop unauthorized recovery attempts
But you still need guardians to unlock (balanced security)
This protects you if guardians make a mistake
β Quest Complete! You understand the security interplay between lock and recovery.
Quest 5: Guardian-Initiated Lock (10 minutes)
What you're doing: Testing that guardians can also lock a vault in an emergency.
The Scenario: A guardian notices suspicious activity and wants to freeze the vault immediately.
Guardian Locks the Vault
Switch to Guardian 1 wallet
Go to the vault dashboard
Look at the right panel (Settings section) - below the vault name
Click "Lock Vault" button (same button as owner sees)
Click "Lock Vault" in the confirmation modal
This creates a lock request that requires guardian approval
Switch to other guardian wallets to approve the lock
Once guardians approve (meeting threshold), the vault locks
Why this is important:
If your wallet is compromised and you can't act
Guardians can step in to protect your assets
It's an emergency brake anyone can pull
Owner Can't Immediately Unlock
Switch back to owner wallet
Try to unlock
You'll need to create an unlock request
Which requires... guardian approval!
So guardians can protect you even if you don't want them to (in an emergency)
Proper Unlock Process
Owner requests unlock
Guardians review the situation
Once it's confirmed safe, guardians approve unlock
Vault unlocks when threshold is met
What you learned
Both owner and guardians can initiate lock (creates guardian transaction)
Lock requires guardian approval to execute
Unlock also requires guardian approval
This creates a safety net for emergencies while maintaining consensus
β Quest Complete! You understand guardian emergency powers.
Week 4 Tips
Lock requires guardian approval - owner or guardian initiates, but needs consensus to execute
Unlock requires guardian approval - prevents hackers from unlocking
Lock cancels pending recovery - defensive tool for vault owner
7-day delay on recovery - gives real owner time to intervene
Guardians can protect you - even against your own compromised wallet
Lock/Unlock buttons are in the right panel (Settings section) on the dashboard
Need Help?
Can't unlock my vault?
This is correct! Unlock requires guardian approval
Switch to guardian wallets and approve the unlock request
Once threshold is met, vault unlocks automatically
Recovery request disappeared?
Did you lock the vault? Lock cancels pending recovery requests
This is a security feature to protect against unauthorized recovery
Guardian can't initiate recovery?
Make sure you're using a guardian wallet, not the owner wallet
Check that the vault contract address is correct
Verify the new owner address is valid
Completion Reward
ποΈ Emergency Response Expert Badge
Recovery Specialist achievement
Security Guardian title
Continue to Week 5: Chaos & Integration Testing β
Last updated
