Explain Smart Contracts Like I'm 5 (using Examples)

Explain Smart Contracts Like I'm 5 (using Examples)

Smart Contracts can help us return trust in our institutions, companies, and organizations. They also eliminate misinterpretations of agreements, reduce legal fees, help to create decentralized governance, and can be completely transparent. But how do they work? In this article, we are going to explain the idea behind smart contracts to non-technical people.

How do you explain what smart contracts are to a non-technical person? The shortest possible definition of the smart contract is "an algorithm that is running on the Blockchain." The concept itself is pretty simple but requires an understanding of Blockchain technology. In this article, I will try to explain what Smart Contracts are even for people who don't want to take a full dive into the topic and learn how Blockchain works.

But if you really want to have a deep understanding of Smart Contracts, you would have to understand the Blockchain technology too, because Smart Contracts basically just inherit all the features of the Blockchain. If you are ready to invest a little bit more time, I suggest you also check our article about the Blockchain too. Understanding blockchain technology makes it really simple to understand the Smart Contracts and other terms that are based on Blockchain technology like NFTs, Decentralized Autonomous Organization (DAO), etc.

When I have to explain complex concepts like that, I really love to use real-world examples of processes and businesses that we already deal with in our daily lives. Then I'm going to show how Smart Contracts, if they are added to familiar to us processes, can improve and revolutionalize them. A couple of great examples to explain Smart Contracts will be such topics as online purchases, charity, elections and voting, and insurance.

Example #1: Online Purchases.

If we store some data on the Blockchain, it's redistributed across thousands and sometimes even millions of machines. There is no one central entity that controls the data, similar to how many users on the Internet may have a copy of the same video. Millions of users have a copy of the video, and to remove or alter the video, the user will have to remove or alter this video on every machine in the network. And that is virtually impossible. That's why it's impossible to corrupt the data stored on the Blockchain.

The same happens with any algorithm that we put on the Blockchain. As soon as the algorithm is stored on the Blockchain, it can't be modified or removed. Now, why is it even important?

Imagine you finally found some rare item on the Internet that you have been searching for for a really long time. And the price is great! But unfortunately, the seller lives in an area of the world well known for its fraudulent activities and moreover doesn't have any ratings and reviews! The seller agrees to return money in 30 days if you don't like the product, but how can you be sure that they won't just disappear after the purchase? Can you trust the seller?

In most cases, the answer is NO. But assuming we have a smart contract for the purchase, you don't have to trust the seller! You don't need reviews or ratings. You just know that there is no way to trick the system.

Let's say we have a smart contract that saves your money in some intermediary account (like an escrow), and neither you nor the seller has access to this account. When you receive the item and review it, you can approve or decline the item, and the money will either go to the seller's account if you approve the item or go back to your account if you decide to return the item. Obviously, we will also need some way to prove to the algorithm that you actually returned the item in case of decline (for example, it can use post office API to access the delivery information). And in case you forgot to approve/decline the item, the money will be automatically released 30 days after the purchase.

Because the algorithm that does the job is stored on the Blockchain, there is no way for you, the seller, or anyone else to alter the algorithm! Nobody controls it, and it can't be corrupted. And it means that the agreement can't be broken by any side of the deal.

But can the same be done without the smart contract? Yes and no. Yes, because you can use some intermediary centralized escrow service to ensure that the deal goes through as expected. No, because it will lose a couple of significant features of the decentralized approach with the smart contract. Like any centralized service, they would charge a significant fee. They will be responsible for settling disputes if something goes wrong, and you would have to rely on their processes and goodwill instead of the unambiguous result that the smart contracts provide. Their service also needs to work with the country the seller is from. And you will also have to trust the reviews and ratings of other people who have already used their service to ensure that they will do the job and ensure that you can trust them. And as we know, reviews can be bought.

Smart contracts don't have all these disadvantages! But let me explain next how exactly those disadvantages are fixed in smart contracts.

Transparency, no misinterpretations, reusability, cheaper, and faster.

Transparent. In most cases, smart contracts code is available to the general public. It's open-source and can be reviewed by anyone. The brightest minds from all over the world can review the algorithms and propose their improvements, ideas, and new features. Bugs and mistakes can be quickly identified, and nefarious code can be exposed. Users get full transparency of what exactly is going on when they use smart contracts.

In the example with the purchase described before, the smart contract behaves like a real-world contract between the buyer and the seller. That's why they called "smart contracts." Later in this article, I will show a couple of examples when they actually can be used in entirely different non-legal scenarios (like providing fair and incorruptible elections).

No misinterpretations. But contrary to real-world contracts, there is no room for misinterpretations with smart contracts. Different lawyers can read the same agreement differently, and different judges can come up with different conclusions. With smart contracts, you get predictable and expected results 10 out of 10 times. You get exactly what you see. There is no way to corrupt it or modify its behavior. And anyone can review them before "signing the agreement." With the help of specialized software, you can test all possible inputs and see every possible outcome of the deal.

Reusability and infinite improvement. Because the algorithms are open source and smart contracts available to anybody, eventually, we will have thousands of standard and well-tested smart contracts that people will be reusing again and again. In software engineering, we are not inventing the wheel when we need some existing functionality. Instead, we are using available open-source packages. In the same way, we will be able to build one smart contract based on another smart contract. And every smart contract will be tested and reviewed by thousands and even millions of users. Today lawyers create the same types of agreements again and again without the ability to reuse something that has been done before by another lawyer. With smart contracts, this is going to change.

