Smilo explained — Public and private smart contracts + demo!

Smilo Cooperative
6 min readOct 25, 2018

In this article of Smilo explained we are going to elaborate on the difference between public and private smart contracts. Furthermore, we will also elaborate on the new possibilities provided by the combination of both public and private smart contracts as well as showing a demo of private smart contract in action!

What is a smart contract?

Smart contracts are the simplest form of decentralised automation. A smart contract is a program running on top of the blockchain containing a set of rules under which the parties to that smart contract agree to interact with each other. If and when the pre-defined rules are met, the agreement will automatically be enforced.

This way, smart contracts help exchange data, money, property, shares, or anything of value in a transparent and conflict-free way while avoiding the interference of any middleman.

Public smart contracts

Most of today’s blockchain platforms are capable of executing public smart contracts, meaning that every bit of data contained in this smart contract is openly available to the whole network as shown in the picture below.

While this is great news for many different use cases, which require transparency, it can be a big hindrance for use cases which require a particular form of privacy. To be able to solve this important lack of connecting both privacy and transparency aspects of transactions, Smilo Platform was designed specifically to integrate both public and private smart contracts and transactions onto one joint blockchain platform, being the first in the market to be able to offer this service to both public and private organisations.

Private smart contracts

A fairly unknown alternative to public smart contracts are private smart contracts. Private smart contracts are content wise identical to public smart contracts, with one major exception that the contents of private smart contracts cannot be accessed, examined or executed by anyone else than the proprietor of that contract, unless access is granted by the proprietor.

As shown in the picture above, the private smart contract is given the ‘private’ state, the code is visible to everyone, though the transactions and contract details are hidden and only visible for those the proprietor grants access to.

As a result of private smart contracts, new use cases have emerged. Various organisations, governments, and businesses will finally be able to implement blockchain technology without completely abandoning privacy.

At Smilo, an idea doesn’t stays ‘only an idea’ for long, our private smart contracts feature is already operational as can be seen in the demo video’s below;

Demo 1

In the first demo we are using a DApp to show how a Smilo private smart contract works.

Demo 2

In this second demo we show the operation as per backend code. We use a network setup of 7 nodes. To simplify, the video only shows 3 nodes, the top screen (node 0), the middle screen (node 3) and the bottom screen (node 6). Node 0 is creating a private smart contract granting access to node 6. Node 0 and 6 can see the transaction, node 3 can only see the code, not the details of the transaction. Also when we change the content, only node 0 and node 6 can see the changed value.

Public versus private smart contracts

After reading this information, you may ask yourself ‘which kind of smart contract is better, the public smart contract or the private smart contract?’ Well, the answer will be somewhere in the middle, and depends greatly on the use case.

Public smart contracts are great for use cases, such as the internet of things, supply chains, gaming and authorship. These will benefit greatly from the advantages of public smart contracts, such as transparency, and trust.

On the other hand, private smart contracts are great for use cases, like insurances, and medical health records. These applications benefit greatly from the advantages of private smart contracts in terms of privacy and thus security.

As both have their clear differences and advantages, why not combining both public and private smart contracts in an all in one solution? That’s where the Smilo platform comes into play. Smilo will provide the user with both public and private smart contracts on one single blockchain.

Combining public & private

One of the best features of the Smilo platform is the hybrid smart contract functionality. This functionality features a combination of both public and private smart contracts on one single blockchain. Traditional blockchain platforms like X and Y provide their users with the ability to use either public or private smart contracts. Meanwhile, the Smilo platform will provide developers with the means to combine both public and private contracts on one and the same chain.

This combination of public and private smart contracts will enable various businesses and other organisations to adopt blockchain technology, as this technology enables them to be more transparent while keeping private data secure and private.

A few examples of use cases are mentioned below.

The medical sector
The medical sector processes millions of patients’ records every day. These records are confidential and not intended to be public, but leaks due to human failure unfortunately do occur. With the Smilo platform, it is possible for the patient to host his medical records on the blockchain. By doing so, only the patient with the private key can access the records. The patient can choose to use a smart contract to give permission to others, such as a doctor or hospital, to view selected sections of the record for a period of time.

The social funding sector

In the social funding sector, transparency and trust are important. Let’s take a charity organisation, for example: A benefactor may want to support a charity but doesn’t wants to show this choice to the world. As the Smilo platform offers the option to make transactions private, the benefactor can choose to make an anonymous donation. To offer transparency, the charity organisation chooses a public smart contract, which offer insights to ensure the public that the funds are being used as agreed.

Be part of the Smilo hybrid blockchain movement!

Join our Telegram, Twitter and follow us on other social media for the latest updates! Medium | LinkedIn | Facebook | Reddit

For more information about the Smilo Platform check out our;
Website | Video | Whitepaper | Onepager | Whitelist

Our partners,

Our resource partners,

--

--

Smilo Cooperative

The latest generation hybrid blockchain platform DAO Cooperative