# Week 4 – Emergency Protocols

#### 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.<br>

**Understanding Lock:**

* FREEZES all deposits and withdrawals
* Can be triggered by vault owner OR any guardian
* Prevents the hacker from moving assets
* Can be unlocked later with guardian approval

**Trigger the Lock:**

1. Go to "Emergency Controls"
2. Click the big red "🔒 LOCK VAULT" button
3. Confirm you understand (read the warning)
4. Approve the transaction
5. Your vault is now LOCKED 🔒<br>

**What happened:**

* All pending requests (except unlock) are automatically cancelled
* No new deposits allowed
* No new withdrawals allowed
* You'll see "LOCKED" status everywhere<br>

**Try these (they should fail):**

6. Try to deposit tokens - ❌ Blocked
7. Try to request withdrawal - ❌ Blocked
8. Try to transfer assets - ❌ Blocked

**Good! Your assets are frozen and safe.**

**✅ Quest Complete! You've frozen your vault.**

***

#### Quest 2: Unlock Your Vault (10 minutes)

**What you're doing:** Unfreezing your vault after the emergency is over.

**The Scenario:** You've secured your wallet, changed passwords, etc. Now you want to unlock.

1. Still on Emergency Controls
2. Click "🔓 UNLOCK VAULT"
3. This creates an UNLOCK REQUEST
4. This needs guardian approval! (prevents hacker from unlocking)<br>

**Get Guardian Approvals:**

5. Switch to Guardian 1
6. Approve the unlock request
7. Switch to Guardian 2
8. Approve the unlock request
9. Execute the unlock

**Your vault is now UNLOCKED ✅**

10. Try depositing - ✅ Works again!
11. Try withdrawing - ✅ Works again!

**What you learned:**

* Lock can be instant (by owner or guardian)
* Unlock requires guardian approval (security layer)
* Pending requests are cleared when you lock<br>

**✅ Quest Complete! You've unlocked your vault.**

***

#### Quest 3: Vault Recovery (Guardian Override) (20 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 wallet is permanently compromised or lost. Guardians need to move your vault to your new wallet address.

**Important:** This is different from "Transfer":

* Transfer = Owner wants to move vault (owner initiates)
* Recovery = Owner is locked out (guardians initiate)<br>

**Initiate Recovery (As a Guardian):**

1. Switch to Guardian 1 wallet
2. Go to the vault (you can access as guardian)
3. Click "Emergency Recovery" (might be under Emergency Controls)
4. Enter the NEW OWNER ADDRESS (your recovery wallet or another address you control)
5. Click "Request Recovery"
6. Approve the transaction

**This creates a RECOVERY REQUEST**

**Other Guardians Approve:**

7. Switch to Guardian 2
8. Go to "Pending Recovery Requests"
9. Review the recovery (shows new owner address)
10. Click "Approve Recovery"
11. Confirm<br>

**Wait for enough approvals (depends on your security threshold)**<br>

**Execute Recovery:**

12. Once enough guardians approve
13. Any guardian can click "Execute Recovery"
14. The vault NFT transfers to the new owner
15. The old owner can no longer access the vault
16. The new owner has full control

**Verify:**

17. Switch to the NEW owner wallet
18. Check your assets - you should see the vault NFT
19. You can now control the vault
20. All assets are safe inside

**✅ Quest Complete! You've recovered a vault.**

***

#### Quest 4: Lock Cancels Recovery (Security Test) (15 minutes)

**What you're doing:** Testing a security feature where locking a vault automatically cancels any pending recovery requests.

**The Scenario:** Guardians mistakenly started a recovery, but you still have access. You want to stop it!

**Setup:**

1. Have guardians start a recovery (like in Quest 3)
2. DON'T execute it yet - leave it pending
3. You (vault owner) notice this!<br>

**Stop the Recovery:**

4. Quickly LOCK the vault (as vault owner)
5. The recovery request is AUTOMATICALLY CANCELLED ❌
6. Now unlock the vault (with guardian approval)
7. The recovery is gone - vault is safe<br>

**What you learned:**

* Lock is a powerful emergency tool
* It cancels dangerous pending actions
* Owner can defend against unauthorized recovery
* But unlock still needs guardians (balanced security)

**✅ Quest Complete! You understand the security interplay.**

***

#### Quest 5: Transfer vs Recovery Comparison (15 minutes)

**What you're doing:** Understanding the difference between normal vault transfer and emergency recovery.

**Scenario A:** Normal Transfer (Owner Initiated)

**You want to move your vault to a new wallet safely:**

1. Request a vault transfer (as owner)
2. Enter new owner address
3. This requires GUARDIAN APPROVAL
4. Guardians review and approve
5. Execute transfer
6. Vault moves to new owner

**Scenario B:** Emergency Recovery (Guardian Initiated)<br>

**Owner lost access, guardians must take over:**

1. Guardian initiates recovery
2. Other guardians must approve
3. No owner approval needed (they're locked out!)
4. Execute recovery
5. Vault moves to recovered owner<br>

**Key Differences:**

| Feature                  | Transfer              | Recovery                |
| ------------------------ | --------------------- | ----------------------- |
| Who initiates            | Owner                 | Guardian                |
| Owner approval needed    | Yes (they request it) | No (they're locked out) |
| Guardian approval needed | Yes                   | Yes                     |
| Use case                 | Planned move          | Emergency access lost   |

<br>

**✅ Quest Complete! You understand both transfer methods.**

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.globalgold.finance/global-gold-1/product-mission-i-the-global-gold-vaults/week-4-emergency-protocols.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
