Since a contract can be killed by its author, does he have all the power? Do I need to trust him?

Right now I'm watching this video ( and just learned that a ethereum contract can be killed by its author (starting at 30:50)). But doesn't that mean that he has in a way full control over it? Lets say I make a smart property dapp, and a lot if people manage their property with this dapp. Then I sell my property, get the reward (bitcoin or whatever) and then I decide to destroy that information by killing the dapp. This would mean I totally need to trust the author of the dapp to not kill it. Is that right? Or am I getting something wrong?

Comments

  • vaXvaX Austin, TXMember Posts: 78 ✭✭✭

    ..am I getting something wrong?

    If YOU are inD33D "The Δuthor" ov an ☰thereum ÐΔPP that: "a lot of people manage their property with" ..and YOU choose to FVCK TH☰M - YOU eϟϟentially fvcked yourcellf.

    In ☰thereum, one has fool KINtroll over themcellves. RE:putaZ☰N trvmps reVVard.
  • JasperJasper Eindhoven, the NetherlandsMember Posts: 514 ✭✭✭
    Contracts can only delete themselves. If the code allows the author to delete it then .. (s)he can. Basically at the beginning of a contract it could say:
    (when (and (= (caller) OWNER) (= (calldataload 0) "suicide"))
    (suicide OWNER))
    And that would allow OWNER to suicide the contract.

    Basically in order to trust a contract you need to trust the code, and who/whatever that code implies you need to trust. The above basically means you totally trust who/whatever controls the OWNER address. The contract code needs to be well-inspected. You possibly wouldnt do that yourself, probably people would do it and talk about it, keep lists indicating how well, written, tested, reviewed things are.
  • ChrJentzschChrJentzsch Member Posts: 17
    Can I read the code of a contract that I intent to use only by querying the blockchain? Or in other words, is every ethereum contract code publicly visible?
  • vaXvaX Austin, TXMember Posts: 78 ✭✭✭
    Jasper said:

    The contract code needs to be well-inspected. You possibly wouldnt do that yourself, probably people would do it and talk about it, keep lists indicating how well, written, tested, reviewed things are.

    ..in short, the ÐΔO (or ÐΔC) keeps $hit in check.
  • ChrJentzschChrJentzsch Member Posts: 17
    That does not answer my question. Can I (not a DAO) get access to the code only by querying the puplic blockchain?
  • JasperJasper Eindhoven, the NetherlandsMember Posts: 514 ✭✭✭
    Yes, all contract code is visible on the blockchain, although it is bytecode.(of a stack machine) If the source code can be found elsewhere, you can check that it indeed compiles to the contract, and check it is well tested. In order to trust a contract, you basically have to demand that it is well documented and tested.
  • vaXvaX Austin, TXMember Posts: 78 ✭✭✭

    That does not answer my question. Can I (not a DAO) get access to the code only by querying the puplic blockchain?

    That wasn't intended to answer your question.
  • ChrJentzschChrJentzsch Member Posts: 17
    @Jasper Thanks. In order for a ethereum contract to be trustworthy, the author should publicate the source code. This code can be compiled and checked against thy bytecode in the blockchain, in order to verify that the source code does correspond to contract. Got it. So important long term contracts should not have a suicide option.
Sign In or Register to comment.