blockchainethereumsmartcontractscontract

Smart Contracts - Where is contract in it?


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.


Solution

  • 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.