[feature-request] Please introduce an (optional) contract expiration time/date

Reason:
so that Ethers won't stuck forever in poorly-written contracts.
On contract expiration, it should return the money to investors (Alice and Bob), proportionally.
example of bad contract would be betting on MtGox BTC price (because it went bankrupt)
===
It will allow releasing funds trapped in stale contracts, to prevent currency loss.

Currency supply should be approximately stable.

-Technologov, 05.03.2014

Comments

  • chris613chris613 Member Posts: 93 ✭✭
    As someone who has already produced dozens of "poorly-written contracts" this sounds like a good idea! :) I don't think it will end up being a core feature of ethereum itself, though, because someone will simply write a library for this sort of expiry that you can use in your own contract (hopefully it is not poorly-written as well!). Buggy contracts do seem really scary, though; that's why I'm working on an update system that should be re-usable with other contract code given some minor constraints.
  • mids106mids106 Member Posts: 188 ✭✭✭
    edited March 2014
    Support for this already exists in Ethereum out of the box, contracts just have to implement it using `block.timestamp` and `suicide`:
    if block.timestamp > 1425513600:
    suicide(CREATOR)
  • comtechnetcomtechnet Member Posts: 57
    @mids106 @dr_pra? There should be a contract profile - where these generalized parms, (T & C (terms and conditions) if you will) - are easily and quickly view-able - like the shelf life, in this case expiration date, etc.
  • dr_pradr_pra Member Posts: 445 ✭✭✭
    That would require some kind of standardized metadata fields for each contract. Extracting such information from the raw EVM code is not really a robust way. Nevertheless one still needs to trust (or verify by decompiling the EVM code) that what the contract author claims in the metadata is really the case.
  • mimarobmimarob Member Posts: 33
    suicide is a useful instruction, although it does not auto-destruct, it needs a transaction from dr Kevorkian :-)

    What happens to the ethers? next-of-kin?
  • mimarobmimarob Member Posts: 33
    For the meta data, a persistent url and a checksum in the EVM code would suffice as long as someone has an incitament to keep the external data live.
  • TechnologovTechnologov Member Posts: 102 ✭✭
    Having it as a standard feature makes sense IMO
Sign In or Register to comment.