{"id":26220558,"url":"https://github.com/cmpgfb/dead-man-switch-contracts","last_synced_at":"2026-02-07T01:30:46.411Z","repository":{"id":281972320,"uuid":"947059835","full_name":"CMPGFB/Dead-Man-Switch-Contracts","owner":"CMPGFB","description":"Dead Man’s Switch smart contracts across multiple blockchain platforms, enabling digital asset succession planning. These contracts ensure that if an owner becomes inactive beyond a set timeout, assets (Bitcoin, Ethereum, Stacks, or ERC-20 tokens) are securely transferred to a designated beneficiary.","archived":false,"fork":false,"pushed_at":"2025-03-12T05:56:03.000Z","size":26,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-16T13:44:45.617Z","etag":null,"topics":["bitcoin","bitscript","clarity","dms","evm","miniscript","open-source","smart-contracts","solidity","stacks"],"latest_commit_sha":null,"homepage":"","language":"Clarity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CMPGFB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-03-12T04:56:46.000Z","updated_at":"2025-04-02T01:04:03.000Z","dependencies_parsed_at":"2025-03-15T15:15:10.460Z","dependency_job_id":null,"html_url":"https://github.com/CMPGFB/Dead-Man-Switch-Contracts","commit_stats":null,"previous_names":["cmpgfb/dead-man-switch-contracts"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/CMPGFB/Dead-Man-Switch-Contracts","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CMPGFB%2FDead-Man-Switch-Contracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CMPGFB%2FDead-Man-Switch-Contracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CMPGFB%2FDead-Man-Switch-Contracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CMPGFB%2FDead-Man-Switch-Contracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CMPGFB","download_url":"https://codeload.github.com/CMPGFB/Dead-Man-Switch-Contracts/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CMPGFB%2FDead-Man-Switch-Contracts/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29183939,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T00:44:15.062Z","status":"ssl_error","status_checked_at":"2026-02-07T00:35:01.758Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bitcoin","bitscript","clarity","dms","evm","miniscript","open-source","smart-contracts","solidity","stacks"],"created_at":"2025-03-12T15:18:10.102Z","updated_at":"2026-02-07T01:30:46.406Z","avatar_url":"https://github.com/CMPGFB.png","language":"Clarity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Dead Man’s Switch Smart Contracts**  \n\nThis repository contains multiple implementations of a **Dead Man’s Switch** contract across different blockchain technologies, including **Solidity (Ethereum), Clarity (Stacks), Clarity with Bitcoin UTXOs, and Bitcoin Script (Miniscript/Bitscript)**. All contracts have not been audited by a firm, so proceed with caution and do not use in a production environment without proper auditing, preventing loss of funds. \n\nA **Dead Man’s Switch** is a mechanism that automatically transfers assets if the owner fails to check in within a certain timeframe.  \n\n---\n\n## **1. Solidity Contract (Ethereum)**\n### **Overview**\n- Manages **ERC-20 tokens** or native **ETH**.\n- Transfers funds to a **beneficiary** if the owner does not check in within the timeout period.\n- Uses **block timestamps** to track inactivity.\n\n### **Key Features**\n✅ Allows the owner to check in periodically.  \n✅ Transfers assets to a designated beneficiary if the timeout expires.  \n✅ Supports **ERC-20 tokens** and **native ETH**.  \n\n### **Deployment \u0026 Usage**\n- Deploy on **Ethereum** or any **EVM-compatible chain** (e.g., Polygon, BSC).  \n- Owner must periodically call `checkIn()`.  \n- If the timeout expires, the `triggerSwitch()` function transfers assets to the beneficiary.  \n\n---\n\n## **2. Clarity Contract (Stacks)**\n### **Overview**\n- Manages **STX tokens** and SIP-010 **fungible tokens** on **Stacks**.\n- Uses **Stacks block height** instead of timestamps.  \n- Only the contract owner can check in.  \n\n### **Key Features**\n✅ Uses **Stacks smart contracts** (Clarity language).  \n✅ Transfers **STX or SIP-010 tokens** upon owner inactivity.  \n✅ Fully on-chain execution.  \n\n### **Deployment \u0026 Usage**\n- Deploy the contract on **Stacks blockchain**.  \n- The owner must call `check-in()` to prevent execution.  \n- The `trigger-switch()` function allows the **beneficiary** to claim assets after the timeout.  \n\n---\n\n## **3. Clarity Contract with Bitcoin UTXOs**\n### **Overview**\n- Stores **Bitcoin UTXOs** instead of just STX tokens.  \n- If the owner fails to check in, BTC is sent to the beneficiary using a **pre-signed Bitcoin transaction**.  \n\n### **Key Features**\n✅ Works with **Bitcoin Layer 1 UTXOs**.  \n✅ Integrates with **Stacks \u0026 Bitcoin** using Clarity.  \n✅ Uses **Bitcoin Script (P2SH/P2WSH) for UTXO control**.  \n\n### **Deployment \u0026 Usage**\n1. **Deposit BTC** into the contract-controlled UTXO.  \n2. Owner must call `check-in()` to maintain control.  \n3. If the timeout expires, a **Bitcoin transaction** is triggered to send funds to the BTC beneficiary.  \n\n---\n\n## **4. Miniscript / Bitscript Contract (Bitcoin)**\n### **Overview**\n- Implements a **Bitcoin Script-based Dead Man’s Switch** using **Miniscript**.\n- Funds are locked in a **Bitcoin P2SH address**.\n- If the owner does not sign within the timeout, the beneficiary can claim the funds.  \n\n### **Key Features**\n✅ Uses **Bitcoin-native locking scripts**.  \n✅ Supports **timelocks (CLTV/CSV)**.  \n✅ Can work as a **standalone Bitcoin contract** without other blockchains.  \n\n### **Deployment \u0026 Usage**\n- **Lock BTC** into a **P2SH (or P2WSH) address** using the contract script.  \n- The owner must **sign periodically** to reset the timelock.  \n- After the timeout, the **beneficiary can spend BTC** using a different script path.  \n\n---\n\n## **Comparison Table**\n| Implementation | Blockchain | Assets Supported | Timeout Mechanism | Dependency |  \n|--------------|------------|----------------|----------------|------------|  \n| **Solidity** | Ethereum / EVM | ETH, ERC-20 | Timestamp | EVM Chains |  \n| **Clarity (STX Only)** | Stacks | STX, SIP-010 | Block Height | Stacks |  \n| **Clarity + UTXOs** | Stacks \u0026 Bitcoin | BTC (UTXOs) | Block Height | Bitcoin \u0026 Stacks |  \n| **Miniscript/Bitscript** | Bitcoin | BTC (UTXOs) | CLTV/CSV | Bitcoin Only |  \n\n---\n\n## **Open Source Upgrades Options** \n✅ Implement **multisig options** for more security.  \n✅ Implement **Lightning Network integration** for faster BTC transactions.  \n\n## **Final Thoughts**\n- If using **Ethereum**, deploy the **Solidity contract**.  \n- If working with **Stacks**, use the **Clarity contract**.  \n- If integrating **Bitcoin Layer 1**, use **Clarity + UTXOs**.  \n- If building **directly on Bitcoin**, use **Miniscript/Bitscript**.  \n\n## **Jesus Loves You. Repent \u0026 Seek the Kingdom of God.**\n\nIt's appointed for man / woman to die, then judgement. Whether Heaven or Hell, the assets we buy and sell remains on Earth. This is a way to manage and transition assets well. \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmpgfb%2Fdead-man-switch-contracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcmpgfb%2Fdead-man-switch-contracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcmpgfb%2Fdead-man-switch-contracts/lists"}