A decentralized "dead man's switch" protocol for secure crypto inheritance
Live Demo β’ Documentation β’ Deploy
AfterLife ensures your digital assets are securely distributed to beneficiaries if you become inactive for a defined period. The protocol operates on a "Dead Man's Switch" principle β lack of activity triggers a state change that eventually unlocks assets for your chosen beneficiaries.
- π Trustless Execution β No centralized authority controls your assets
- β±οΈ Time-Based Triggers β Customizable inactivity thresholds
- π‘οΈ Owner Override β Cancel inheritance at any time with proof of life
- π Multi-Chain β Deploy independently on Arbitrum and Mantle
| Network | Chain ID | Contract Address | Explorer | Status |
|---|---|---|---|---|
| Arbitrum Sepolia | 421614 | 0x6D2Bd7091CE36F15C944AB99c4cfc8833c2B8957 |
Arbiscan β | β Live |
| Mantle Sepolia | 5003 | 0xe04250cE4a9A2362eaC92B2BaA3E16E3691EBcE9 |
Mantlescan β | β Live |
π‘ Platform Fee: 10% on all beneficiary claims (sent to protocol treasury)
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AFTERLIFE PROTOCOL β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β OWNER β β GUARDIAN β β BENEFICIARY β β
β β Register β β Confirm β β Claim β β
β β Deposit β β Inactivity β β Assets β β
β β Prove Life β β β β β β
β ββββββββ¬ββββββββ ββββββββ¬ββββββββ ββββββββ¬ββββββββ β
β β β β β
β ββββββββββββββββββββββΌβββββββββββββββββββββ β
β β β
β ββββββββββββΌβββββββββββ β
β β SMART CONTRACT β β
β β (Multi-Tenant) β β
β β β β
β β β’ State Machine β β
β β β’ Fund Storage β β
β β β’ Vesting Logic β β
β ββββββββββββ¬βββββββββββ β
β β β
β ββββββββββββββββββββββΌβββββββββββββββββββββ β
β β β β β
β ββββββββΌβββββββ ββββββββΌβββββββ ββββββββΌβββββββ β
β β ARBITRUM β β MANTLE β β FUTURE β β
β β SEPOLIA β β SEPOLIA β β CHAINS β β
β βββββββββββββββ βββββββββββββββ βββββββββββββββ β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
| Entity | Role | Permissions |
|---|---|---|
| π€ Owner | Asset Holder | Register, deposit/withdraw, add guardians/beneficiaries, prove life, revive |
| π‘οΈ Guardian | Inactivity Oracle | Confirm owner inactivity (cannot touch funds) |
| π° Beneficiary | Asset Receiver | Claim allocated assets after vesting begins |
ACTIVE β WARNING β PENDING β EXECUTING β COMPLETED
β__________|_________|_________|
(Owner can revive)
| From | To | Trigger |
|---|---|---|
ACTIVE |
WARNING |
Inactivity reaches 70% of threshold |
WARNING |
PENDING |
Guardian confirms inactivity |
PENDING |
EXECUTING |
Vesting period begins |
EXECUTING |
COMPLETED |
All beneficiaries have claimed |
ANY STATE |
ACTIVE |
Owner proves life (7-day grace period) |
οΏ½ Owner Flow
Register β Add Guardians β Add Beneficiaries β Deposit Funds β Prove Life (Periodic)
οΏ½οΈ Guardian Flow
Monitor Owner β Detect Inactivity β Confirm Inactivity β Wait for Vesting
οΏ½ Beneficiary Flow
Wait for Execution β Check Claimable Amount β Claim Assets β Receive Funds
| Layer | Technology |
|---|---|
| Smart Contracts | Solidity 0.8.20, Hardhat |
| Frontend | React 18, Vite, TypeScript |
| Web3 | Wagmi v2, Viem, TanStack Query |
| Styling | CSS3 (Glassmorphism), Framer Motion |
| 3D Graphics | Three.js, React Three Fiber |
| Mechanism | Description |
|---|---|
| Owner Override | proveLife() cancels inheritance at ANY time |
| 7-Day Grace Period | Owner can revive even after execution starts |
| Vesting Delay | Funds unlock gradually, not instantly |
| Guardian Isolation | Guardians have ZERO fund access |
| Reentrancy Guards | All transfers protected |
- β Custom errors (gas efficient)
- β Strict modifiers for access control
- β Bounded arrays (max 10 guardians, 20 beneficiaries)
- β Pull-over-push for fund transfers
# Clone repository
git clone https://github.com/your-repo/afterlife.git
cd afterlife
# Install dependencies
pnpm install
# Run development server
pnpm dev# Arbitrum Sepolia
npx hardhat run scripts/deploy.js --network arbitrumSepolia
# Mantle Sepolia
npx hardhat run scripts/deploy.js --network mantleSepolia- Connect Wallet β Select network (Arbitrum or Mantle)
- Register β Set inactivity threshold (e.g., 30 days)
- Add Guardians β Trusted addresses to monitor you
- Add Beneficiaries β Set allocations (must total β€100%)
- Deposit Funds β Transfer ETH/MNT to your vault
- Prove Life β Click periodically to stay active
- Enter Owner Address β Monitor their status
- Wait for Threshold β Inactivity timer must expire
- Confirm Inactivity β Triggers inheritance process
- Enter Owner Address β Check your allocation
- Wait for Execution β Vesting must begin
- Claim Assets β Withdraw your share based on vesting schedule
Arbitrum Sepolia
| Setting | Value |
|---|---|
| Network Name | Arbitrum Sepolia |
| RPC URL | https://sepolia-rollup.arbitrum.io/rpc |
| Chain ID | 421614 |
| Currency | ETH |
| Explorer | https://sepolia.arbiscan.io |
Mantle Sepolia
| Setting | Value |
|---|---|
| Network Name | Mantle Sepolia Testnet |
| RPC URL | https://rpc.sepolia.mantle.xyz |
| Chain ID | 5003 |
| Currency | MNT |
| Explorer | https://explorer.sepolia.mantle.xyz |
- Arbitrum Sepolia: Alchemy Faucet
- Mantle Sepolia: Mantle Faucet
MIT License - see LICENSE for details.
Built with β€οΈ for the decentralized future