Smart Contracts in Jura Protocol

Smart contracts are very popular nowadays but what are they and what problems do they solve?

The term smart contract was first used by Nick Szabo in 1997 long before Bitcoin was created. He is a computer scientist, law scholar and a cryptographer, but in simple terms he wanted to use a distributed ledger to store contracts. Now smart contracts are just like contracts in the real world. The only difference is that they are completely digital. In fact a smart contract is actually a tiny computer program that is stored inside of a blockchain.

Let’s take a look at an example to understand how smart contracts work. Everyone is familiar with kickstarter. The large fundraising platform. Product teams can go to Kickstarter create a project set a funding goal and start collecting money from others who believe in the idea. Kickstarter is essentially a third party that sits in between product teams and supporters.

This means that both of them need to trust Kickstarter to handle their money correctly. If the project gets successfully funded, then the project team expects Kickstarter to give them their money. On the other hand supporters want their money to go to the project, if it was funded or to get a refund when it hasn’t reached its goals. In both the cases, product team and its supporters have to trust Kickstarter.

But with smart contracts we can build a similar system that doesn’t require a third party like Kickstarter!

So let’s create a smart contract for this. We can program the smart contract so that it holds all the received funds until a certain goal is reached. The supporters of a project can now transfer their money to the smart contract. If the project gets fully funded the contract automatically passes the money to the creator of the project and if the project fails to meet these goals then the money automatically goes back to the supporters. Pretty awesome right? And because smart contracts are stored inside a blockchain, everything is completely distributed. With this technique, no one is in control of the money.

But why should we trust the smart contract? Well because smart contracts are stored on a blockchain, they are immutable and distributed. Being immutable means that once a smart contract is created, it can never be changed again. So no one can go behind your back and tamper with the code of your contract, and being distributed means that the output of your contract is validated by everyone on the network. So a single person cannot force the contract to release the funds because other people in a network will spot this attempt and mark it as invalid.

Smart contracts can be applied to many different things not just on crowdfunding. Banks for example could use it to issue loans or to offer automatic payments. Insurance companies could use it to process certain claims and post the companies could use it for payment on delivery and so on and so on. So now you might wonder where and how can I use smart contracts? Well right now there are a handful of blockchain projects who support smart contracts.

In Jura, the smart contract implementation is easy and natural. Like I mentioned before, users using the Jura platform can create smart contracts to define transactions terms, save themselves from fraud or make sure the money transfer is transparent. Unlike other DAG structures, the smart contract implementation in Jura is ordered and the response time is fast which makes the smart contract implementation much more powerful.