2

One of the benefits commonly associated with Ethereum is that it allows end-users to interact directly with smart contracts and thereby removing the need for trusted-third-parties.

In cases where:

  • the source of the smart contract is published, and
  • the contract running at an address can be securely traced to that source, and
  • the end-user is able and willing to audit the code before interacting with it

then the end-user can establish trust (or perhaps, rather, confidence) that the contract complies with expected behavior.

The reality is, however, that in most cases at least one of the above conditions will fail, and therefore the end-user will blindly interact with a contract they do not understand. And the odds are that for every well-intended contract there will be one that is either intentionally, or unintentionally malicious.

How is this solved without introducing yet another trusted-third-party that acts as a quality auditor?

  • The source of the contract must not be published. You can disassemble the EVM code and study it, so you need only case three. – Roland Kofler Jun 3 '16 at 15:06
  • Publishing the contract's source is the choice of the contract originator. Clearly in the event that the originator chooses not to, then the third condition will be even less likely. – zanzu Jun 3 '16 at 15:08
  • Less likely but not impossible. And contracts with no source code will be less trusted a lot. So it will become practice anyway to publish it. – Roland Kofler Jun 3 '16 at 15:09
  • Right. The point though is that for every Solidity expert out there, there will be several more individuals that won't have a clue what they're reading if they see the source. Even if through some miracle everyone that can read becomes capable of inspecting Solidity code, the odds are that users will not be any more inclined to audit Solidity code any more than they inspect T&Cs associated with most services we use. In the traditional world, most users choose to blindly trust the service provider as more often than not they're dealing with a known brand, rather than some anonymous coder. – zanzu Jun 3 '16 at 15:15
  • Yes 'brand reputation at stake' and 'state force monopoly' are the reasons you as a consumer know you can risk it With smart contracts it is an expansion of the open source security model It is a coordination game: I could cheat, but I could easily be discovered too. The consumers of smart contract will use risk/reward heuristics, and the most popular contracts will be examined by voluntary security experts, that want to have a reputation. The huge amount of TheDAO pull requests this weeks proves this ;-) – Roland Kofler Jun 3 '16 at 15:23
3

Smart contract security is an antifragile system: it gets better each time someone gets hurt. Some people will learn how to cope with security in this environment the hard way.
You are absolutely right that it will not be each single contract user to audit the code. It will be a community effort and practices and institutions will evolve.

Why not having an insurance against malicious executions?

2

In addition to Roland's response, I thought it'd be worth adding one further point that came out of the conversation attached to the question above (for those who prefer not to read the whole thread):

Given the condition that the identity of the contract originator can be securely linked to the contract address, then over time end-users may (rightly, or wrongly) choose to trust a contract without code inspection based on prior experience in interacting with contracts from the same originator. In this case trust is built directly between users and originators without the need for a trusted-third-party.

0

Porosity Decompiler can allow you to read the code if source is not posted, and contract bytecode can always be pulled off the blockchain. Anyone reputable should post the source code anyway, as all states are public.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.