What is Smart Contract?

June 28, 2018
keya

Much like the words “blockchain”, “AI” and “cloud”, “smart contract” is one of those phrases that get a lot of hype. After all, what can be better than being able to trust what will happen instead of using the judicial system? The promises of smart contracts include:
Enforcing contracts automatically, trustless and impartially
Taking out the middlemen in contract construction, contract execution, and contract enforcement
(By implication) Removing lawyers

What is a Smart Contract?

A normal contract is an agreement between two or more parties that binds them to something in the future. For example – Vending machine. It’s a “stupid” machine that does what it’s told and executes things automatically. It’s been around for decades!

Smart Contract | Nascenia

Let’s pretend one afternoon you find yourself in front of this machine. It says: “If you give me $2.50, and press this button, you will get a Diet Coke.”

It might not actually say those words anywhere. But that’s the promise of this little interaction. One might even call this a kind of simple agreement. (You can guess where this is going.)

You feed in the money. Press the button. Presto! You got the bottle in your hand.

Well, you didn’t notice, but this whole thing was actually a small program(“contract”) coded(“written”) into the machine beforehand that ran when you hit the button(“signed off on it”). Something like:

> if money received == $2.50

>    && the button pressed is “Diet Coke”

> then release Diet__Coke

Computer code, as you see, is kind of like a contract. It’s making statements and declarations. There are terms (if you do this…then…). And just like someone you trust — it even fulfills its end of the bargain!

Voila. Contracts are just code. But unlike a “contract” in English, this is something both humans and machines can read. Extra fun!

A smart contract is a contract that can be executed automatically on a computer system when certain conditions are met.

Ok, but…

Now you’re more confused about this smart contract business. As we said, this is nothing special. In fact, as the vending machine demonstrates, this kind of code is already everywhere in our daily lives. If a smart contract is just “if…then” code (or any code for that matter), then what’s the hoopla? What’s actually new?

 

Vending Machines 2.0

One sunny day, you spot a vending machine sitting on the corner. You’ve never seen this one before!

You walk over and take a look. This machine says: “If you put in $1,000 this machine will give you $5,000.”

Whoa! Whoever put this machine together must be very rich and generous.(Or insanely stupid…). Either way. 1k for 5k? No brainer — that’s a deal you’ll take any day! Right?

This is exactly like our good old Diet Coke machine. Same logic. Same if-then process.

Except now the stakes are different. You reach for your pocket but suddenly, you feel hesitant. Who the hell put this machine together anyway? And what if it eats your money? $1,000 isn’t a small amount — you were saving that for months. You didn’t think twice about that Diet Coke. But now? Now you realize that maybe vending machines aren’t that simple.

You start thinking about trust.

How do we know it has enough funds to spit out the promised $5,000?

How do we know the code is going to run?

Is there any way to publicly and transparently verify this code?

Conclusion

The $5,000 vending machine is an extreme, theoretical example but it does hint at the problem with scaling trust. In an expanding, digital world where people can connect anonymously — trust becomes a tricky thing. We usually rely on third-parties and other middlemen for that reason. We have to. Especially if we’re moving things way more valuable than Diet Cokes. You know, like newfangled financial stuff. Or the very idea of “value” and “ownership” itself.

Contributor:  Khalid MahmodNascenia

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.