Inspiration

Self-custody is the foundation of crypto — but it creates a silent, irreversible failure mode: if the sole holder of a wallet's private keys dies, becomes incapacitated, or loses access, those assets are gone forever. There's no next-of-kin process, no bank to call, no court order that can recover funds locked behind a private key. Existing workarounds — handing a seed phrase to a relative, or trusting a centralized custodian — reintroduce exactly the risks self-custody was meant to eliminate. We wanted to build a trustless way to solve this.

What it does

Legacy Vault is a non-custodial smart contract that lets a crypto holder:

  • Deposit funds into a personal vault
  • Designate a heir (beneficiary) who inherits the funds
  • Designate a guardian who can vouch for them during a false alarm
  • Periodically check in to prove they're still active

If the owner goes silent past a chosen timeout period, the vault enters a Pending grace period rather than releasing funds immediately. A guardian can veto a false alarm during this window. If inactivity persists through both the timeout and grace period, the vault becomes Claimable, and the heir can withdraw the funds directly — no lawyer, no custodian, no seed phrase handoff.

Honest limitation, stated upfront: this detects prolonged inactivity, not death itself. The grace period and guardian veto are mitigations against false positives, not proof of incapacitation — a deliberate design choice we're disclosing rather than hiding.

How we built it

  • Wrote and tested the smart contract in Solidity using Foundry, building the state machine (Active → Pending → Claimable) function by function
  • Wrote 8 Foundry tests using vm.warp() to simulate the full 90+30 day inactivity lifecycle instantly, without waiting real time
  • Deployed and verified the contract on Sepolia testnet
  • Built a React + Vite frontend using wagmi and viem to connect MetaMask and read/write live contract data
  • Deployed the frontend on Vercel so it's fully live, not just local

Challenges we ran into

  • Environment setup across WSL and Fedora before landing on a stable Foundry + Node.js toolchain
  • Understanding that Ethereum smart contracts are passive — realizing that timeout/grace-period transitions require someone (or an automated keeper) to actually call the trigger functions, and designing around that honestly rather than glossing over it
  • Getting private key formatting, .env loading, and Etherscan verification working correctly for the deploy script

What we learned

  • How to design and test time-based state machines in Solidity using Foundry's time-warping cheatcodes
  • How wagmi/viem bridge a React frontend to a live smart contract
  • The real limitations of "automation" in smart contracts, and why keeper networks like Chainlink Automation exist

What's next

  • Keeper automation so checkTimeout()/finalizeClaimable() fire automatically instead of needing a manual call
  • Multi-token (ERC-20) support
  • Multiple beneficiaries with configurable split percentages
  • ENS-based beneficiary/guardian selection

Built With

Share this project:

Updates

Submission history