Hierarchical Safe with Non-Standard Signing Implementation
Version 3.0 | December 2024
Document Control
Version |
Date |
Author |
Changes |
1.0 |
2024-11-27 |
Sero |
Initial release |
2.0 |
2024-12-02 |
Sero |
Added Passkeys and deadman switch |
3.0 |
2024-12-03 |
Sero |
Refined architecture, improved clarity |
1. Executive Summary
This architecture document builds on a nested Safe setup, and details an advanced implementation of a Safe multi-signature system that addresses core challenges in enterprise asset management through three approaches:
- Hardware Security Integration: Using Passkeys, WebAuthn and P-256 signatures
- Automated Recovery: Implementing a Dead Man's Switch mechanism, which uses ERC-1271 to allow for signing
- Operational Flexibility: Leveraging nested Safe structures
The system uses a 2/3 multisignature configuration where the signers are:
- A hardware-backed Passkeys signer for secure authentication (ERC-1271)
- A Dead Man's Switch for automated recovery (ERC-1271)
- A nested Safe for operational control
1.1 Core Architecture
1.2 Core Objectives
Objective |
Implementation |
Success Criteria |
Hardware Security |
Safe Passkeys Module + P-256 signatures |
Biometric verification success |
Business Continuity |
Dead Man's Switch with grace period |
Recovery initiation within X hours |
Operational Efficiency |
Nested Safe hierarchy |
Transaction throughput meets business needs |
Future Proofing |
Upgradeable module architecture |
Seamless standard adoption |
2. System Components
2.1 Safe Passkeys Module Integration
The system integrates with Safe's official Passkeys Module, which provides a standardized way to use WebAuthn authentication as a valid signer. The integration consists of three main components:
- SafeWebAuthnSignerProxy
This proxy contract is deployed for each passkey signer and stores essential configuration:
- SafeWebAuthnSignerSingleton
The singleton handles signature verification logic:
- SafeWebAuthnSignerFactory
The factory manages proxy deployment and initial verification:
2.2 Dead Man's Switch Implementation
The Dead Man's Switch (DMS) functions as an automated signer that provides failsafe recovery capabilities through time-based authorization. It implements both ERC-1271 for signing and a comprehensive recovery protocol (Recovery Module).
2.3 System Integration Flow
3. Security Model
The security model implements multiple layers of protection:
3.1 Hardware Security Layer
The Passkeys Module leverages device security through:
- Secure hardware elements (TPM/Secure Enclave)
- Biometric verification
- P-256 signature generation
- WebAuthn attestation
3.2 Smart Contract Security Layer
3.3 Recovery Layer
The recovery system provides multiple paths:
- Automated DMS recovery
- Guardian-based social recovery
- Hardware device backup
- Nested Safe recovery options
4. Deployment Strategy
4.1 Component Deployment
4.2 Environment Configurations
Environment |
Passkeys Config |
DMS Settings |
Testing Focus |
Development |
Mock WebAuthn |
Short periods |
Functionality |
Staging |
Test devices |
Normal periods |
Integration |
Production |
Production WebAuthn |
Full settings |
Security |
5. Risk Analysis
5.1 Critical Paths
Component |
Risk |
Mitigation |
Monitoring |
Passkeys |
Device failure |
Multiple registrations |
Health checks |
DMS |
False trigger |
Grace period |
Heartbeat monitoring |
Integration |
Module conflict |
Isolation testing |
Contract events |
5.2 Recovery Procedures
6. Maintenance and Operations
6.1 Regular Maintenance
The system requires regular maintenance of:
- Device registrations and health
- DMS heartbeat monitoring
- Recovery path validation
- Security parameter updates
6.2 Monitoring Systems
References and Standards
The implementation adheres to:
- Safe Module Standards
- WebAuthn Specifications
- ERC-1271 and ERC-7212
7. Appendices
7.1 Testing Framework
Test Category |
Description |
Frequency |
WebAuthn Integration |
Device registration and authentication |
Per deployment |
Recovery Flow |
DMS and backup procedures |
Monthly |
Security Verification |
Signature validation and replay protection |
Continuous |
7.2 Reference Implementations
Component |
Reference |
Notes |
Safe Contracts |
safe-contracts |
Core functionality |
Passkeys Module |
Safe Module |
WebAuthn implementation |
WebAuthn Library |
Web API |
Browser integration |
Dead Man's Switch |
Custom |
Automated recovery |
Reference Index
Standards & Proposals
Safe Implementation
Development Resources
Additional Resources