You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SolWill - Decentralized Dead Man's Switch for Crypto Inheritance
A Solana smart contract that enables trustless crypto inheritance using a dead man's switch mechanism. Owners deposit SOL, designate beneficiaries with percentage shares, and check in periodically. If the owner stops checking in past a configurable timeout + grace period, beneficiaries can claim their designated share on-chain — no lawyers, custodians, or centralized services required.
# Clone the repository
git clone <your-repo-url>cd solwill
# Install dependencies
yarn install
# Build the program
anchor build
# Run tests
anchor test
Frontend Development
cd app
# Install frontend dependencies
npm install
# Run development server
npm run dev
# Build for production
npm run build
Configuration
The will supports the following configurable parameters:
Parameter
Minimum
Description
timeout_seconds
86400 (1 day)
How long before the dead man's switch activates
grace_period
3600 (1 hour)
Additional buffer after timeout before claims open
Transfer Ownership — Same-address rejection, zero address rejection
Close Will — Will closure with fund recovery, re-initialization, deposit-after-close rejection
Authorization — Non-owner rejection for all 7 owner-only operations
Max Beneficiaries — Adding 10 beneficiaries, 11th rejected
Account State — Full field verification, vault balance check
Deployment
# Configure for devnet
solana config set --url devnet
# Airdrop SOL for deployment
solana airdrop 2
# Build and deploy
anchor build
anchor deploy --provider.cluster devnet
# Verify deployment
solana program show 4bfagECyGUMHaaQF9mfTvJBpmyxTVFhzPNhb3xfTPMfF --url devnet
Security Considerations
PDA-controlled vault: No individual can withdraw without meeting program conditions
Basis point validation: Total shares cannot exceed 10000 (100%)
Double-claim prevention: has_claimed flag per beneficiary
Time-based access control: Claims only after timeout + grace period
Pause mechanism: Owner can freeze operations in emergencies
Pause-blocking: All state-changing operations blocked when paused
Overflow protection: saturating_add used for cumulative counters
Zero address validation: Ownership cannot be transferred to zero address
Rent-exempt protection: Withdrawals and claims preserve minimum rent balance
CPI with PDA signer: Vault transfers use system program CPI with PDA seeds
License
MIT
About
Decentralized crypto inheritance on Solana — dead man's switch that automatically transfers assets to beneficiaries after wallet inactivity. Built with Anchor, Next.js, TypeScript.