Skip to content

lordbasilaiassistant-sudo/deadman-switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeadManSwitch — On-Chain Inheritance & Liveness Beacon for Base

A minimal, immutable, permissionless dead-man switch on Base mainnet. Lock ETH, ping it on a schedule. If you stop pinging, the funds route to your beneficiary. Anyone can trigger the payout for a small bounty.

  • Use cases: estate planning, wallet-compromise hedge, founder vesting fallback, multi-year "if I disappear" payouts.
  • Trust model: non-upgradeable, no admin keys after deploy, no whitelist, no oracle.
  • Cost: 0.5% fee on register, 0.5% bounty on trigger. Both capped at 5% (immutable).

Live deployment

Network Address Verified
Base mainnet (8453) 0x40f1AAb4c82D48260Ab1207e27329d51290025DB
Base Sepolia (84532) 0x495fbeb17eCB16694f83Ed2A48EBCf59CD9D20AE

Mainnet parameters: minInterval=1h, maxInterval=10y. Treasury 0x7a3E312Ec6e20a9F62fE2405938EB9060312E334.

Interface

function register(address beneficiary, uint64 intervalSeconds) external payable returns (uint256 id);
function ping(uint256 id) external;
function trigger(uint256 id) external;       // anyone, after deadline → bounty to caller
function cancel(uint256 id) external;        // owner only, before deadline
function isAlive(uint256 id) external view returns (bool);

Full ABI: out/DeadManSwitch.sol/DeadManSwitch.json after forge build.

Why on-chain

  • No subscription: no off-chain keeper to pay, anyone earns the bounty for triggering.
  • No SaaS dependency: if our website disappears, the contract still works.
  • Verifiable behavior: integration test on Sepolia matched expected payouts to the wei.

Build / test

forge install
forge build
forge test -vv

Deploy to Base mainnet:

THRYXTREASURY_PRIVATE_KEY=0x... forge script script/Mainnet.s.sol:Mainnet --rpc-url https://mainnet.base.org --broadcast --verify

Part of the THRYX onchain surface

This is one of 14 utility contracts deployed by the THRYX project on Base. Full inventory: https://thryx.fun

Companion contracts:

Built on

  • Base — the Ethereum L2 this is deployed on (open-source, OP Stack).
  • Foundry — Solidity toolchain used for build, test, and deploy scripts.
  • Basescan — block explorer used for verification.
  • Claude Code by Anthropic — primary engineering assistant for the THRYX surface.

Support this work

If this contract is useful to you, the easiest way to fund continued maintenance is direct on-chain:

The repo's Sponsor button (top of page) wires to the same address via .github/FUNDING.yml.

License

MIT.

About

On-chain dead-man switch on Base mainnet. Lock ETH, ping on a schedule, beneficiary gets it if you stop pinging. Anyone can trigger for a bounty. Immutable, no admin keys.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors