3.1 KiB
3.1 KiB
Emergency Procedures
Overview
This document outlines emergency procedures for the Strategic executor system.
Emergency Contacts
- Technical Lead: [Contact Info]
- Security Team: [Contact Info]
- Operations: [Contact Info]
Emergency Response Procedures
1. Immediate Actions
Pause Executor
# Via multi-sig or owner account
forge script script/Pause.s.sol --rpc-url $RPC_MAINNET --broadcast
Or via contract:
executor.pause();
Revoke Allow-List
// Remove problematic address
executor.setAllowedTarget(problematicAddress, false);
// Or disable allow-list entirely (if configured)
executor.setAllowListEnabled(false);
2. Incident Assessment
- Identify Issue: What went wrong?
- Assess Impact: How many users/transactions affected?
- Check Logs: Review transaction logs and monitoring
- Notify Team: Alert relevant team members
3. Containment
- Pause System: Pause executor immediately
- Block Addresses: Revoke problematic protocol addresses
- Stop New Executions: Prevent new strategies from executing
- Preserve Evidence: Save logs, transactions, state
4. Recovery
- Fix Issue: Address root cause
- Test Fix: Verify on testnet/fork
- Gradual Resume: Unpause and monitor closely
- Document: Record incident and resolution
Common Scenarios
Flash Loan Attack
Symptoms: Unauthorized flash loan callbacks
Response:
- Pause executor immediately
- Review
allowedPoolsmapping - Remove unauthorized pools
- Verify flash loan callback security
- Resume after verification
Allow-List Bypass
Symptoms: Unauthorized contract calls
Response:
- Pause executor
- Review allow-list configuration
- Remove problematic addresses
- Verify allow-list enforcement
- Resume with stricter controls
High Gas Usage
Symptoms: Transactions failing due to gas
Response:
- Review gas estimates
- Optimize strategies
- Adjust gas limits
- Monitor gas prices
Price Oracle Failure
Symptoms: Stale or incorrect prices
Response:
- Pause strategies using affected oracles
- Switch to backup oracle
- Verify price feeds
- Resume after verification
Recovery Procedures
After Incident
- Post-Mortem: Document what happened
- Root Cause: Identify root cause
- Prevention: Implement prevention measures
- Testing: Test fixes thoroughly
- Communication: Notify stakeholders
System Restoration
- Verify Fix: Confirm issue is resolved
- Testnet Testing: Test on testnet first
- Gradual Rollout: Resume with small limits
- Monitoring: Monitor closely for 24-48 hours
- Normal Operations: Resume normal operations
Prevention
Regular Checks
- Weekly: Review transaction logs
- Monthly: Verify protocol addresses
- Quarterly: Security review
- Annually: Comprehensive audit
Monitoring
- Real-time alerts for failures
- Daily health checks
- Weekly metrics review
- Monthly security scan
Contact Information
- Emergency Hotline: [Number]
- Security Email: security@example.com
- Operations: ops@example.com