Joel Dietz and Joris Bontje show how you can implement a marriage smart contract (with divorce clause) for Ethereum.
Name inspired by Eddie Murphy:
Contract created by Dutch Ethereum User Group:
- Yves Candel
- Nick Savers
- Joris Bontje
CLL source code:
https://github.com/jorisbontje/cll-sim/blob/master/examples/i_want_half.cllSimulation code:
https://github.com/jorisbontje/cll-sim/blob/master/examples/i_want_half.pyJoel Dietz -
https://twitter.com/fractasticalJoris Bontje -
https://twitter.com/mids106
Comments
Stupid python question: why does `MarriageRun` need to adress `self.something` all the time, whereas `Marriage` can just access the members?
Also, i notice earlier you used `stop(message)` to note that the correct exit points where reached in the test. It is a bit more stringent to also require correct exit points. Probably doesnt matter much in this case.
Proceeding with taking it too seriously: note that presumably it isnt intended to be filled with a lot at the initial proposal, as there is no way to extract before marriage. But emotional/cultural reasons would cause people to actually put a lot in.
I have some mixed feelings about this... It would be better if you can load the CLL directly from an external file and use the actual CLL syntax 100%
As for extending the contract to deal with value extraction before marriage... send a pull request!
About that pull request.. Well the thing is these are 'examples' and you make youtube videos about it. Maybe have a second directory where the 'for actual use'(no warrantee) scripts live. Each script could also have a directory with a readme.md, and maybe some other related things that way..
It can become a bit more complex than a simple contract and that is it. For instance the dropbox example requires off-blockchain software to figure out what `tx.data` is correct. The serving-and-viewing data idea(that works on the cll-simulator, but i added `block.parenthash`, `block.number`) requires a ..server of some sort, it needs to check that the script is of the right kind, has enough balance, and it may want a black list.
As for dealing with people depositing money into the contract before it is "ready", how would you suggest handling it? Our initial reasoning when creating this contract was; people just shouldn't be depositing into it before it is "ready" (state = MARRIED); which can be enforced client side. But I now realize that you (and others) might try to model some kind of real world marriage scenario (wedding gifts?) that were not part of our initial envisioned use case. I am interesting to hear your solution! Either as a forum comment or as a pull request
Of course all features that a 'wealth safety contract', that are not particular to marriage, like multisig-retrieval and limited-rate extraction of ether in case of lost/stolen key.
One related to marriage is when divorced, or multisig is used(for instance if one of the two dies), anyone can use the contract. This way you can use your great-grandfather marriage contract.
Basically, it is important to me that such a thing is not susceptible to any outside party who could collude to accentuate conflict and delay processes and therefore drain a family of their entire savings. This is why I want to establish my own marriage contract to refer to the following cases:
- *Timestamping the marriage (wedding!)
- Naming my spouse as beneficiary of my estate and vice versa
- Naming my spouse as sole executor of my living will (medical decisions) and vice versa
- *Requiring both spouses signature to make changes (i.e.: addition of third spouse to family!)
- *Both parties must provide 'proof-of-happily-married' at regular intervals for the marriage to remain active.
ELSE
- Separation of property and custody of feline children
- *Separation of crypto-currency (not necessarily Ether).
This is the 'minimal viable product' of my marriage contract! The * refer to programmable events and the rest I am not sure if I can encode into a blockchain but I really want to. The interesting thing is that in Quebec, we are already considered married because we live together and also have access to French Law (notaries) to fill in the gaps.
I am writing this here because there is sincerely nobody in my entourage who would understand why and how this works LOL
Who else is getting married in the blockchain soon?
Marie-Lynn
http://bitcoinmagazine.com/16771/couple-get-married-bitcoin-blockchain-disney-bitcoin-conference/
Is there anyone that could support us in doing this, to make sure we do it the right way?
Warm regards,
Alistair
how could I temporarily (with plausible deniability) tie up my net worth in some smart contract so that for all intents and purposes I have no money? And mortgage contracts, who can hold a mortgage contract over me, keeping me totally insolvent? So even if a claim "for half" was lodged, there would be nothing to have, because, the smart contract has made me broke! Of course i'm talking about divorce. I like the idea of playing a "Ethereum Lottery" to get my net worth back, with a guaranteed win that I can chose to cash out or not.
Disclaimer: I am not an attorney.