What are smart contracts?

October 27, 2017
OpenLedger DEX

 

Intro

Smart contracts are software programs, lines of code, that work on blockchain technology. In its essence smart contract is a “If-This-Then-That” function, meaning if something happens on a smart contract it triggers something else. You can think of it as a line of dominoes, once you push over the first one all of the others start falling over.

One perfect illustration for “If-This-Then-That” function is the good old vending machine. If you put some money in the machine and choose a product it makes the machine release the chosen product. If you don’t put enough money in the machine, then the machine won’t release the product. This is the simplified concept behind smart contracts.

Concept

Smart contracts are programs that trigger certain actions once they are acted upon, or not. This idea is nothing new, we have had contracts for a long time and automation is also nothing revolutionary. But smart contracts tie together contracts, automation and the security of the blockchain.

With regular contracts you have to rely on third-parties in order for them to work. For example, when transferring money, you have to trust that the bank does in fact send the money, you also have to trust that the bank doesn’t randomly take your money away from your account. With documents you have to trust a lawyer or a notary to validate them. And you have to trust that a record keeping company won’t get hacked and your private information isn’t stolen.

With the integration of blockchain technology, smart contracts eliminate the need for having third-parties. Instead of one central server that holds the data and contracts, there are a lot of computers around the world, which all hold and validate data. This data is put into blocks and these blocks are stored in a chronological order, creating the blockchain. Once a block is added to the blockchain it is there permanently and unalterably. These blocks are also completely public and transparent, meaning every participant can validate the data inside them.

With removing the middlemen from the equation we eliminate the need of having to rely on trust. In addition, when middlemen are cut out from the equation, the cost of creating a contract decreases and the possibility of having your information or money stolen greatly decreases.

Benefits of smart contracts

  • Automation, trust, speed – since no third parties are involved, the processes are acted upon faster. The information doesn’t have to go through different people, who all want to do a lot of paperwork, which takes a lot of time.
  • Backup – the fact that all of the information and contracts are stored not in a centralized server that could crash, but in a network of computers it makes it impossible to lose your data. When one of the computers crashes, nothing happens to the contract, because it is still stored in all of the other computers.
  • Security – the information about the contract is held on the blockchain. If a hacker wants to modify the data presented in the contract he would have to hack all of the computers in the network at the same time.
  • Low cost – there are no middlemen who charge a lot of money for their services and no expensive centralized servers which have to be built.
  • Precision – the contracts are validated by computers, who don’t make human errors.

To illustrate how smart contracts can be used in the real world, let’s use an example.

Imagine you want to send your friend Jake a cake for his birthday, but you want to be absolutely sure that during the delivery process no-one eats the delicious cake. Traditionally you would have to rely on trust and hope that the delivery company’s employees are well-fed and won’t eat the cake.

But with the new technology you can create a smart contract and send the money for the delivery to that contract. This contract is broadcast to the network of computers, which confirm that the transaction has been made and the delivery company is notified. The delivery company makes the delivery and Jake signs the contract, confirming that the cake has been received without having any bites taken out of it. This signature releases the payment you made and is sent to the delivery company.

This example shows how smart contracts motivate both parties to deliver on their end, without having to rely on blind trust, while also making the process faster, cheaper and more secure.

Uses for smart contracts

One of the things that would greatly benefit from the use of smart contracts is voting. Governments can create a smart contract, so that instead of waiting in lines to cast their vote, citizens can cast their vote on the phone or on the computer. All of the voters are given an ID which isn’t related to their true identity, keeping them anonymous. They can then cast their vote to the contract and the network behind the smart contract confirms that the person hasn’t voted before. This would drastically decrease the likelihood of fraud, while also making voting more popular amongst people, because it only takes a few taps on the screen to cast your vote.

Another thing that can be improved upon is record keeping. You can store your personal information in a smart contract and you can choose who has the access to this information. For example, you can store your medical record in a smart contract and give your doctor the access to your record. Without your permission the doctor can’t forward the access to your medical records to anyone else. This eliminates the chance of having your personal information misused.

And also there is banking. Like we talked before, currently you have to trust your money to a bank. You have to hope that it doesn’t steal your money, that the transactions you make do in fact reach the right person and that the bank’s servers don’t get hacked.

Instead of that people can move their account’s information to the blockchain. Everyone on the network has the ability to see how much money an account has, but at the same time all of the other information is kept anonymous, keeping their identity safe. When making a transaction all of the computers on the blockchain validate whether the account has enough funds to make this payment. Once confirmed the transaction is made and the blockchain is updated.

When Bob who has 100€ on his balance wants to send 25€ to Judy, the transaction is broadcast to the network. All of the computers in the network check whether Bob has enough money to send. Once it is confirmed the money is sent to Judy and the information is updated. Now Bob has 75€ on his balance and Judy has 25€ more than before. Once the information is updated it can’t be updated. In this process there are no banks involved, all of the validation is done by the network. In order for someone to steal your money the thief has to hack all of the computers in the network.

These are just some examples where the use of smart contracts has a great advantage over the traditional system.

Conclusion

In short, smart contracts are contracts that are stored on the blockchain instead of a central database. This makes the contracts more reliable, secure and transparent. It also eliminates middlemen from the equation, who could alter and manipulate the information in the contract and above that charge high fees for their services. Smart contracts create an automated system, which is faster and doesn’t make human errors.

Related News

4 reasons to get involved in a referral program August 16, 2019
Maintenance works are finished August 09, 2019

Leave a Reply

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