0

Basic question on distributed Smart contract. Let us assume , I am writing a smart contract and deploying it in public network.

My Contract Specification
•   My contract would allow anyone to register. 
•   Fund 10 Ether to the contract 
•   Contract will in turn return 12 Ether on Dec 31st 2017

Contract owner by mistake instead of capping it to Dec 31st , he mentioned Jan 31st in the contract.

Scenario :

•   Owner A sits in USA, deploys the contract in public chain 
•   User B from Australia funds 10 ether to the contract on August 31st, 2017
•   User B now expects 12 Ether on Dec 31st but he never receives it .

Question

Even though the contract is distributed among all the nodes, 
1.  How would user B come to know what is written in the contract ( assuming B has zero coding knowledge) ?
2.  If only User B is interested in this contract, who will verify this smart contract 
0

The smart contract once deployed on Ethereum is public and can be viewed. One would have to know what they're signing up for by reviewing the smart contract (There is no other way out).

| improve this answer | |
  • Thank you , Aren't we deploying the Byte code. How one can see the contract ? Can you point me to any contract which are open to everyone – sun Aug 24 '17 at 7:25
  • Yes it is deployed as byte code. But on blockchain browser like etherscan.io you can even browse the code. An example is here: etherscan.io/address/… – roynalnaruto Aug 24 '17 at 8:15
  • 1
    The 'source code' is only available if someone publishes it to Etherscan and it verifies. This is optional on the contract publisher's part. I require it from every smart contract I interact with, or I simply don't interact with that contract. – Thomas Jay Rush Aug 25 '17 at 15:54
1

If I'm user B I'd request to user A the source code of the contract, and all the instructions required to verify the bytecode generated matches the source code. If I know nothing about smart contracts I should request help from someone with knowledge of them.

As it happens in real life, if you want to sign a contract you make someone you trust review them. It obviously depends on the contract, for a more serious contract you might want to a professional, for a more simple contract you can ask in the internet.

| improve this answer | |
0

You can verify and the publish the code on etherscan.io . After that then anyone who goes to that contract address will know what the code is.

| improve this answer | |

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.