A decentralized application (DApp) designed as a fail-safe mechanism for asset inheritance or emergency triggering. Users can deposit funds into a smart contract, which requires regular "check-ins" (pings) from the owner. If the owner fails to ping within a specified timeframe, the logic assumes an emergency or absence, allowing a designated beneficiary to claim the funds.both the owner and the user need a string password to withdraw if a user losses his wallet he can access the smart contract from his backup wallet i.e the 2nd wallet address given by the user while deploying.
The main problem this project is fixing crypto wallets are easily compromised by hackers its better to store crypto on a smartcontract even though the hacker gets the wallet access he couldn't be able to access the funds since the funds are password protected and encrypted using hashing algorithms and if suppose the owner is dead there will be a automatic mail sent to the benefeicary. the mail contains the password and address of the smart contract to access from site (//the email part is still in developing phase).
🌐 Live Demo: deadkey.vercel.app
- Smart Contract Vault: Securely holds ETH/Schells via a Solidity smart contract.
- Heartbeat Mechanism: Owner must call
ping()to reset the inactivity timer. - Beneficiary Claim: If the timer expires, the beneficiary address is authorized to withdraw the funds.
- Python Watchtower: An automated script that monitors the contract status and sends email notifications upon expiration.
- 3D Interactive UI: Built with React Three Fiber for an immersive "Vault" experience.
- Node.js (v18+ recommended)
- NPM (via Node.js)
- MetaMask (or any Web3 provider wallet)
- Ethereum/EVM Testnet/Mainnet access
- Python 3.8+
- SMTP Server (e.g., Gmail) for email notifications
The frontend manages contract deployment, deposits, and pings.
-
Install Dependencies
npm install
-
Start Development Server
npm run dev
Open your browser at
http://localhost:5173. -
Usage
- Connect your Wallet.
- Deploy a new Dead Man's Switch contract (configure Beneficiary & Duration).
- Deposit funds into the vault.
- Ping regularly to keep the vault locked.
The Watchtower script runs independently to monitor your contract and alert the beneficiary.
-
Install Python Dependencies You will need
web3andpython-dotenv.pip install web3 python-dotenv
-
Configure Environment Create a
.envfile in the root directory (based onwachtower.pyrequirements):# Blockchain Connection RPC_URL=https://your-rpc-url-here CONTRACT_ADDRESS=0xYourDeployedContractAddress # Email Notification Settings EMAIL_USER=your-email@gmail.com EMAIL_PASS=your-email-app-password EMAIL_HOST=smtp.gmail.com EMAIL_PORT=587 # Beneficiary (Optional, can be set via CLI) BENEFICIARY_EMAIL=beneficiary@example.com
-
Run the Watchtower
python src/wachtower.py
The script will poll the contract every 10 seconds and send an email if the
lastactivetimestamp + timeout indicates expiration.
src/App.jsx- Main React application logic (Wallet connection, Contract interaction).src/wachtower.py- Python monitoring script.src/components/- React UI components.src/utils/contracts.js- ABI and Bytecode for the smart contract.
MIT