All projects

DeadmanSwitch AI

Autonomous crypto inheritance protocol using Chainlink CRE automation.

CRE & AI

What it is

DeadmanSwitch AI is an autonomous crypto inheritance protocol that ensures digital assets are not permanently lost when wallet owners become inactive.

One of the largest unsolved problems in Web3 is lost crypto due to lost private keys, forgotten wallets, or the death of the owner. Billions of dollars in digital assets are estimated to be permanently inaccessible because there is no reliable inheritance mechanism.

DeadmanSwitch AI solves this problem by combining onchain smart contracts with offchain monitoring using the Chainlink Runtime Environment (CRE).

The system allows a wallet owner to register a beneficiary (heir) and define an inactivity threshold. The user periodically sends a "ping" transaction to confirm they are still active. If the owner becomes inactive for longer than the defined threshold, a CRE workflow automatically triggers the smart contract to transfer all funds to the registered heir.

How the CRE integration works: The CRE workflow runs offchain and monitors the blockchain as an external data source. It reads the owner's last activity timestamp and inactivity threshold directly from the smart contract via an RPC provider. It compares real-world elapsed time (offchain clock) against the onchain value. When the inactivity condition is confirmed, the workflow calls executeInheritance() on the smart contract. This demonstrates CRE integrating an external system (offchain time and RPC data) with onchain execution.

Key features:

  • Register any wallet address as beneficiary
  • Define custom inactivity threshold
  • Deposit ETH funds into the vault
  • Periodic ping to reset the inactivity timer
  • CRE workflow with exponential-backoff retry, preflight checks, gas price guard, and receipt verification
  • Simulation script for full lifecycle testing
  • Web3 dashboard for all user actions

Live demo: https://deadmanswitch.vercel.app

By automating inheritance execution with Chainlink CRE, DeadmanSwitch AI provides a trustless, decentralized, and censorship-resistant solution for crypto estate planning — the AI-driven dead man's switch for your digital legacy.

How it Works

The project is built using a combination of smart contracts, offchain CRE monitoring workflows, and a lightweight Web3 dashboard.

Smart Contract Layer:
A Solidity smart contract (InheritanceVault) stores funds and manages inheritance logic. It records the owner wallet, beneficiary wallet, inactivity threshold, last activity timestamp, and an authorized automation registry address. Deployed on Base Sepolia testnet (Chain ID: 84532) at 0x7aD44599A09656D0430D939510c1991A85d8fb73.

Automation Layer (Chainlink CRE):
A Chainlink Runtime Environment (CRE) workflow runs offchain and continuously monitors the vault state by reading the blockchain via an RPC provider. The workflow performs preflight checks (heir is set, balance is non-zero, threshold is truly exceeded with a timestamp buffer), applies a gas price guard (aborts above 50 gwei), runs an estimateGas dry-run before sending to detect reverts early, verifies the automation wallet is authorized via the contract's automationRegistry, and checks receipt.status on every transaction. A watch mode enables continuous 60-second polling. The workflow calls executeInheritance() when all conditions are met.

Frontend Interface:
A Next.js dashboard allows users to connect their wallet (RainbowKit + wagmi), register a beneficiary, deposit funds, send periodic alive pings, and view vault status in real time.

Developer Stack:
Solidity, Hardhat, Node.js, TypeScript, Next.js, Ethers.js, wagmi v2, RainbowKit v2, TailwindCSS, Chainlink CRE CLI

The system demonstrates how CRE can orchestrate offchain monitoring and secure onchain automation to solve a real-world problem at the intersection of DeFi, risk management, and digital asset inheritance.

Links

Created by

  • Vincentius Bryan Kwandou