# Upgrade Proposed Runbook

## Alert: UpgradeProposed (CallScheduled)

### Severity: CRITICAL

### Description
A contract upgrade has been scheduled through the TimelockController. This initiates a mandatory delay period before the upgrade can be executed.

### Immediate Actions (< 5 minutes)

1. **Verify the Upgrade is Authorized**
   - Check if the upgrade was proposed by an authorized Safe
   - Verify the new implementation address
   - Confirm the upgrade was discussed and approved by team

2. **If UNAUTHORIZED:**
   - Immediately cancel the operation via Safe
   - Alert security team
   - Investigate how unauthorized proposal occurred

3. **If AUTHORIZED:**
   - Document the upgrade in tracking system
   - Set reminder for execution window
   - Prepare monitoring for execution

### Upgrade Verification Checklist

- [ ] New implementation address verified on Etherscan
- [ ] Implementation bytecode matches expected
- [ ] Audit completed for new implementation
- [ ] Storage layout compatibility verified
- [ ] Test execution on testnet successful
- [ ] Rollback plan prepared

### Delay Periods

| Operation Type    | Delay  |
|-------------------|--------|
| Contract Upgrade  | 72h    |
| Fee Change        | 48h    |
| Treasury Update   | 48h    |
| Role Grant        | 24h    |

### Execution Checklist

When delay period ends:

1. [ ] Re-verify implementation address
2. [ ] Confirm no new vulnerabilities discovered
3. [ ] Team consensus for execution
4. [ ] Execute upgrade transaction
5. [ ] Verify upgrade succeeded
6. [ ] Run post-upgrade tests
7. [ ] Update documentation

### Cancellation Procedure

If upgrade needs to be cancelled:

```solidity
// Via Safe transaction
timelock.cancel(operationId);
```

### Related Runbooks

- [Ownership Change](./ownership-change.md)
- [Role Change](./role-change.md)
- [Incident Response Plan](./incident-response.md)