Cheaper and faster. And because you don't work with any specific centralized entity, the process is entirely automated, and unnecessary middlemen are eliminated. That makes the work through smart contracts much cheaper and faster!

Example #2: Elections and Voting systems.

One of the most exciting examples of how smart contracts can be used is any type of voting mechanism, including the elections.

Let's think for a moment: what qualities should a good voting mechanism have?

  1. It should be incorruptible. There shouldn't be any way to alter the results of the voting.
  2. It should be anonymous. It's especially important for citizens of the countries where dictatorships are still in power and people can be afraid of voting for a "wrong" candidate.
  3. Fraud resistant. There shouldn't be any opportunity for voter fraud like double voting.
  4. It should be easy to use. Anybody eligible to vote should be able to vote even from the comfort of their couch.
  5. Transparent. The data and results should be available to everyone for review.
  6. Open-source. The algorithm that calculates the votes should be open source and available to anyone for review.
  7. Incorruptibility. The algorithm should be incorruptible.

If we put the voting mechanism into a smart contract, it will meet all of these criteria. The data will be stored on the Blockchain, as well as the algorithm. Every user of the network will keep its copy. It will be impossible to alter the data or change the algorithm without everyone else knowing it. The process can authorize users anonymously but validate that there is no double voting or any other fraud present. Software engineers from all over the world will be able to review the algorithm to ensure that the process is fair and works exactly as it is supposed to. And any person will be able to vote with a couple of clicks on their laptop!

Example #3: Charity

Charity is a fantastic way to help communities, people, or organizations that you believe in. Many people, including myself, love to donate some portions of their income to chosen charities monthly. But unfortunately, there are a couple of well-known concerns related to charity:

  • Where exactly does my money go?
  • Does the charity do a good job and have effective processes?

I definitely want to know that the charity I selected will spend the money responsibly. Money will go directly to the cause and won't settle in the pockets of the organizers except for the reasonable reward for the work. And there won't be any overly-expensive or useless middlemen that we can get rid of to save the money and send the money to the cause instead of the middlemen.

Smart contracts provide that transparency and eliminate all the unnecessary intermediaries. We can send money directly to the cause, and we can track the flow of the funds to see if they are spent responsibly. And, as always, with smart contracts, people from all over the world can bring their ideas on how the process can be optimized and improved. Can we use cheaper materials? Can we use better vendors? These and many other questions can be answered with the help of millions of people reviewing the algorithms.

Example #4: Insurance

The insurance industry has a bad reputation among many people nowadays. Implementation of smart contracts into insurance companies' processes can help increase trust and change the perception of insurance among the population. So how would it look if we add smart contracts to the typical insurance process?

People will pay their monthly premiums to a shared wallet on the Blockchain using smart contracts. It's a decentralized system, so there are no shareholders trying to profit from the process instead of helping insured people. In a decentralized system, insured people are the shareholders. The process is entirely transparent and can be reviewed by anybody. Fees are significantly lower because we automate the process and eliminate unnecessary managers and shareholders. By the end of the year, if there are still some profits in the wallet, the system redistributes them between the insured people and maintainers instead of shareholders.

It's also worth mentioning how the claims approval process may work in such system:

  • Centralized way. It's basically the same claim review process as every insurance company has today. Some people review the claims and are paid from the shared wallet monthly.
  • Decentralized way. Every participant of the network (including the insured people) may review the claims and vote using a smart contract to decide if it can be approved.

Both options have their benefits and disadvantages, and it will be interesting to watch which option will eventually survive over a long period.

Conclusion

Smart contracts are just simple algorithms that we put on the Blockchain. But this simple fact changes everything. We can review every small piece of code that's being executed. We can be sure that there is no way to corrupt and change the code. There is no possibility for different misinterpretations by different people. The contract, once created, can be reused by another contract. Complete or partial automation of the processes and elimination of unnecessary middlemen will help significantly reduce the costs of the system built with smart contracts. And the contracts can easily be used internationally.

And probably the last but very important question: why would businesses want to implement these ideas? After all, many of those ideas threaten business owners who try to maximize their profits. At the time of the writing of this article, there is enormous distrust in our institutions, organizations, and corporations. Smart contracts are just one of the tools that can help earn trust by providing complete transparency and incorruptibility of the processes. Providing this trust to customers with the help of cryptocurrencies, DeFi, and smart contracts can be a solid competitive advantage for new businesses who want to enter the market.

We have many exciting ideas on how smart contracts will be used in the near future. And we can't wait to see all the use cases that are going to be implemented in the next five years. But here at Dev Team Inc, we are not just waiting but also developing our own Web 3.0 products and helping our clients to build similar solutions! And if you have any thoughts on how we can collaborate, just connect with me on my social media, send me a message, and we will find some ways to help each other!

About the Author

Hey Everyone! Thanks for checking out! My name is Dima Bezzubenkov, and I'm answering different questions related to the software development industry. Subscribe to my video channel, connect with me on social media, and visit my website!

www.dimabezzubenkov.com
Dima Bezzubenkov