Dead Man's Switch

user8472user8472 Member Posts: 7
edited May 2014 in Smart Contracts and Dapps
I like to have cryptographic control over my digital assets, but I would also like my assets to be transferred to my family member(s) in the event of my death. What's the best way to write a smart contract that would transfer my ether or other digital assets to my family member(s) in the event of my death? If I use the block # as a trigger, and modify it over time, would that be secure, or could the block number be forged and trigger my contract earlier than I wish?


  • JasperJasper Eindhoven, the NetherlandsMember Posts: 514 ✭✭✭
    Of course you have to be <i>sure</i> that the code does as intended! This is <i>always</i> the case!

    In Serpent, you can use <code>msg.sender == OWNER</code> Where OWNER will be an address run by you. If this is true, that shows that it was someone with your private key. I dont think <code>block.number</code> can be forged either, full(maybe even light ones can detect it) nodes will call the block invalid and not accept it. It would be a waste of the miners resources as such too. You can also use <code>block.timestamp</code> that also has limitations in terms of what is valid.(but less stringent because computer times may drift.) Personally i'd use <code>block.number</code>.

    So you can essentially do exactly as you say.

    This contract may also be useful to increase the security of your reserves. Instead of <code>OWNER</code> you put that in <code>[0]=OWNER</code> initially, it slowly releases funds to that address, but it also remembers a list of people who can vote to change the owner address, or maybe there is also cryptographic commitment to a (strong) secret in there. (a single-use <i>strong</i> passphrase, i wouldnt do that as single measure..) This way if someone stole your private key, you could re-secure yourself, create a new one, and ask your friends/family to change the contract to that one.

    Another interesting question is if a dead man switch can be used to unlock a document aswel. The <a href="">dropbox example</a>(

    I think it can be done, but only know a way enforced with stake.(as opposed to enforced by validity, like <code>block.number</code>) You would need to have a service put in stake(like ethers, but it could be a lot of things) that is more than they could even gain from releasing early. And pay them per time unit for risking that stake, and storing the secret, they have to prove they have the document.(as the dropbox example does) They lose the stake and the deal if someone else proves it instead too early. They also lose it if your friends/family do <i>not</i> prove they have the document after the dead man switch. The latter is to try ensure release of the documents. Of course there would be some incentive, like part of the inheritance to do the latter.
  • croll83croll83 Member Posts: 1
    I was thinking about this possibility, but I don't know if is possible to implement with ethereum.
    create a contract that:
    1) Store
    - a Bitcoin address PK
    - several email addresses
    - a message
    2) been stimulated by some 'user action', like send a message with msg.sender == OWNER that is
    - periodical, every Y time
    - the OWNER is a know and defined address
    3) if no message received after N cycle of Y time, then send email, message and PK to stored email addresses.

    Can you help me to build this contract? Is possible to do so with ethereum?

    Thank you,

  • mimarobmimarob Member Posts: 33
    Currently I don't think you can store a bitcoin private (do you mean private key by PK?) without having it readable by all, but check on the Craig Gentry article about some recent breakthroughs
Sign In or Register to comment.