Application 2: Trustless Digital "Dead Man's Switch" for Inheritance and Corporate Succession

Table of contents
- The Business Problem: The Single Point of Failure in Legacy Planning
- The Blocklock-Powered Solution: Guaranteed, Automated Release
- Why This Absolutely Requires Blocklock
- π How It Works
- β¨ Key Features
- πΌ Use Cases
- ποΈ Technical Architecture
- π Project Structure
- π Getting Started
- π Supported Networks
- π Security Considerations
- π οΈ Development
- π€ Contributing
- π License
- β οΈ Disclaimer
- π Support
- π Acknowledgments

First and foremost, the demo and the github repo. I would truly appreciate any feedback, so donβt hold back ; )
After a lot of consideration and basing on its unique capabilities, a business application that absolutely requires a technology like blocklock is a Trustless Digital "Dead Man's Switch" for Inheritance and Corporate Succession.
While other applications like sealed-bid auctions or gaming benefit greatly from blocklock, they can often be implemented with less elegant solutions like commit-reveal schemes. A true, decentralized dead man's switch, however, has a fundamental requirement that only blocklock can fulfill: the automated, guaranteed release of information based on the passage of time, without relying on any trusted third party.
The Business Problem: The Single Point of Failure in Legacy Planning
The secure management and transfer of critical, sensitive documents upon a person's death or incapacitation is a profound challenge.
Traditional Solutions: Last wills, lists of digital asset private keys, or corporate succession plans are typically held by trusted intermediaries like lawyers, banks, or specialized digital vault companies. This model introduces significant risks:
Single Point of Failure: The trusted party could be compromised, go out of business, or simply fail to act, leaving the documents inaccessible.
Human Error and Delay: The process is manual, slow, and subject to human error, potentially causing significant delays for beneficiaries.
Lack of Trustless Guarantees: The entire system is built on trusting a human or a centralized entity to execute instructions correctly at an unknown future date.
Why Standard Smart Contracts Fail: A basic smart contract cannot solve this problem on its own. It can execute logic based on current conditions but cannot natively trigger an action based on a future point in time without an external prompt. Using a centralized "keeper" service to trigger the contract simply replaces one trusted intermediary with another, defeating the purpose of a decentralized solution.
The Blocklock-Powered Solution: Guaranteed, Automated Release
A "Dead Man's Switch" built with blocklock fundamentally re-architects this process by replacing human trust with cryptographic certainty.
Encryption and Long-Term Timelock: A user (the "testator") encrypts their sensitive data (e.g., a will, private keys, access credentials) using
blocklock-js
. They set the decryption condition to atargetBlock
far in the futureβfor example, 50 years from the current date. This encrypted data is stored on-chain in a dedicated smart contract.The "Heartbeat" Mechanism: The smart contract is programmed to require a periodic "heartbeat" transaction from the testator (e.g., once every six months). Each time this heartbeat is received, the smart contract automatically calls the blocklock protocol to push the
targetBlock
for decryption another six months into the future.Automated, Trustless Execution: As long as the testator is alive and able, they can send the heartbeat transaction, continually delaying the data's release. If the testator passes away or becomes incapacitated, the heartbeats will stop. The blockchain will continue to produce blocks, and the pre-set
targetBlock
will eventually be reached.Guaranteed Key Delivery: Once the
targetBlock
is mined, the dcipher network automatically and irrevocably delivers the decryption key to the smart contract. The contract's logic then makes this key available only to the wallet address of the pre-designated beneficiary or executor.
Why This Absolutely Requires Blocklock
This application is impossible to implement in a truly decentralized and trustless manner without a primitive like blocklock. The core value proposition is the guaranteed, automated execution of a future action without a trusted intermediary.
No Intermediary Risk: The release is not dependent on a lawyer checking death certificates or a company's servers being online. It is triggered by the decentralized, unstoppable, and verifiable progression of the blockchain itself.
Absolute Confidentiality: The encrypted data remains completely private and inaccessible to anyoneβincluding network validatorsβuntil the time-based condition is met.
Programmable Certainty: Blocklock allows us to "send information into the future" with a cryptographic guarantee that it will arrive at the specified time. This transforms a legal instruction from a request that requires a trusted party to execute into a self-enforcing, automated event.
In essence, for a system whose entire purpose is to act reliably at an unknown future time without relying on a person or company, a decentralized and automated time-release mechanism is not just a featureβit is the entire foundation.
π How It Works
1. Vault Creation
Users create encrypted vaults containing sensitive information (wills, private keys, access credentials)
Data is encrypted locally using blocklock-js and never exposed to anyone
Users designate a beneficiary wallet address to receive the information
Set a heartbeat interval (3, 6, or 12 months) for periodic check-ins
2. Heartbeat Mechanism
Users must send periodic "heartbeat" transactions to keep their vaults locked
Each heartbeat extends the release date by the specified interval
If heartbeats stop, the system automatically begins the release process
3. Automated Release
When the target block is reached, the blocklock protocol automatically delivers decryption keys
Beneficiaries can claim and decrypt the stored information
The entire process is trustless and guaranteed by blockchain consensus
β¨ Key Features
π End-to-End Encryption: Data is encrypted locally and never visible to anyone else
π€ Automated Release: No human intervention required - the blockchain guarantees execution
π Trustless Operation: No trusted third parties or centralized services
β° Flexible Heartbeat Intervals: Choose from 3, 6, or 12-month check-in periods
π‘οΈ 50-Year Fail-Safe: Ultimate protection with a very long-term backup release mechanism
π₯ Beneficiary Portal: Dedicated interface for recipients to access released information
π± Responsive Design: Mobile-first approach with modern UI/UX
π Multi-Chain Support: Works across multiple blockchain networks
πΌ Use Cases
π Personal Inheritance: Wills, private keys, access credentials for family members
π’ Corporate Succession: Business continuity plans, access codes, operational procedures
π° Digital Asset Transfer: Cryptocurrency private keys, NFT access, account credentials
βοΈ Legal Document Storage: Contracts, agreements, and other sensitive legal materials
π¨ Emergency Access: Critical information that needs to be available in emergency situations
π Password Management: Secure storage of important account credentials
π Business Continuity: Operational procedures and access codes
ποΈ Technical Architecture
Frontend
Framework: Next.js 15 with React 18
Styling: Tailwind CSS for modern, responsive design
Wallet Integration: RainbowKit for Web3 wallet connectivity
State Management: React Query for efficient data fetching
Blockchain Integration: Ethers.js for blockchain interaction
Blockchain Integration
Protocol: Uses the blocklock protocol for time-locked encryption
Networks: Supports multiple networks (Filecoin, Arbitrum, Optimism, Base)
Smart Contracts: Integration for vault management and automation
Key Delivery: Automated key delivery through blockchain consensus
Security Features
Local Encryption: Data encrypted locally before any transmission
Blockchain Security: Access control and release mechanisms on-chain
Cryptographic Guarantees: Data integrity and timing guarantees
No Central Storage: No centralized storage of sensitive information
Private Key Security: User maintains complete control of their keys
π Project Structure
dead-man-switch/
βββ app/ # Next.js app directory
β βββ page.tsx # Homepage with features and navigation
β βββ vault/ # Vault management interface
β β βββ page.tsx # Create and manage vaults
β βββ beneficiary/ # Beneficiary portal
β β βββ page.tsx # Access released vaults
β βββ blocklock/ # Original blocklock implementation
β β βββ page.tsx # Basic encryption/decryption
β βββ layout.tsx # Root layout component
β βββ providers.tsx # React Query and wallet providers
βββ components/ # Reusable UI components
β βββ Footer.tsx # Footer component (legacy)
β βββ header.tsx # Header components
β βββ walletConnect.tsx # Wallet connection utilities
βββ hooks/ # Custom React hooks
β βββ useVault.ts # Vault management logic
β βββ useEncrypt.ts # Encryption functionality
β βββ useEthers.ts # Ethers.js integration
β βββ useExplorer.ts # Message exploration
β βββ useNetworkConfig.ts # Network configurations
βββ lib/ # Utilities and configurations
β βββ contract.ts # Smart contract ABIs and addresses
βββ public/ # Static assets
β βββ assets/ # Images, logos, and other assets
βββ package.json # Project dependencies and scripts
π Getting Started
Prerequisites
Node.js: 22.0.0 or higher
Web3 Wallet: MetaMask, Rainbow, or other compatible wallet
Blockchain Access: Connection to supported networks
Git: For cloning the repository
Installation
- Clone the repository:
git clone https://github.com/hatif03/dead-man-switch.git
cd dead-man-switch
- Install dependencies:
npm install
- Start the development server:
npm run dev
- Open your browser and navigate to http://localhost:3000
Development Commands
# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm run start
# Run linting
npm run lint
Usage Guide
Connect Your Wallet: Use the Connect Wallet button to link your Web3 wallet
Create a Vault: Navigate to the Vault page and create your first digital legacy vault
Set Parameters: Choose your beneficiary, heartbeat interval, and encrypt your data
Send Heartbeats: Periodically send heartbeat transactions to keep your vault locked
Beneficiary Access: Your designated beneficiary can access the information once released
π Supported Networks
Network | Chain ID | Block Time | Status |
Filecoin Mainnet | 314 | 30s | β Supported |
Filecoin Calibration | 314159 | 30s | β Supported |
Arbitrum Sepolia | 421614 | 1s | β Supported |
Optimism Sepolia | 11155420 | 2s | β Supported |
Base Sepolia | 84532 | 1s | β Supported |
π Security Considerations
Best Practices
Private Key Management: Never share your private keys or seed phrases
Network Security: Ensure you're connected to the correct blockchain network
Beneficiary Verification: Double-check beneficiary wallet addresses before creating vaults
Regular Heartbeats: Set reminders for your heartbeat schedule to avoid premature release
Backup Plans: Consider multiple beneficiaries or backup mechanisms for critical information
Security Features
Local Encryption: All data is encrypted in your browser before transmission
Blockchain Verification: Smart contracts ensure proper execution
No Data Storage: Sensitive information is never stored on our servers
Access Control: Only designated beneficiaries can access released information
π οΈ Development
Tech Stack
Frontend: Next.js 15, React 18, TypeScript
Styling: Tailwind CSS
Blockchain: Ethers.js, blocklock-js
Wallet: RainbowKit, Wagmi
State Management: React Query
Build Tool: Turbopack (development)
Development Workflow
Fork the repository
Create a feature branch
Make your changes
Test thoroughly
Submit a pull request
Code Quality
TypeScript for type safety
ESLint for code quality
Prettier for code formatting
Responsive design principles
π€ Contributing
We welcome contributions to improve the Digital Dead Man's Switch! Please feel free to:
π Report bugs and issues
π‘ Suggest new features and improvements
π§ Submit pull requests with enhancements
π Help improve documentation
π§ͺ Test the application and provide feedback
Contribution Guidelines
Fork the repository
Create a descriptive branch name
Make focused, atomic commits
Test your changes thoroughly
Update documentation as needed
Submit a clear pull request description
π License
This project is licensed under the MIT License - see the LICENSE file for details.
β οΈ Disclaimer
This software is provided "as is" without warranty of any kind. Users are responsible for:
Properly managing their private keys and wallet security
Understanding the implications of automated information release
Complying with applicable laws and regulations
Seeking professional legal and financial advice when appropriate
The Digital Dead Man's Switch is a tool for secure information transfer but does not constitute legal, financial, or professional advice.
π Support
For support, questions, or to report issues:
π Documentation: GitHub README
π Issues: GitHub Issues
π¬ Discussions: GitHub Discussions
π¦ Twitter: @hatif_15
π Acknowledgments
Built with the blocklock protocol for secure time-locked encryption
Styled with Tailwind CSS
Web3 integration with RainbowKit and Wagmi
Built with β€οΈ for secure digital legacy planning
This project aims to provide a secure, trustless solution for digital inheritance and succession planning, ensuring that your important information is protected and accessible when needed.
Subscribe to my newsletter
Read articles from Mohammad Hatif Osmani directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Mohammad Hatif Osmani
Mohammad Hatif Osmani
A passionate software developer who loves experimenting and learning new tech.