4
votes

I am new to Smart Contracts. When I saw some example of Smart Contracts, I realize that they are just some piece of code, not exactly contracts.

For example function sendCoin(address receiver, uint amount) is a method defined in smart contract which takes receiver address and amount to send Coins to receiver.

But the contract is not about how to send coins, but how much to send. For Example, if the material is delivered on time, make full payment else charge penalty of 10% for every week's delay.

As per my understanding, the invocation - where these if-then rules are written (Representing contract) - is outside smart contract.

Is my understanding correct? Is the term 'Smart Contract' misleading?

Are real contracts are still coded outside the block-chain in application triggering these functions? If yes, then why smart contracts can't be manipulated, the applications can still compromise the contract - For Example. by not paying as per contract terms.

3

3 Answers

3
votes

I'm not a lawyer, but yes, I believe you are in general correct. "Smart contracts" in the Ethereum sense don't replace legal contracts, at least not in any jurisdiction I'm aware of, as a purely legal issue. If you want to contract with someone, you're still going to want to go to a real meatspace lawyer and sign a real meatspace contract.

From a purely technical perspective, even if you were to try and define a meatspace contract solely in terms of an Ethereum contract, you would run into the difficulty that an Ethereum contract can only act on information that is on the blockchain. For a simple example, let's say you wanted to enter the simplest possible flood insurance contract, where you pay some amount up front, and if there is a flood anywhere in your ZIP code in the next 10 years, you can make a claim and get $x. This leaves aside all the messy details of what exactly got damaged and so on, but we still need some means to determine if there was a flood or not.

You might say "But that's easy! Surely the government publishes such data, and we can simple specify in the contract that we believe the government's data and no-one else's." OK, so the government does publish the data, but they don't publish it on the Ethereum block chain.

"Oh, well we can just publish the data to the blockchain. Easy!" Who's "we"? Whoever you trust to publish the government data can essentially settle your bet any way they want. The insurance company isn't going to let it be you, because you can just publish a "yes, there's a flood" message immediately and get free money. Likewise, you don't want to trust them to do it, because if there ever is a flood, they can essentially just deny your claim in the same way.

So, you'll need a third party "oracle", as they are known. There are various strategies here that involve multiple oracles and different incentive structures that try to get these oracles to play nice, or at least in the way you and the insurance company want them to. Fundamentally though, you've just reinvented the court system, or perhaps arbitration: If you and the insurance company ever disagree about something, you will have no recourse other than to plead your case to the oracles, and ask them to rule in your favor.

Now, we've already established that both you and the insurance company trust the government (NOAA or whoever) to make this call. If that's the case, you've already chosen an oracle: the government. If you can somehow convince NOAA to issue their reports directly to the blockchain, or even with some kind of private-key signature that can be verified on the blockchain, then you've solved the problem. In the real world, almost no trusted "oracles" like government agencies do this, at least not yet.

1
votes

Smart Contract is just a piece of code which is executed on the blockchain. What you will be seeing are some functions, and the developer who developed the code would have written logic inside the functions.

Most of the Smart Contracts are published on some repositories for the fairness of the code logic and you can see the code too.

Smart Contracts cannot be manipulated as once its written it stays in blockchain and due to the property of blockchain the data can not be changed until and unless the hackers got 51% of network access.

0
votes

Once data has been written to a blockchain no one, not even a system administrator, can change it. This provides benefits for audit. As a provider of data you can prove that your data hasn’t been altered, and as a recipient of data, you can be sure that the data hasn’t been altered. These benefits are useful for databases of financial transactions. Immutability is relative. For example, if I send an email to a large list of friends, that data is pretty immutable from my perspective. To change it, I’d have to persuade my friends each to delete the email (or persuade Gmail and the people running all the mail servers of my friends). From my perspective, and with the control I have, that email is immutable – I can’t unsend or revoke it without collaboration and risk of detection. So immutability is relative and relates to how hard something is to change.